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

Display revisions when generating a badge for a multi-source application #17986

Open
2 of 3 tasks
nbarrientos opened this issue Apr 26, 2024 · 7 comments · May be fixed by #22547
Open
2 of 3 tasks

Display revisions when generating a badge for a multi-source application #17986

nbarrientos opened this issue Apr 26, 2024 · 7 comments · May be fixed by #22547
Labels
bug Something isn't working component:api API bugs and enhancements component:server good first issue Good for newcomers multi-source-apps Bugs or enhancements related to multi-source Applications. type:bug version:2.14 Latest confirmed affected version is 2.14

Comments

@nbarrientos
Copy link

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

badge.go does not take into account multi-source applications when determining the revision to display on a badge. It only extracts the value from app.Status.OperationState.SyncResult.Revision, leaving app.Status.OperationState.SyncResult.Revisions behind.

Example multi-source application object dumped via the API:

image

To Reproduce

Crate a multi-source application and generate a the badge passing revision=true. No revision is added.

Expected behavior

Revisions from sources are added to the badge.

Screenshots

n/a

Version

v2.10.7

Logs

n/a

@nbarrientos nbarrientos added the bug Something isn't working label Apr 26, 2024
@ishitasequeira ishitasequeira added multi-source-apps Bugs or enhancements related to multi-source Applications. component:api API bugs and enhancements labels May 1, 2024
@pasha-codefresh pasha-codefresh added the good first issue Good for newcomers label May 22, 2024
@AnkurManna
Copy link

if approved, i am willing to provide pr.

@crenshaw-dev
Copy link
Member

This seems like a bit of a UX challenge. What would the presentation of 2 revisions look like? Of 5?

@AnkurManna
Copy link

AnkurManna commented Jul 2, 2024

@crenshaw-dev

<svg width="131" height="20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >

is cropping data when returning multiline revision strings showing only the first one. any design guide / any suggestion to handle this kinda issue?
FYI: if revision strings are returned in a single line string, it can be visible adding width param in badge-url e.g. &width=500

@andrii-korotkov-verkada
Copy link
Contributor

ArgoCD versions 2.10 and below have reached EOL. Can you upgrade and tell us if the issue is still present, please?

@andrii-korotkov-verkada andrii-korotkov-verkada added the version:EOL Latest confirmed affected version has reached EOL label Nov 11, 2024
@nbarrientos
Copy link
Author

Hi! Yes, it is present in the greatest latest. Maybe next time it'd be nice if you could just a run a quick check yourself, it'd just a matter of reading the bug report and clicking on the code segment linked in the description which points to master. I understand that doing auto-triage is useful as there's a big backlog of issues, but it's also a bit annoying for reporters.

@andrii-korotkov-verkada
Copy link
Contributor

While I'd generally agree with you, I'm going through ~1600 bugs manually, so can't check every one of them. That's where I rely on the community help. Please, be understanding.

@andrii-korotkov-verkada andrii-korotkov-verkada added version:2.14 Latest confirmed affected version is 2.14 and removed version:EOL Latest confirmed affected version has reached EOL labels Nov 11, 2024
@fpetr
Copy link

fpetr commented Apr 1, 2025

Any update on this? I don’t think it needs to be overly complex. For most people, it would be enough to show the revision in a badge for the first defined source in a multiple-source setup.

For example, when using Helm with external values, I’m not really interested in the revision of the values, but I’m definitely interested in the targetRevision of the Helm chart to be shown in badge.

It follows the same principle as how you want your application to be previewed in the UI. If you define external values as the first source, the application will be displayed as a Git repository. If you define the chart first, it will be shown as a Helm release.

fpetr added a commit to fpetr/argo-cd that referenced this issue Apr 2, 2025
fpetr added a commit to fpetr/argo-cd that referenced this issue Apr 2, 2025
fpetr added a commit to fpetr/argo-cd that referenced this issue Apr 2, 2025
@fpetr fpetr linked a pull request Apr 2, 2025 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:api API bugs and enhancements component:server good first issue Good for newcomers multi-source-apps Bugs or enhancements related to multi-source Applications. type:bug version:2.14 Latest confirmed affected version is 2.14
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants