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

UI: ArgoCD app link contains expr-lang references instead of real app name #3123

Closed
3 of 4 tasks
dspereira004 opened this issue Dec 11, 2024 · 2 comments · Fixed by #3138
Closed
3 of 4 tasks

UI: ArgoCD app link contains expr-lang references instead of real app name #3123

dspereira004 opened this issue Dec 11, 2024 · 2 comments · Fixed by #3138

Comments

@dspereira004
Copy link

Checklist

  • I've searched the issue queue to verify this is not a duplicate bug report.
  • I've included steps to reproduce the bug.
  • I've pasted the output of kargo version.
  • I've pasted logs, if applicable.

Description

Starting from version 1.1.0, we can use expr-lang in our Stage resources. More specifically, in the "config" section. This works well, including in the argocd-update step (Kargo is able to update the ArgoCD application successfully).

Also, for any app we have in argocd-update, Kargo is able to display a link that directs us to the ArgoCD application whenever we click on the stage in the UI. The problem is that the link contains the expr-lang references we put in the Stage resources, instead of displaying the final (after processing) link. This prevents us from going to the app, as the link is wrong.

Screenshots

image

Steps to Reproduce

Create a Stage which contains an argocd-update step with expr-lang references in the name. Example:

- uses: argocd-update
  config:
    apps:
      - name: kargo-${{ ctx.stage }}
        sources:
          - repoURL: https://github.com/example/repo
            updateTargetRevision: false

Version

{
  "Version": "v1.1.1",
  "BuildDate": "2024-12-09T22:05:23Z",
  "GitCommit": "d9932c7379444b0cc885c05fbc735f4495c65463",
  "GitTreeDirty": false,
  "GoVersion": "go1.23.4",
  "Compiler": "gc",
  "Platform": "linux/amd64"
}
@Marvin9
Copy link
Contributor

Marvin9 commented Dec 11, 2024

This crossed me just today when I was working on #3024. I will try to have both fixes together since they are interconnected.

Again it traces back to #2752 that how far we stretch the flexibility for UI plugins. cc @jessesuen @krancour

@Marvin9 Marvin9 self-assigned this Dec 11, 2024
@krancour
Copy link
Member

krancour commented Dec 11, 2024

Again it traces back to #2752 that how far we stretch the flexibility for UI plugins.

An easy-ish interim solution is to get the namespaces/names of affected apps by looking at the health checks left behind by the Promotion. An argocd-update step, when successful, always leaves behind "instructions" for assessing App health to inform Stage health. Unlike the config passed to the argocd-update step, these would never contain expressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants