8000 fix(controller): only update lastTransitionTime when needed by crenshaw-dev · Pull Request #23018 · argoproj/argo-cd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(controller): only update lastTransitionTime when needed #23018

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

Merged
merged 2 commits into from
May 20, 2025

Conversation

crenshaw-dev
Copy link
Member

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.
  • 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.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Copy link
bunnyshell bot commented May 16, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link
codecov bot commented May 17, 2025

Codecov Report

Attention: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Project coverage is 60.00%. Comparing base (797f1d6) to head (d190760).
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
controller/state.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #23018      +/-   ##
==========================================
- Coverage   60.00%   60.00%   -0.01%     
==========================================
  Files         343      343              
  Lines       57848    57847       -1     
==========================================
- Hits        34714    34710       -4     
- Misses      20358    20362       +4     
+ Partials     2776     2775       -1     

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

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix tests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix tests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix tests

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

fix tests, lint

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

lint

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev crenshaw-dev force-pushed the do-not-reuse-structs branch from 3494413 to 8233906 Compare May 17, 2025 17:27
@agaudreault agaudreault marked this pull request as ready for review May 19, 2025 15:32
@agaudreault agaudreault requested a review from a team as a code owner May 19, 2025 15:32
Comment on lines 1793 to 1794
// Message is a human-readable informational message describing the health status
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
Copy link
Member

Choose a reason for hiding this comment

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

Add back the field as deprecated just so the protobuf byte is reserved.

@@ -1787,15 +1787,20 @@ type SyncStatus struct {
}

// HealthStatus contains information about the currently observed health state of an application or resource
Copy link
Member

Choose a reason for hiding this comment

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

super nit

Suggested change
// HealthStatus contains information about the currently observed health state of an application or resource
// AppHealthStatus contains information about the currently observed health state of an application or resource

@rumstead
Copy link
Member

From my understanding, you are breaking HealthResource struct by app and resource. I guess that caused some issues when normalizing?

@crenshaw-dev crenshaw-dev marked this pull request as draft May 19, 2025 16:08
@crenshaw-dev
Copy link
Member Author

@rumstead sharing a single field just made the code very confusing. The actual bug is that we update lastTransitionTime when we shouldn't.

I'm going to update the PR to make the changes minimal and backwards-compatible. Then I'm going to make an even more minimal 2.14 cherry-pick to just solve the bug with no other changes.

@crenshaw-dev crenshaw-dev force-pushed the do-not-reuse-structs branch 2 times, most recently from f8dcda3 to 39968f9 Compare May 19, 2025 20:01
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

comment

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

simplify, better test

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

e2e test

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

remove unnecessary test - covered elsewhere'

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev crenshaw-dev force-pushed the do-not-reuse-structs branch from 39968f9 to d190760 Compare May 19, 2025 21:03
@crenshaw-dev crenshaw-dev marked this pull request as ready for review May 20, 2025 14:47
Copy link
Member
@agaudreault agaudreault left a comment

Choose a reason for hiding this comment

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

LGTM. From my understanding, the change to the protobuf should be backward compatible too.

@crenshaw-dev crenshaw-dev merged commit 45a8c68 into argoproj:master May 20, 2025
40 of 41 checks passed
LyhengTep pushed a commit to LyhengTep/argo-cd that referenced this pull request May 24, 2025
…#23018)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Lyheng <lyhengtep@gmail.com>
tylerrosnett pushed a commit to StateFarmIns/argo-cd that referenced this pull request May 27, 2025
…#23018)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
chansuke pushed a commit to chansuke/argo-cd that referenced this pull request Jun 4, 2025
…#23018)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
dsuhinin pushed a commit to dsuhinin/argo-cd that referenced this pull request Jun 16, 2025
…#23018)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
dsuhinin pushed a commit to dsuhinin/argo-cd that referenced this pull request Jun 16, 2025
…#23018)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
dsuhinin pushed a commit to dsuhinin/argo-cd that referenced this pull request Jun 16, 2025
…#23018)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: dsuhinin <suhinin.dmitriy@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.

3 participants
0