Skip to content

feat: fix force-update for zero-replica deployments by reading image tags from spec #1172

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chansuke
Copy link
Contributor

Closes #829

Resolves continuous update attempts for deployments with 0 replicas when force-update=true is set

@codecov-commenter
Copy link

codecov-commenter commented Jun 22, 2025

Codecov Report

❌ Patch coverage is 70.90909% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.13%. Comparing base (18767ed) to head (4d7ded9).

Files with missing lines Patch % Lines
pkg/argocd/argocd.go 76.74% 9 Missing and 1 partial ⚠️
pkg/argocd/update.go 50.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1172      +/-   ##
==========================================
+ Coverage   63.05%   63.13%   +0.07%     
==========================================
  Files          23       23              
  Lines        3140     3190      +50     
==========================================
+ Hits         1980     2014      +34     
- Misses       1050     1064      +14     
- Partials      110      112       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chansuke chansuke marked this pull request as ready for review June 22, 2025 12:26
@chengfang chengfang force-pushed the feat/update-behavior branch from e71b77b to 6e731a7 Compare July 23, 2025 02:42
case ApplicationTypeHelm:
if source.Helm != nil && source.Helm.Parameters != nil {
for _, param := range source.Helm.Parameters {
if param.Name == "image.tag" || param.Name == "image.version" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The helm parameter names are not fixed and can vary, such as my.tag, my.version. How do we handle such different param names used to identify tag or version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chengfang
you're right that Helm parameter names can vary. i'm thinking we could implement pattern matching using regex to detect different tag parameter naming conventions (e.g., *.tag, *.version, *.imageTag).what do you think about this approach?

Copy link
Collaborator

Choose a reason for hiding this comment

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

using regex patterns sounds good. It should catch the majority of use cases. We should also document this limitation that when uncommon helm params are used along with 0-replica deployment and force-update, this issue can still occur.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chengfang
Thank you so much for your comment. I will handle this

@chansuke chansuke force-pushed the feat/update-behavior branch from 6e731a7 to 4ea8ebe Compare August 3, 2025 10:37
@chengfang chengfang force-pushed the feat/update-behavior branch from 4ea8ebe to 983234f Compare August 4, 2025 15:13
@chengfang chengfang force-pushed the feat/update-behavior branch from 983234f to 4d7ded9 Compare August 6, 2025 18:37
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.

Update attempts when image is already up to date when no container exist
3 participants