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

fix(ui): add query string to workflow detail page. Fixes #11371 #11373

Merged
merged 5 commits into from
Jul 22, 2023

Conversation

toyamagu-2021
Copy link
Member

@toyamagu-2021 toyamagu-2021 commented Jul 17, 2023

Signed-off-by: [email protected] [email protected]

Fixes #11371

Motivation

Modifications

  • Add query string uid to the workflow detail page.
  • Pass uid from the workflow list page.
  • Use uid in the following functions
    • getArchived
    • resubmitArchived

Verification

Resubmit Workflow

  1. Prepare two archived workflows
    image
  2. Successfully opened
    image
  3. Resubmit with changed param
    image

Workflow GC

  1. Create a finite-ttl workflow
    URL: http://localhost:8080/workflows/argo/omniscient-dragon?tab=workflow
    image
  2. Workflow gone by GC
    URL is set to: http://localhost:8080/workflows/argo/omniscient-dragon?tab=summary&uid=4dd0192a-d976-4584-a13b-3e3a8eb196af
    image
  3. Refresh page
    image

@toyamagu-2021 toyamagu-2021 force-pushed the fix-11371 branch 4 times, most recently from 1687b69 to f01053e Compare July 17, 2023 08:37
@@ -352,6 +354,10 @@ export const WorkflowDetails = ({history, location, match}: RouteComponentProps<
);
};
useEffect(() => {
// If a workflow is archived, we don't need watch.
if (isWfInDB) {
Copy link
Member Author

@toyamagu-2021 toyamagu-2021 Jul 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do this here because workflows.watch calls getWorkflow in the serverside, which can cause error described in #11371 .

https://github.com/toyamagu-2021/argo-workflows/blob/b9e5e986c533571cacfc37ee2352c5e6860aa8dd/server/workflow/workflow_server.go#L233

@toyamagu-2021 toyamagu-2021 marked this pull request as ready for review July 17, 2023 09:15
@@ -377,18 +385,19 @@ export const WorkflowDetails = ({history, location, match}: RouteComponentProps<
);
retryWatch.start();
return () => retryWatch.stop();
}, [namespace, name]);
}, [namespace, name, isWfInDB]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you check if different cases for workflow deletion still work as before?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had checked. Do you mean UI interactively changes on the workflow events?
UI displays 'workflow gone' after GC.
image

And I've added a detailed verification in PR.
Don't hesitate to point out to me if some cases missing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant the workflow delete button:

  1. Delete only live workflow
  2. Also delete archived workflow (there will be a checkbox)

Copy link
Member Author

@toyamagu-2021 toyamagu-2021 Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I'm wrong.
The checkbox is not shown because isInCluster=false.

We should call this line but this function throws error described in #11371.
image

Except UI shows error, everything works fine by latest commit.
I'm thinking about a better way to make 'isInCluster=true'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking about a better way to make 'isInCluster=true'

This would depend on #11367 (comment)?

Copy link
Member Author

@toyamagu-2021 toyamagu-2021 Jul 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should depends on a issue.
I'll submit a PR in Friday, or in this weekend.

Copy link
Member Author

@toyamagu-2021 toyamagu-2021 Jul 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As commented below, I checked this point with/without a checkbox.

  • Without checkbox -> delete only live workflow ( Archived -> Persisted )
  • With checkbox -> delete live workflow and archived workflow

@terrytangyuan
Copy link
Member

terrytangyuan commented Jul 17, 2023

Workflow gone by GC

The workflow can still be displayed since an archived workflow still exists, right?

@terrytangyuan
Copy link
Member

@toyamagu-2021 I saw your thumbs-up to my comments and just wondering if that means "I have tested and everything looks good" or "I will be testing it".

@toyamagu-2021
Copy link
Member Author

toyamagu-2021 commented Jul 18, 2023

@terrytangyuan
Sorry to forget to reply.

  1. fix(ui): add query string to workflow detail page. Fixes #11371 #11373 (comment)
    Yes, I've tested and everything looks good

@terrytangyuan
Copy link
Member

terrytangyuan commented Jul 21, 2023

Let me know when this is ready for another review once you've done testing on the scenarios we discussed before.

@toyamagu-2021
Copy link
Member Author

OK, I had some refactoring and additional following checks on the delete button.

  • Not archiving -> no checkbox
  • Archived -> with checkbox
  • Persisted -> no checkbox

@terrytangyuan terrytangyuan merged commit 5cb75d9 into argoproj:master Jul 22, 2023
@toyamagu-2021 toyamagu-2021 deleted the fix-11371 branch July 22, 2023 04:20
@agilgur5 agilgur5 changed the title fix: add query string to workflow detail page(#11371) fix(ui): add query string to workflow detail page. Fixes #11371 Sep 27, 2024
@agilgur5 agilgur5 added this to the v3.5.0 milestone Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.5 Pre-release: UI crashes when thare are archived workflows which has same name and namespace.
3 participants