Treat an empty --publish value as no publish - #1491
Open
jochenchrist wants to merge 2 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
validate_publish_urlrejected any--publishvalue not starting withhttp://orhttps://, including an empty string:GitHub Actions container actions cannot conditionally drop an entry from an
argslist, so a template rendering--publishfrom an unset input has to pass an empty string. This blocksdatacontract/datacontract-actionfrom invoking the CLI without a shell, which the 1.1.0 shell-less image requires.validate_publish_urlnow normalizes an empty value toNoneand returns it. The four commands taking--publish(test,ci,dbt sync,dbt test) assign the normalized value, so downstreampublish is not Nonechecks skip publishing as they already do when the option is omitted. Non-empty non-http values are still rejected.