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

fix: Appcontroller respects sync windows #16492

Merged
merged 5 commits into from
Mar 26, 2024

Conversation

ccjette-logmein
Copy link
Contributor

@ccjette-logmein ccjette-logmein commented Nov 30, 2023

Closes #11817

Fix rationale
I have followed this hint to guide the solution choice.

I have found that this is the easiest way to solve the current problem, which is to simply keep the operation running while the sync window is in effect. Otherwise, I feel like a new Suspended or Pending OperationState would be needed to properly reflect the interaction with the SyncWindow, and it would have warranted a bigger re-work.

In the tests I have made, failing the operation created a loop with the ApplicationSet controller, because it rescheduled the same operation all the time. This would also have required a bigger re-work in the ApplicationSet controller logic.

This is my first PR so please do not hesitate to tell me if you see problems related to this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

Signed-off-by: Charles Coupal-Jetté <charles.coupaljette@goto.com>
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.51%. Comparing base (f87897c) to head (b067325).
Report is 1 commits behind head on master.

❗ Current head b067325 differs from pull request most recent head cea00d3. Consider uploading reports for the commit cea00d3 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16492      +/-   ##
==========================================
- Coverage   49.73%   49.51%   -0.22%     
==========================================
  Files         274      271       -3     
  Lines       48948    47805    -1143     
==========================================
- Hits        24343    23670     -673     
+ Misses      22230    21796     -434     
+ Partials     2375     2339      -36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ccjette-logmein ccjette-logmein changed the title fix: Appcontroller keeps op running when denied by sync window fix: Appcontroller respects sync windows [Issue 11817] Nov 30, 2023
Signed-off-by: Charles Coupal-Jetté <charles.coupaljette@goto.com>
@ccjette-logmein ccjette-logmein marked this pull request as ready for review November 30, 2023 15:11
@ccjette-logmein ccjette-logmein requested a review from a team as a code owner November 30, 2023 15:11
Copy link
Member

@jannfis jannfis 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!

@jannfis jannfis changed the title fix: Appcontroller respects sync windows [Issue 11817] fix: Appcontroller respects sync windows Mar 26, 2024
@jannfis jannfis merged commit 295dff6 into argoproj:master Mar 26, 2024
28 checks passed
lyda pushed a commit to lyda/argo-cd that referenced this pull request Mar 28, 2024
* fix: Appcontroller keeps op running when denied by sync window

Signed-off-by: Charles Coupal-Jetté <charles.coupaljette@goto.com>

* fix: Update test name

Signed-off-by: Charles Coupal-Jetté <charles.coupaljette@goto.com>

---------

Signed-off-by: Charles Coupal-Jetté <charles.coupaljette@goto.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
mkieweg pushed a commit to mkieweg/argo-cd that referenced this pull request Jun 11, 2024
* fix: Appcontroller keeps op running when denied by sync window

Signed-off-by: Charles Coupal-Jetté <charles.coupaljette@goto.com>

* fix: Update test name

Signed-off-by: Charles Coupal-Jetté <charles.coupaljette@goto.com>

---------

Signed-off-by: Charles Coupal-Jetté <charles.coupaljette@goto.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
Hariharasuthan99 pushed a commit to AmadeusITGroup/argo-cd that referenced this pull request Jun 16, 2024
* fix: Appcontroller keeps op running when denied by sync window

Signed-off-by: Charles Coupal-Jetté <charles.coupaljette@goto.com>

* fix: Update test name

Signed-off-by: Charles Coupal-Jetté <charles.coupaljette@goto.com>

---------

Signed-off-by: Charles Coupal-Jetté <charles.coupaljette@goto.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
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.6 RC1 - Progressive Rollout does not respect SyncWindows
5 participants