-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Small refactor to attempt reconciliation code re-use between Azure & AWS integrations #47427
Conversation
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve the PR because it simplifies the code but I don't think we should use this for Aws/Azure as some of the fields are AWS only and should be kept that way.
Feel free to merge once you address comments
Agree--I didn't mean to say we should re-use fields or anything like that. I originally had a reusable approach with an additional generic parameter and a few more functions passed as parameters, but it was ugly/complex. If I can't figure out a nice/simple way to make this reusable, then at least there's less lines to copy/borrow for Azure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bot.
…AWS integrations (#47427) * A little refactoring to attempt resuing reconciliation code between Azure & AWS integrations * Use "Wrap" instead of "Insert" * Removing my overly complex generic reconciler for now * A little more cleanup * PR feedback * Linting
This PR simplifies some of the TAG AWS synchronization resource reconciliation for re-use with Azure integration. Specifically it introduces an wrapping function which wraps the original AWS item into the
AWSResource
type.The eventual goal is to provide some simple upsert/delete reconciliation functionality that can be used across AWS, Azure, GCP, etc. While this PR does not directly accomplish this goal, it reduces some golang lines, and simplifies the reconciliation towards a basic process: