-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove magic strings in struct tags #2787
Closed
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
2d57404
switching json description to go comments
AustinAbro321 e466577
switching json description to go comments
AustinAbro321 a54b4d6
switching json description to go comments
AustinAbro321 d746067
switching json description to go comments
AustinAbro321 7e16860
make gen types work again
AustinAbro321 8dfe1a5
wording
AustinAbro321 be388f8
add json tags back
AustinAbro321 59bc21f
add back json tags
AustinAbro321 cde411a
inline
AustinAbro321 8f2d3ec
Merge branch 'main' into utilize-invopop-features
AustinAbro321 fd680fc
back to omitempty
AustinAbro321 cbc25f2
add back test
AustinAbro321 da9ea48
removing json options
AustinAbro321 e8a11ac
add back json data
AustinAbro321 de0bd7c
bb required
AustinAbro321 96d703d
de-dup
AustinAbro321 380d2e7
add period to json descriptions
AustinAbro321 5e91b84
use more invopop features
AustinAbro321 4623784
merge
AustinAbro321 5c35b98
Merge branch 'main' into use-more-invopop-features
AustinAbro321 d6ff4b0
fix comments
AustinAbro321 3ba8294
Merge branch 'main' into use-more-invopop-features
AustinAbro321 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this ignoring an error 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ignoring the present flag but I'd rather have the code panic if it doesn't find something since this is only run on
zarf internal gen-config-schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't change the signature to return an error, since this signature is necessary for this function to get called by the jsonschema package during schema creation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot be a production grade tool that panics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is only called during schema generation,
zarf internal gen-config-schema
, and this would only panic if, during development, someone changed the json tag to not equal what is in theschema.Properties.Get
call.Given that we don't have control over this function signature I think there's two options: