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(PL-660): validate crd schemas against file content not deserialized representation #194

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

davidmdm
Copy link
Contributor

@davidmdm davidmdm commented Jul 24, 2024

Not too long ago, schemas were added to represent the Joy CRDs. However the original implementation was wrong in that it would validate against the already serialized Go struct instead of the files root yaml node.

This would cause information loss and things to not get picked up by the schema validation.

For example with this change the internal tests started failing because versionKey which is an unknown property was being caught and it previously was not.

loading catalog: validating releases:
  - podinfo/demo: validation: error: #release.spec.versionKey: field not allowed
  - podinfo/dev: validation: error: #release.spec.versionKey: field not allowed
  - podinfo/platform: validation: error: #release.spec.versionKey: field not allowed
  - podinfo/qa: validation: error: #release.spec.versionKey: field not allowed

This has since been fixed in this commit.

@davidmdm davidmdm merged commit ce84b03 into master Jul 25, 2024
5 checks passed
@davidmdm davidmdm deleted the fix/PL-660/validate-against-raw-yaml branch July 25, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants