Skip to content

Fix unknown fields warnings and possibility to suppress finalizer ones#786

Merged
turkenh merged 2 commits intocrossplane:mainfrom
turkenh:fix-unknown-fields
Nov 5, 2024
Merged

Fix unknown fields warnings and possibility to suppress finalizer ones#786
turkenh merged 2 commits intocrossplane:mainfrom
turkenh:fix-unknown-fields

Conversation

@turkenh
Copy link
Copy Markdown
Member

@turkenh turkenh commented Nov 4, 2024

Description of your changes

This PR aims to clean up warnings observed in crossplane/crossplane#6043 by:

  • Fixing "unknown field" warnings using the correct structs matching schemas.
  • Suppressing "prefer a domain-qualified finalizer" until we properly migrate them to the suggested format.

Together with the accompanying PR in Crossplane, I could validate that former warnings disappeared with the changes here.

This PR introduces a new package, warning, with the warning.LoggingHandler implementing rest.WarningHandler interface. This supports deduplication just like the current handler Crossplane uses, but it also uses provided crossplane runtime logger so that warnings logged as structured logs* and also enables discarding logs matching provided regular expressions. I opted to put this into crossplane runtime since we may want to leverage it in other repositories, e.g. providers, as well.

I have:

Need help with this checklist? See the cheat sheet.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants