main: Stop setting COSA_META_SCHEMA#2961
Merged
cgwalters merged 2 commits intocoreos:mainfrom Jul 6, 2022
Merged
Conversation
Prep for not setting `COSA_META_SCHEMA` by default.
We already have fallback defaults in the code. Avoiding global environment variables is good on general principle; but this is specifically prep for making the entrypoint a Go program.
0d226d6 to
3d9f179
Compare
Member
Author
|
coreos-assembler in a nutshell: The Python code (which duplicates the Go code handling schemas) had a bug that was papered over by some messy shell script. |
dustymabe
reviewed
Jul 6, 2022
Comment on lines
-77
to
-82
| COSA_META_SCHEMA="${COSA_META_SCHEMA:-/usr/lib/coreos-assembler/v1.json}" | ||
| schema_override="${PWD}/src/config/schema.json" | ||
| if [ -e "${schema_override}" ]; then | ||
| COSA_META_SCHEMA=$(realpath "${schema_override}") | ||
| fi | ||
| export COSA_META_SCHEMA |
Member
There was a problem hiding this comment.
so the code itself already behaves this way and there was no reason to do this?
Does it handle if "${PWD}/src/config/schema.json" exists?
I'm happy to delete this code, just don't know if anything is relying on that.
Member
Author
There was a problem hiding this comment.
Does it handle if "${PWD}/src/config/schema.json" exists?
Ah right, I should have commented on that. I don't believe that was ever actually used, so it should be safe to delete.
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.
We already have fallback defaults in the code. Avoiding global
environment variables is good on general principle; but this
is specifically prep for making the entrypoint a Go program.