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

rewrite diff plugin #370

Open
djdanielsson opened this issue Sep 30, 2022 · 4 comments
Open

rewrite diff plugin #370

djdanielsson opened this issue Sep 30, 2022 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@djdanielsson
Copy link
Collaborator

creating this because that is the solution to all the other diff issues that are open and I am closing those referencing this issue to track the rewrite of the diff plugin.

@djdanielsson djdanielsson added enhancement New feature or request help wanted Extra attention is needed labels Sep 30, 2022
@github-actions github-actions bot added the inactive No movement has happened in 30 days label Nov 23, 2022
@djdanielsson djdanielsson removed the inactive No movement has happened in 30 days label Nov 23, 2022
@bogdanmuresan
Copy link

Hi, unless a completely different approach is considered for the object diff, I would suggest splitting the controller_object_diff.py file into multiple files, one for each object type, containing a class that would implement the methods of an abstract class(acting as an interface). The definition of which keys to keep from the 2 lists, updating and removing keys, expanding values, etc - any logic specific to an object type would go in it's own class.

I also think it would help a lot to have a very easy test setup, where one would just clone the repo, add api_list and compare_list and run tests on their local machines. The more test cases, the better, as it would give more confidence for people collaborating to it.

@ivarmu
Copy link
Contributor

ivarmu commented Apr 4, 2023

Hi, unless a completely different approach is considered for the object diff, I would suggest splitting the controller_object_diff.py file into multiple files, one for each object type, containing a class that would implement the methods of an abstract class(acting as an interface). The definition of which keys to keep from the 2 lists, updating and removing keys, expanding values, etc - any logic specific to an object type would go in it's own class.

I also think it would help a lot to have a very easy test setup, where one would just clone the repo, add api_list and compare_list and run tests on their local machines. The more test cases, the better, as it would give more confidence for people collaborating to it.

You seem to have the idea very clear... PRs are welcome! ^_^

@djdanielsson
Copy link
Collaborator Author

So a few notes to just mention. One the API has a limited number of items it can return in one call and needs to be considered. Another is it needs to be able to compare items not only at the object name level but ownership (such as org and user) to ensure that you are comparing the same two objects.

@sean-m-sullivan
Copy link
Collaborator

This is partially done with the new export module, we need to push for more endpoints to be covered and then it will be complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants