Skip to content

crdupgradesafety: CalculateFlatSchemaDiff should ignore child items#1054

Open
joelanford wants to merge 1 commit intocarvel-dev:developfrom
joelanford:fix-crdupgradesafety-diff
Open

crdupgradesafety: CalculateFlatSchemaDiff should ignore child items#1054
joelanford wants to merge 1 commit intocarvel-dev:developfrom
joelanford:fix-crdupgradesafety-diff

Conversation

@joelanford
Copy link
Copy Markdown

What this PR does / why we need it:

See operator-framework/operator-controller#1860

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?


Additional Notes for your reviewer:

The FlatSchema struct contains a mapping of every field at all levels of the type hierarchy containing the schema of that field. In the case of fields that are structs, the CalculateFlatSchemaDiff function ignores the child properties because the child properties have their own schemas defined elsewhere in the map. For this same reason, CalculateFlatSchemaDiff should also ignore child Items.

Review Checklist:
  • Follows the developer guidelines
  • Relevant tests are added or updated
  • Relevant docs in this repo added or updated
  • Relevant carvel.dev docs added or updated in a separate PR and there's
    a link to that PR
  • Code is at least as readable and maintainable as it was before this
    change

Additional documentation e.g., Proposal, usage docs, etc.:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants