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

Workflow-list links unable to render namespace #12322

Open
2 of 3 tasks
dmarquez-splunk opened this issue Dec 5, 2023 · 2 comments
Open
2 of 3 tasks

Workflow-list links unable to render namespace #12322

dmarquez-splunk opened this issue Dec 5, 2023 · 2 comments
Labels

Comments

@dmarquez-splunk
Copy link

dmarquez-splunk commented Dec 5, 2023

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issues exists when I tested with :latest
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what did you expect to happen?

Unsure if this is a bug or by design or whether to label this as an enhancement or bug but since archived workflow menu item was removed, I'd like to add a workflow-list link that shows only archived workflows for the current selected namespace. I am unable to achieve this because namespace is not rendered by argo when using {metadata.namespace} at the workflow-list scope. It would be nice to enhance workflow-list rendering to include the current selected namespace. When I use ${metadata.namespace} it does not get rendered and shows as {metadata.namespace} in the UI.

The link I have configured for this:

 name: Archived Workflows
 scope: workflow-list
 url: https://<argo-host>/workflows/${metadata.namespace}?&label=workflows.argoproj.io%2Fworkflow-archiving-status%3DArchived

What I see in the UI:
Screenshot 2023-12-05 at 11 45 22 AM

What I expect to see is the currently selected namespace used when clicking on the "Archived Workflows" link

Version

v3.5.2

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

N/A

Logs from the workflow controller

N/A

Logs from in your workflow's wait container

N/A
@agilgur5 agilgur5 added type/feature Feature request and removed type/bug labels Jan 22, 2024
@agilgur5
Copy link
Contributor

agilgur5 commented Jan 22, 2024

Unsure if this is a bug or by design or whether to label this as an enhancement or bug

I am unable to achieve this because namespace is not rendered by argo when using {metadata.namespace} at the workflow-list scop

The custom links feature for the workflows-list scope doesn't support ${metadata.namespace}, nor any variables for that matter, that's why the example doesn't show any variables. I labeled this as an enhancement as such.

The variable ${metadata.namespace} specifically refers to a k8s resource. For all the other examples, the scope is a page that refers to a specific k8s resource: the workflow scope is for the Workflow Details page which refers to a specific Workflow.

In the Workflows List page, there isn't a specific k8s resource being referred to. We could potentially use the k8s List resource that gets returned from a list call, but that doesn't necessarily have a namespace since you can list at cluster level.

@ressom
Copy link

ressom commented Sep 20, 2024

I ran into this situation just today. Is it possible that a namespace variable could be populated from the client state?

app-router.tsx @ v3.5.10 makes it seem easy to construct a URL to /workflows page. Note how workflowsUrl and namespaceSuffix are defined.

Perhaps only the query params of the workflow-list scoped link should be merged with client state? To be clean a new type that is not as strict as v1alpha1.Link would probably be desired. A well typed implementation kind of scope creeps 🙃

Just throwing out ideas in case someone chooses to tackle this.

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

No branches or pull requests

3 participants