Feature #18692
closedFrozen projects workbench support
Added by Peter Amstutz almost 3 years ago. Updated about 2 years ago.
100%
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
Updated by Peter Amstutz almost 3 years ago
- Blocked by Feature #18691: Frozen project support added
Updated by Peter Amstutz almost 3 years ago
- Target version changed from 2022-03-02 sprint to 2022-03-16 sprint
Updated by Peter Amstutz almost 3 years ago
- Target version changed from 2022-03-16 sprint to 2022-03-30 Sprint
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-03-30 Sprint to 2022-04-13 Sprint
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-04-13 Sprint to 2022-04-27 Sprint
Updated by Peter Amstutz over 2 years ago
- Status changed from New to In Progress
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-04-27 Sprint to 2022-05-11 sprint
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-05-11 sprint to 2022-05-25 sprint
Updated by Daniel Kutyła over 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
Updated by Peter Amstutz over 2 years ago
- Target version set to 2022-05-25 sprint
Updated by Peter Amstutz over 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.
Updated by Peter Amstutz over 2 years ago
- Related to Feature #19146: Return can_manage and can_write alongside writable_by added
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-05-25 sprint to 2022-06-08 sprint
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-06-08 sprint to 2022-06-22 Sprint
Updated by Peter Amstutz over 2 years ago
- Related to Story #18390: Frozen projects added
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-06-22 Sprint to 2022-07-06
Updated by Daniel Kutyła over 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
Updated by Peter Amstutz over 2 years ago
- File Screenshot from 2022-06-30 16-44-17.png Screenshot from 2022-06-30 16-44-17.png added
- File Screenshot from 2022-06-30 16-45-22.png Screenshot from 2022-06-30 16-45-22.png added
- File Screenshot from 2022-06-30 16-51-27.png Screenshot from 2022-06-30 16-51-27.png added
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-supportUsage 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
orcan_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:
Updated by Peter Amstutz over 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.
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-07-06 to 2022-07-20
Updated by Daniel Kutyła over 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.
Updated by Daniel Kutyła over 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
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-07-20 to 2022-08-03 Sprint
Updated by Peter Amstutz over 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"}}
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-08-03 Sprint to 2022-08-17 sprint
Updated by Daniel Kutyła over 2 years 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:
Updated by Peter Amstutz over 2 years ago
- File Screenshot from 2022-08-12 16-12-17.png Screenshot from 2022-08-12 16-12-17.png added
- File Screenshot from 2022-08-02 10-15-41.png added
18692-frozen-projects-workbench-support @ arvados-workbench2|792a75702b6208c328d67c39b0f107e9dff0417e
I am still seeing the "Edit" button on the info panel:
Updated by Peter Amstutz over 2 years ago
and here:
Updated by Peter Amstutz over 2 years 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.
Updated by Peter Amstutz over 2 years ago
- File Screenshot from 2022-08-12 16-34-36.png added
Updated by Peter Amstutz over 2 years ago
The picker allowing me to pick frozen projects (the "OK" button is enabled)
Updated by Peter Amstutz over 2 years ago
- File deleted (
Screenshot from 2022-08-12 16-34-36.png)
Updated by Peter Amstutz over 2 years ago
- File deleted (
Screenshot from 2022-08-02 10-15-41.png)
Updated by Peter Amstutz over 2 years 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.
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-08-17 sprint to 2022-08-31 sprint
Updated by Daniel Kutyła over 2 years 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
Updated by Peter Amstutz over 2 years ago
- File Screenshot from 2022-08-25 17-20-13.png Screenshot from 2022-08-25 17-20-13.png added
- File Screenshot from 2022-08-25 17-19-44.png Screenshot from 2022-08-25 17-19-44.png added
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:
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-08-31 sprint to 2022-09-14 sprint
Updated by Daniel Kutyła over 2 years 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
Updated by Peter Amstutz over 2 years ago
- Target version changed from 2022-09-14 sprint to 2022-09-28 sprint
Updated by Peter Amstutz over 2 years ago
18692-frozen-projects-workbench-support @ commit: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.
Updated by Peter Amstutz about 2 years ago
- Target version changed from 2022-09-28 sprint to 2022-10-12 sprint
Updated by Daniel Kutyła about 2 years 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
Updated by Peter Amstutz about 2 years ago
- Target version changed from 2022-10-12 sprint to 2022-10-26 sprint
Updated by Daniel Kutyła about 2 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados-workbench2|b04ed9ad5145bf8335cc5749b3d2f0ac166ef60f.