Skip to content
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 #481

Merged
merged 1 commit into from
Aug 24, 2024

Conversation

mattwelke
Copy link
Member

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 or validationrule.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.

This fixes it by adding the YAML tags.

Signed-off-by: Matt Welke <matt.welke@spectrocloud.com>
@mattwelke mattwelke requested a review from a team as a code owner August 24, 2024 02:20
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Aug 24, 2024
Copy link

codecov bot commented Aug 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

@@           Coverage Diff           @@
##             main     #481   +/-   ##
=======================================
  Coverage   73.26%   73.26%           
=======================================
  Files          11       11           
  Lines         924      924           
=======================================
  Hits          677      677           
  Misses        184      184           
  Partials       63       63           
Files Coverage Δ
api/v1alpha1/awsvalidator_types.go 87.50% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c690f3...e7e8bff. Read the comment docs.

@mattwelke mattwelke merged commit c82abf3 into main Aug 24, 2024
8 checks passed
@mattwelke mattwelke deleted the fix/struct-embedding-yaml branch August 24, 2024 02:40
mattwelke pushed a commit that referenced this pull request Aug 24, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.1.7](v0.1.6...v0.1.7)
(2024-08-24)


### Bug Fixes

* YAML rendering of structs embedded in rules
([#481](#481))
([c82abf3](c82abf3))


### Dependency Updates

* **deps:** update golang.org/x/exp digest to 9b4947d
([#475](#475))
([b8b0dc2](b8b0dc2))

---
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
Labels
bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant