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(client): do not crash the UI when showing all workflows #2502

Merged
merged 3 commits into from
Apr 28, 2023

Conversation

leafty
Copy link
Member

@leafty leafty commented Apr 27, 2023

The workflows list passed from RTK query is read-only, but we call .sort() to order the workflow list. As a fix, we simply copy the list into a new array when we list all workflows ("show inactive workflows" toggle).

Fixes #2488.

/deploy #persist #cypress

@leafty leafty force-pushed the leafty/2488-fix-workflows-unfiltered branch from 89e1ac2 to 688b08b Compare April 27, 2023 14:16
@leafty leafty marked this pull request as ready for review April 27, 2023 14:16
@leafty leafty requested a review from a team as a code owner April 27, 2023 14:16
@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-ui-2502.dev.renku.ch

@leafty leafty force-pushed the leafty/2488-fix-workflows-unfiltered branch from 688b08b to 39398ab Compare April 27, 2023 14:18
@leafty leafty temporarily deployed to renku-ci-ui-2502 April 27, 2023 14:18 — with GitHub Actions Inactive
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Simple and effective 👌

@leafty leafty temporarily deployed to renku-ci-ui-2502 April 27, 2023 15:15 — with GitHub Actions Inactive
@leafty leafty force-pushed the leafty/2488-fix-workflows-unfiltered branch from 3f1be96 to a429f95 Compare April 28, 2023 06:56
@leafty leafty force-pushed the leafty/2488-fix-workflows-unfiltered branch from a429f95 to a72a2c1 Compare April 28, 2023 07:00
@leafty leafty force-pushed the leafty/2488-fix-workflows-unfiltered branch from a72a2c1 to 5a0902f Compare April 28, 2023 07:01
@leafty leafty temporarily deployed to renku-ci-ui-2502 April 28, 2023 07:06 — with GitHub Actions Inactive
@leafty leafty deployed to renku-ci-ui-2502 April 28, 2023 08:15 — with GitHub Actions Active
@leafty leafty requested a review from lorenzo-cavazzi April 28, 2023 09:25
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Thanks for adding the tests!

@leafty leafty merged commit 0a51cd1 into master Apr 28, 2023
@leafty leafty deleted the leafty/2488-fix-workflows-unfiltered branch April 28, 2023 10:51
@RenkuBot
Copy link
Contributor

Tearing down the temporary RenkuLab deplyoment for this PR.

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

Successfully merging this pull request may close these issues.

Toggling active/inactive workflows crashes the ui
3 participants