-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: YAML rendering of structs embedded in rules #143
Merged
Merged
Conversation
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
Signed-off-by: Matt Welke <[email protected]>
dosubot
bot
added
size:XS
This PR changes 0-9 lines, ignoring generated files.
bug
Something isn't working
labels
Aug 24, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## main #143 +/- ##
=======================================
Coverage 74.22% 74.22%
=======================================
Files 9 9
Lines 357 357
=======================================
Hits 265 265
Misses 76 76
Partials 16 16
Continue to review full report in Codecov by Sentry.
|
mattwelke
pushed a commit
that referenced
this pull request
Aug 24, 2024
🤖 I have created a release *beep* *boop* --- ## [0.0.9](v0.0.8...v0.0.9) (2024-08-24) ### Bug Fixes * YAML rendering of structs embedded in rules ([#143](#143)) ([c7ae66d](c7ae66d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
mattwelke
pushed a commit
that referenced
this pull request
Aug 24, 2024
🤖 I have created a release *beep* *boop* --- ## [0.0.11](v0.0.11...v0.0.11) (2024-08-24) ### Other * add retract directive for versions v0.0.8-v0.0.10, release 0.0.11 ([#147](#147)) ([27e1988](27e1988)) * assert that PluginSpec is implemented ([#133](#133)) ([cf2c23f](cf2c23f)) * manually set version to 0.0.11 for release-please ([#145](#145)) ([f26f1fa](f26f1fa)) * release 0.0.11 ([#149](#149)) ([297bb73](297bb73)) ### Dependency Updates * **deps**: update module github.com/validator-labs/validator to v0.1.8 * **deps:** update module github.com/canonical/gomaasclient to v0.7.0 ([4942f99](4942f99)) * **deps:** update module github.com/validator-labs/validator to v0.1.2 ([df63d44](df63d44)) * **deps:** update module github.com/validator-labs/validator to v0.1.5 ([#123](#123)) ([a856370](a856370)) * **deps:** update module github.com/validator-labs/validator to v0.1.6 ([5dbc31f](5dbc31f)) * **deps:** update module sigs.k8s.io/controller-runtime to v0.19.0 ([#124](#124)) ([e903cc7](e903cc7)) ### Refactoring * make each rule implement `validationrule.Interface` * initial PR - make each rule implement `validationrule.Interface` ([#130](#130)) ([381e3ab](381e3ab)) * bug fix 1 - embedding structs related to `validationrule.Interface` ([#135](#135)) ([4ebf38a](4ebf38a)) * bug fix 2 - YAML rendering of structs embedded in rules ([#143](#143)) ([c7ae66d](c7ae66d)) * make remaining rules implement rule interface ([#131](#131)) ([ed0bc5b](ed0bc5b)) * support direct rule evaluation ([#118](#118)) ([e4d873d](e4d873d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Description
In previous PRs, we made the plugin rules implement the new
validationrule.Interface
interface. We did not include YAML tags in rules to specify that the new field (validationrule.ManuallyNamed
orvalidationrule.AutomaticallyNamed
depending on the rule) should not be included when the rules are rendered to YAML. The validatorctl CLI renders the rules to YAML as part of what it does, so this caused errors when validatorctl tried to apply validator CRDs it generated to its cluster.