Skip to content

Treat an empty --publish value as no publish - #1491

Open
jochenchrist wants to merge 2 commits into
mainfrom
fix/empty-publish-url
Open

Treat an empty --publish value as no publish#1491
jochenchrist wants to merge 2 commits into
mainfrom
fix/empty-publish-url

Conversation

@jochenchrist

Copy link
Copy Markdown
Contributor

validate_publish_url rejected any --publish value not starting with http:// or https://, including an empty string:

--publish URL must start with http:// or https:// (got: '').

GitHub Actions container actions cannot conditionally drop an entry from an args list, so a template rendering --publish from an unset input has to pass an empty string. This blocks datacontract/datacontract-action from invoking the CLI without a shell, which the 1.1.0 shell-less image requires.

validate_publish_url now normalizes an empty value to None and returns it. The four commands taking --publish (test, ci, dbt sync, dbt test) assign the normalized value, so downstream publish is not None checks skip publishing as they already do when the option is omitted. Non-empty non-http values are still rejected.

GitHub Actions container actions cannot conditionally drop an entry from
an argument list, so a template that renders --publish from an unset input
passes an empty string. That was rejected by the http/https check.

validate_publish_url now normalizes an empty value to None and returns it,
and the four commands taking --publish assign the normalized value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant