Project

General

Profile

Actions

Feature #18692

closed

Frozen projects workbench support

Added by Peter Amstutz about 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Story points:
-
Release relationship:
Auto

Description

In workbench 2, implement features described in #18390

write tests

From customer:

wb2 should perform client-side check if FreezeProjectRequiresDescription and FreezeProjectRequiresProperties are set.

Related: I also noticed a bug where if a collection is not writable, it still offers the "Remove" and "Rename" actions on the files, but they give an error if you use them. These should be hidden when the collection is read-only.


Files


Subtasks 1 (0 open1 closed)

Task #18877: Review 18692-frozen-projects-workbench-supportResolvedDaniel Kutyła05/19/2022Actions

Related issues

Related to Arvados - Feature #19146: Return can_manage and can_write alongside writable_byResolvedTom Clegg06/07/2022Actions
Related to Arvados Epics - Idea #18390: Frozen projectsResolved03/01/202207/31/2022Actions
Blocked by Arvados - Feature #18691: Frozen project supportResolvedTom Clegg03/08/2022Actions
Actions #1

Updated by Peter Amstutz about 2 years ago

Actions #2

Updated by Peter Amstutz about 2 years ago

  • Description updated (diff)
Actions #3

Updated by Peter Amstutz about 2 years ago

  • Target version changed from 2022-03-02 sprint to 2022-03-16 sprint
Actions #4

Updated by Peter Amstutz about 2 years ago

  • Target version changed from 2022-03-16 sprint to 2022-03-30 Sprint
Actions #5

Updated by Peter Amstutz about 2 years ago

  • Target version changed from 2022-03-30 Sprint to 2022-04-13 Sprint
Actions #6

Updated by Peter Amstutz about 2 years ago

  • Target version changed from 2022-04-13 Sprint to 2022-04-27 Sprint
Actions #7

Updated by Peter Amstutz about 2 years ago

  • Status changed from New to In Progress
Actions #8

Updated by Peter Amstutz about 2 years ago

  • Description updated (diff)
Actions #9

Updated by Peter Amstutz almost 2 years ago

  • Target version changed from 2022-04-27 Sprint to 2022-05-11 sprint
Actions #10

Updated by Peter Amstutz almost 2 years ago

  • Target version changed from 2022-05-11 sprint to 2022-05-25 sprint
Actions #11

Updated by Daniel Kutyła almost 2 years ago

  • Target version deleted (2022-05-25 sprint)

New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/f1158a80eae96784f909ad496487f5604fe95329
Test run: developer-tests-workbench2: #686
Branch: 18692-frozen-projects-workbench-support

First implementation of frozen project support

Actions #12

Updated by Peter Amstutz almost 2 years ago

  • Target version set to 2022-05-25 sprint
Actions #13

Updated by Peter Amstutz almost 2 years ago

18692-frozen-projects-workbench-support @ arvados-workbench2|f1158a80eae96784f909ad496487f5604fe95329

describe.only('Frozen projects', () => {

Need to remove the '.only' before you merge it

Functional comments:

  • We called the feature "Frozen Projects" but the UI you added says "Lock project" and "Unlock project". Remind me if we discussed using a different word or did you just decide to change it?
  • There's an icon in the parent listing that indicates a project is frozen. However, when you are viewing the project itself, there is nothing to indicate it is frozen. Maybe add the icon next to the project name in the breadcrumbs?
  • If I try to freeze a project and it is rejected, I get a big red error snackbar with no formatting, which is very hard to read. Since validation errors are normal, either the error needs to be rendered better, or wb2 should perform its own a client-side check if FreezeProjectRequiresDescription and FreezeProjectRequiresProperties are set.
  • If the config key "API.UnfreezeProjectRequiresAdmin" is "false", regular users which have "can_manage" permission should be able to unfreeze a project.
  • The right-side info/details panel includes an "EDIT" button even when the project is frozen.
    • Attempting to edit and then save the project details results in an error and then the dialog is stuck in an infinite spinner (this basically locks up the app, it has to be reloaded).
    • This bug exists in the case of regular read-only project sharing as well (i.e. not frozen but still read-only for me, I see an edit button), it probably needs to check for write permission before rendering the edit button.
  • The context/action menu for frozen projects is missing "Share" and (for admins) "Add to public favorites" both of which are still valid operations.

It's clear several of these bugs are due to the fact that "writable_by" is empty and we don't indicate "managed_by" separately, so Workbench 2 doesn't have a good way of knowing the correct level of permission for a user looking at a frozen project. I've added #19146 to address this, so we might have to do that before some of the issues above can be fixed.

Actions #14

Updated by Peter Amstutz almost 2 years ago

  • Related to Feature #19146: Return can_manage and can_write alongside writable_by added
Actions #15

Updated by Peter Amstutz almost 2 years ago

  • Target version changed from 2022-05-25 sprint to 2022-06-08 sprint
Actions #16

Updated by Peter Amstutz almost 2 years ago

  • Description updated (diff)
Actions #17

Updated by Peter Amstutz almost 2 years ago

  • Target version changed from 2022-06-08 sprint to 2022-06-22 Sprint
Actions #18

Updated by Peter Amstutz almost 2 years ago

Actions #19

Updated by Peter Amstutz almost 2 years ago

  • Target version changed from 2022-06-22 Sprint to 2022-07-06
Actions #20

Updated by Daniel Kutyła almost 2 years ago

New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/5a2f4597393f94b9fa7984f4445d4b599c139f27
Test run: developer-tests-workbench2: #767
Branch: 18692-frozen-projects-workbench-support

Usage of config added

Actions #21

Updated by Peter Amstutz almost 2 years ago

Daniel Kutyła wrote in #note-20:

New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/5a2f4597393f94b9fa7984f4445d4b599c139f27
Test run: developer-tests-workbench2: #767
Branch: 18692-frozen-projects-workbench-support

Usage of config added

  • Important note: My first pass, I am doing all this as an admin user.
  • The text says "freeze" now, but it is still using a "lock" icon. Could we use some variation of the snowflake instead?
    <i class="fa-solid fa-snowflake"></i>
    

    For the "unfreeze" operation, we could combine it with a strikeout glyph (I believe Lucas did something like this to create a "read only" icon)
  • I get an error if I try to un-freeze the project, but I am an admin. I will investigate if this is a server-side issue, or there's an issue with the API call you are using.
  • The items inside the frozen project are still offering editing options as if they were writable

  • The collection page is also offering to upload data
  • Collection records don't include can_write or can_manage, so you should use the values from the parent project when deciding what operations to offer.

  • If I try to edit a frozen project (changing the name), I get an error and then after I dismiss the error, I am stuck at a dialog box I can't dismiss

Looking more closely, I made several notes about edit operations being present that shouldn't be in my previous note, it doesn't seem that you addressed them:

https://dev.arvados.org/issues/18692#note-13

Actions #22

Updated by Peter Amstutz almost 2 years ago

I tried to unfreeze the project from the breadcrumbs, that didn't work.

Then I went to the parent project, and tried to unfreeze it from there. That did work.

Then I tried to re-freeze the project.

An error flashed past very quickly, and then I got a crash page.

I checked the console:

Backend error:
Object { errors: (1) […], status: 422 }
errors: Array [ "//railsapi.internal/arvados/v1/groups/x2os0-j7d0g-kmzrv7g9ipvd7ew: 422 Unprocessable Entity: Frozen by uuid can only be set if description is non-empty (req-lr5kw5rg51x71t5wfjz3); Frozen by uuid can only be set if properties[property1] value is non-empty (req-lr5kw5rg51x71t5wfjz3); Frozen by uuid can only be set if properties[property2] value is non-empty (req-lr5kw5rg51x71t5wfjz3)" ]

This error is actually correct (I have my dev API server configured so that frozen projects must have "property1" and "property2") but for workbench2 to crash on the error is obviously not correct.

Actions #23

Updated by Peter Amstutz almost 2 years ago

  • Target version changed from 2022-07-06 to 2022-07-20
Actions #24

Updated by Daniel Kutyła almost 2 years ago

New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/1b7a371a20a0ce0f4811e1b58222f1d837b62337
Test run: developer-tests-workbench2: #808
Branch: 18692-frozen-projects-workbench-support

Replaced icons, fixed context menu confusion

Crossed elements have been addressed

describe.only('Frozen projects', () => {
Need to remove the '.only' before you merge it

Functional comments:

- * We called the feature "Frozen Projects" but the UI you added says "Lock project" and "Unlock project". Remind me if we discussed using a different word or did you just decide to change it? -

- * There's an icon in the parent listing that indicates a project is frozen. However, when you are viewing the project itself, there is nothing to indicate it is frozen. Maybe add the icon next to the project name in the breadcrumbs?-

  • If I try to freeze a project and it is rejected, I get a big red error snackbar with no formatting, which is very hard to read. Since validation errors are normal, either the error needs to be rendered better, or wb2 should perform its own a client-side check if FreezeProjectRequiresDescription and FreezeProjectRequiresProperties are set.

- * If the config key "API.UnfreezeProjectRequiresAdmin" is "false", regular users which have "can_manage" permission should be able to unfreeze a project.-

- * The right-side info/details panel includes an "EDIT" button even when the project is frozen.-
- * Attempting to edit and then save the project details results in an error and then the dialog is stuck in an infinite spinner (this basically locks up the app, it has to be reloaded).-
- *
This bug exists in the case of regular read-only project sharing as well (i.e. not frozen but still read-only for me, I see an edit button), it probably needs to check for write permission before rendering the edit button.-

- * The context/action menu for frozen projects is missing "Share" and (for admins) "Add to public favorites" both of which are still valid operations.-

  • I get an error if I try to un-freeze the project, but I am an admin. I will investigate if this is a server-side issue, or there's an issue with the API call you are using.

* The items inside the frozen project are still offering editing options as if they were writable

  • This error is actually correct (I have my dev API server configured so that frozen projects must have "property1" and "property2") but for workbench2 to crash on the error is obviously not correct.
Actions #25

Updated by Daniel Kutyła almost 2 years ago

Formatting did not worked as expected so please be aware that lines with - at the beginning and the end should be visible as crossed ones

Actions #26

Updated by Peter Amstutz almost 2 years ago

  • Target version changed from 2022-07-20 to 2022-08-03 Sprint
Actions #27

Updated by Peter Amstutz almost 2 years ago

Tested with both an admin account, and a non-admin account.

  • If I try to freeze a project and it is rejected, I get a big red error snackbar with no formatting, which is very hard to read. Since validation errors are normal, either the error needs to be rendered better, or wb2 should perform its own a client-side check if FreezeProjectRequiresDescription and FreezeProjectRequiresProperties are set.

It no longer crashes on error. I see you indicated that you did not yet address better error formatting/client side checking, but you didn't say why. Do you need one of the Arvados dev clusters configured to test this particular feature?

  • After freezing a project, the UI did not update to reflect that the project was now frozen. It did not display the "frozen" icon in the snackbar and it still offered the "Freeze project" menu item, not "Unfreeze project". After reloading the whole application, the correct state was shown.
  • Going to a Collection in a frozen project correctly does not offer editing actions like changing name/description. However, as both admin and a regular user, the file panel still offers "Upload" "Remove" and "Rename" actions even though they don't work.
  • The right-side info/details panel includes an "EDIT" button even when the project is frozen.
  • Attempting to edit and then save the project details results in an error and then the dialog is stuck in an infinite spinner (this basically locks up the app, it has to be reloaded).

You indicated you addressed both of these, but as both an admin and a regular user, I am still seeing an EDIT button on the details panel for both Projects and Collection. The Project edit dialog still gets stuck at an infinite spinner if you try to save and get an error. The Collection edit dialog correctly closes after the error.

  • There is a picking dialog which is supposed to only allow you to pick writable projects, but it includes frozen projects that are not writable.
  • Minor inconsistency: the data table shows the snowflake icon after the name, the breadcrumbs show it before the name, and the left hand tree view doesn't show the snowflake at all. Could we have the snowflake show up consistently after the name in all 3 places?
  • The "Unfreeze" API call is supposed to put "null" in "frozen_by_uuid" but when I checked in the browser debug tools it is doing the same thing as the "freeze" operation, which is wrong:

{"group":{"frozen_by_uuid":"x2os0-tpzed-c5ey1sy2t4fs91o"}}

Actions #28

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2022-08-03 Sprint to 2022-08-17 sprint
Actions #29

Updated by Daniel Kutyła over 1 year ago

New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/792a75702b6208c328d67c39b0f107e9dff0417e
Test run: developer-tests-workbench2: #848
Branch: 18692-frozen-projects-workbench-support

Fixed collection tests

If I try to freeze a project and it is rejected, I get a big red error snackbar with no formatting, which is very hard to read. Since validation errors are normal, either the error needs to be rendered better, or wb2 should perform its own a client-side check if FreezeProjectRequiresDescription and FreezeProjectRequiresProperties are set.

After freezing a project, the UI did not update to reflect that the project was now frozen. It did not display the "frozen" icon in the snackbar and it still offered the "Freeze project" menu item, not "Unfreeze project". After reloading the whole application, the correct state was shown.

Going to a Collection in a frozen project correctly does not offer editing actions like changing name/description. However, as both admin and a regular user, the file panel still offers "Upload" "Remove" and "Rename" actions even though they don't work.

The right-side info/details panel includes an "EDIT" button even when the project is frozen.

Attempting to edit and then save the project details results in an error and then the dialog is stuck in an infinite spinner (this basically locks up the app, it has to be reloaded).

There is a picking dialog which is supposed to only allow you to pick writable projects, but it includes frozen projects that are not writable.

Minor inconsistency: the data table shows the snowflake icon after the name, the breadcrumbs show it before the name, and the left hand tree view doesn't show the snowflake at all. Could we have the snowflake show up consistently after the name in all 3 places?

The "Unfreeze" API call is supposed to put "null" in "frozen_by_uuid" but when I checked in the browser debug tools it is doing the same thing as the "freeze" operation, which is wrong:

Actions #30

Updated by Peter Amstutz over 1 year ago

18692-frozen-projects-workbench-support @ arvados-workbench2|792a75702b6208c328d67c39b0f107e9dff0417e

I am still seeing the "Edit" button on the info panel:

Actions #32

Updated by Peter Amstutz over 1 year ago

If I try to freeze a project and it is rejected, I get a big red error snackbar with no formatting, which is very hard to read. Since validation errors are normal, either the error needs to be rendered better, or wb2 should perform its own a client-side check if FreezeProjectRequiresDescription and FreezeProjectRequiresProperties are set.

Actions #33

Updated by Peter Amstutz over 1 year ago

  • File Screenshot from 2022-08-12 16-34-36.png added
Actions #34

Updated by Peter Amstutz over 1 year ago

The picker allowing me to pick frozen projects (the "OK" button is enabled)

Actions #35

Updated by Peter Amstutz over 1 year ago

  • File deleted (Screenshot from 2022-08-12 16-34-36.png)
Actions #36

Updated by Peter Amstutz over 1 year ago

  • File deleted (Screenshot from 2022-08-02 10-15-41.png)
Actions #37

Updated by Peter Amstutz over 1 year ago

I think the last one (the picker that is only supposed to show writable projects) is a stale cache issue.

Likely the project picker tree has its own state, which is probably not being refreshed or invalidated. At minimum, it should probably reset the state whenever the picker is opened.

Actions #38

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2022-08-17 sprint to 2022-08-31 sprint
Actions #39

Updated by Daniel Kutyła over 1 year ago

New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/1b7a371a20a0ce0f4811e1b58222f1d837b62337
Test run: developer-tests-workbench2: #852
Branch: 18692-frozen-projects-workbench-support

Fixed project tree caching issue, details editing issue and error formatting issue

Actions #40

Updated by Peter Amstutz over 1 year ago

Reviewing 18692-frozen-projects-workbench-support @ arvados-workbench2|13bd71d79228da81b056690bd4eb815943d3376b

Getting closer. Things are overall working much better. The info panels are correct, the context menu is correct, the file browser is correct, and things seem to be correctly responsive to toggling the frozen state on/off for a project.

Unfortunately, the project picker is still showing frozen projects:

But now the behavior seems to be more broken than before, when I click on "To freeze" or any other project, it seems to be selected (the "OK" button is now enabled), but the whole panel rolls up, losing my state:

Actions #41

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2022-08-31 sprint to 2022-09-14 sprint
Actions #42

Updated by Daniel Kutyła over 1 year ago

New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/eab690e6ffa57a59f86dbc4e532de032f93941bd
Test run: developer-tests-workbench2: #872
Branch: 18692-frozen-projects-workbench-support

File/Project picker changes

Unfortunately, the project picker is still showing frozen projects:
But now the behavior seems to be more broken than before, when I click on "To freeze" or any other project, it seems to be selected (the "OK" button is now enabled), but the whole panel rolls up, losing my state

Actions #43

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2022-09-14 sprint to 2022-09-28 sprint
Actions #44

Updated by Peter Amstutz over 1 year ago

18692-frozen-projects-workbench-support @ eab690e6ffa57a59f86dbc4e532de032f93941bd

  • You need to merge main again
  • cypress/integration/collection.spec.js
    test has "only"
  • cypress/integration/group-manage.spec.js
    test is skipped
  • Other than that, I tested the actual frozen project functionality and couldn't find anything wrong, so this is looking very good! Just merge main, fix & re-run the tests and I think we'll be good to call this done.
Actions #45

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2022-09-28 sprint to 2022-10-12 sprint
Actions #46

Updated by Daniel Kutyła over 1 year ago

New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/0fe46e98492f3ed893eaca1cea7dcff34d8283e4
Test run: developer-tests-workbench2: developer-tests-workbench2: #952
Branch: 18692-frozen-projects-workbench-support

Fixed flaky tests

Actions #47

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2022-10-12 sprint to 2022-10-26 sprint
Actions #48

Updated by Peter Amstutz over 1 year ago

LGTM

Actions #49

Updated by Daniel Kutyła over 1 year ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved
Actions #50

Updated by Peter Amstutz over 1 year ago

  • Release set to 47
Actions

Also available in: Atom PDF