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

[Pre-release] UI crashes when thare are archived workflows which has same name and namespace. #11371

Closed
3 tasks done
toyamagu-2021 opened this issue Jul 16, 2023 · 5 comments · Fixed by #11373
Closed
3 tasks done
Labels
area/ui P1 High priority. All bugs with >=5 thumbs up that aren’t P0, plus: Any other bugs deemed high priority type/bug

Comments

@toyamagu-2021
Copy link
Member

toyamagu-2021 commented Jul 16, 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 you expected to happen?

Behaviour

  • UI crashes when there are archived workflows that have the same name and namespace.

To reproduce

  • Create two archived workflow which has the same name.
  • Open a workflow detail page.
  • image
  • image

Cause

To resolve

Version

master

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
@terrytangyuan
Copy link
Member

The existing workflow with the same name+namespace should be deleted before submitting another one. Perhaps when performing resubmit, we should delete the existing one first?

@toyamagu-2021
Copy link
Member Author

toyamagu-2021 commented Jul 16, 2023

I think this issue does not relate to resubmitting itself.
ArchivedWorkflow should be queried by uid from ui, right?
Currently, that is queried by only name and namespace.
Therefore, the error is raised when DB has multiple workflows which has the same name.

Before v3.4.8, the above situations work well because archived workflow is queried by following.

    get(uid: string, namespace: string) {
        if (namespace === '') {
            return requests.get(`api/v1/archived-workflows/${uid}`).then(res => res.body as models.Workflow);
        } else {
            return requests.get(`api/v1/archived-workflows/${uid}?namespace=${namespace}`).then(res => res.body as models.Workflow);
        }
    },

(Forgive me if I terribly taken something wrong)

@terrytangyuan
Copy link
Member

Support for get archived workflow by name+namespace is added in #11055. The assumption of using that is users would avoid submitting duplicate workflows. Perhap in the UI, we can stick with querying archived workflow by UID. Would you like to give that a try?

@JPZ13
Copy link
Member

JPZ13 commented Jul 20, 2023

@terrytangyuan and @toyamagu-2021 - given #11055 and UID querying, should we close this issue?

@terrytangyuan
Copy link
Member

This will be fixed in #11373

@terrytangyuan terrytangyuan added the P1 High priority. All bugs with >=5 thumbs up that aren’t P0, plus: Any other bugs deemed high priority label Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui P1 High priority. All bugs with >=5 thumbs up that aren’t P0, plus: Any other bugs deemed high priority type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants