Skip to content

fix: (call .repo.GetAppDetails).Helm is Null for multi-sources applications#26773

Open
aryasoni98 wants to merge 13 commits intoargoproj:masterfrom
aryasoni98:issue-26760
Open

fix: (call .repo.GetAppDetails).Helm is Null for multi-sources applications#26773
aryasoni98 wants to merge 13 commits intoargoproj:masterfrom
aryasoni98:issue-26760

Conversation

@aryasoni98
Copy link

@aryasoni98 aryasoni98 commented Mar 10, 2026

Description

Fixes #26760

For multi-source Argo CD applications, (call .repo.GetAppDetails) in notification templates always returned nil for Helm, so Helm values (e.g. image.tag) could not be read via $appDetails.Helm.GetParameterValueByName. The function always used source index 0, which for multi-source apps is often the values repo, not the Helm chart.

This change adds an optional source index argument so callers can specify which source to inspect (e.g. (call .repo.GetAppDetails 1) for the second source). It also passes RefSources for multi-source apps so $values references in Helm value files resolve correctly.


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 Title of the PR
  • 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).

@aryasoni98 aryasoni98 requested review from a team as code owners March 10, 2026 15:20
@bunnyshell
Copy link

bunnyshell bot commented Mar 10, 2026

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

Copy link
Contributor

@ppapapetrou76 ppapapetrou76 left a comment

Choose a reason for hiding this comment

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

Consider adding UTs especially for edge cases

aryasoni98 and others added 5 commits March 10, 2026 16:46
…ations

Signed-off-by: Arya Soni <aryasoni98@gmail.com>
Signed-off-by: anandf <anjoseph@redhat.com>
Signed-off-by: Arya Soni <aryasoni98@gmail.com>
….11.3 (argoproj#26771)

Signed-off-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
Signed-off-by: Arya Soni <aryasoni98@gmail.com>
Signed-off-by: pjmanda <jhansi.manda@amadeus.com>
Signed-off-by: jhansireddy01 <m.jhansireddy01@gmail.com>
Co-authored-by: pjmanda <jhansi.manda@amadeus.com>
Co-authored-by: Nitish Kumar <justnitish06@gmail.com>
Co-authored-by: jhansireddy01 <m.jhansireddy01@gmail.com>
Signed-off-by: Arya Soni <aryasoni98@gmail.com>
…ations

Signed-off-by: Arya Soni <aryasoni98@gmail.com>
@aryasoni98 aryasoni98 requested a review from a team as a code owner March 10, 2026 15:46
…ations

Signed-off-by: Arya Soni <aryasoni98@gmail.com>
…ations

Signed-off-by: Arya Soni <aryasoni98@gmail.com>
Copy link
Member

@nitishfy nitishfy left a comment

Choose a reason for hiding this comment

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

Left some nits, PTAL!

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 78.12500% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.98%. Comparing base (6df1a5b) to head (aa2be31).

Files with missing lines Patch % Lines
util/notification/argocd/service.go 46.15% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #26773      +/-   ##
==========================================
+ Coverage   62.97%   62.98%   +0.01%     
==========================================
  Files         414      414              
  Lines       56154    56180      +26     
==========================================
+ Hits        35362    35386      +24     
  Misses      17420    17420              
- Partials     3372     3374       +2     

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

@nitishfy
Copy link
Member

Please fix the lint checks.

@aryasoni98 aryasoni98 requested a review from nitishfy March 12, 2026 12:14
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.

(call .repo.GetAppDetails).Helm is Null for multi-sources applications

5 participants