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

Add logic to reconcile multiple RolloutMangers #65

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

Rizwana777
Copy link
Collaborator

What does this PR do / why we need it:

JIRA - https://issues.redhat.com/browse/GITOPS-4766

@Rizwana777
Copy link
Collaborator Author

I have added the iteration logic in Reconcile function itself, the example mention in the issue have a separate function which is called in SetupWithManager function, please do let me know if the logic I have added is correct or not, thank you

Copy link
Member

@jgwest jgwest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed a commit that takes a different approach to reconciling multiple RolloutManagers:

  • In general, one RolloutManager should not modify the status of another RolloutManager.
  • Instead, we can use the watch api to ensure that reconcile is called on all RolloutManagers whenever the another RolloutManager changes significantly (hinted at this approach in the original issue)

I've pushed a commit which does this, take a look and let me know if you see any issues. If not, we can clean up the resulting commit and then we are good to go.

@Rizwana777
Copy link
Collaborator Author

I've pushed a commit that takes a different approach to reconciling multiple RolloutManagers:

  • In general, one RolloutManager should not modify the status of another RolloutManager.
  • Instead, we can use the watch api to ensure that reconcile is called on all RolloutManagers whenever the another RolloutManager changes significantly (hinted at this approach in the original issue)

I've pushed a commit which does this, take a look and let me know if you see any issues. If not, we can clean up the resulting commit and then we are good to go.

I see no issues Jonathan, I have used enqueueRequestsFromMapFunc earlier as hinted but didn't followed the approach you have added so it was not working as expected and I tried adding the multiple Reconcile logic in Reconcile function itself which is not a good approach, thanks for the correction

Copy link
Member

@jgwest jgwest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @Rizwana777!

@jgwest jgwest merged commit b24f911 into argoproj-labs:main Jun 18, 2024
6 checks passed
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