argo-workflows icon indicating copy to clipboard operation
argo-workflows copied to clipboard

Executing workflows in the UI unexpectedly uses the namespace last selected in the UI

Open asfaltboy opened this issue 3 years ago • 2 comments

Checklist

  • [x] Double-checked my configuration.
  • [ ] Tested using the latest version. -- looking to upgrade soon
  • [x] Used the Emissary executor.

Summary

The issue can be summarised as 3 distinct behaviours:

  1. Executing workflows in the UI unexpectedly uses the namespace last selected in the UI, e.g set by filtering workflow list in the by the namespace field (possibly introduced in #2441).

  2. There seems to be no way to specify a namespace in the UI for a ClusterWorkflowTemplate without a namespace defined in the manifest yaml (at least I could not find one, please correct me if I'm wrong). So, the problem described in (1) above seems to be the only workaround for this missing feature (see step-by-step instructions below for an example).

  3. Submitting a workflow from the "Workflows" UI page does allow selecting the workflow namespace, but this action also seems to "select a namespace" same as filtering by namespace in the UI described in (1).

I think this behaviour in (3) may be desired. But, I think that it, along with the feature mentioned in (1) should probably be documented as well. Not sure about (2), how come we're not allowing to set namespace in CWTs? Please let me know if anything in the descriptions seems wrong.

We're running argo workflows version 3.2.4

Diagnostics

Workflow yaml (copy pasted from the docs, not tested this particular workflow myself, but should work the same I reckon):

apiVersion: argoproj.io/v1alpha1
kind: ClusterWorkflowTemplate
metadata:
  name: cluster-workflow-template-whalesay-template
spec:
  templates:
  - name: whalesay-template
    inputs:
      parameters:
      - name: message
    container:
      image: docker/whalesay
      command: [cowsay]
      args: ["{{inputs.parameters.message}}"]

Step-by-step instructions:

  1. Have a ClusterWorkflowTemplate with no namespace defined, let's call it "my-workflow".
  2. Use the Workflows -> +Submit workflow action to create the "argosay" example workflow, in the default namespace
  3. Use the Cluster Workflow Templates -> Create New Cluster Workflow Template action to create an instance of "my-workflow" template. Result: it runs in the default namespace.
  4. Repeat step 2, but use workflows namespace
  5. Repeat step 3. Result: it runs in the workflows namespace.

Additional discussion is in the thread here: https://cloud-native.slack.com/archives/C01QW9QSSSK/p1660849688488899

NOTE: will add logs when I'm back in office.

# Logs from the workflow controller:
kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

# If the workflow's pods have not been created, you can skip the rest of the diagnostics.

# The workflow's pods that are problematic:
kubectl get pod -o yaml -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded

# Logs from in your workflow's wait container, something like:
kubectl logs -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded

Message from the maintainers:

Impacted by this regression? Give it a 👍. We prioritise the issues with the most 👍.

asfaltboy avatar Aug 29 '22 09:08 asfaltboy

I've no comment on this issue. Someone needs to start up the UI and start debugging.

alexec avatar Sep 05 '22 20:09 alexec

Hey @alexec @asfaltboy can you please assign me this project,I would like to work on this.

ravitejasssihl avatar Sep 10 '22 06:09 ravitejasssihl

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is a mentoring request, please provide an update here. Thank you for your contributions.

stale[bot] avatar Oct 01 '22 06:10 stale[bot]

This issue has been closed due to inactivity. Feel free to re-open if you still encounter this issue.

stale[bot] avatar Oct 16 '22 00:10 stale[bot]