-
Notifications
You must be signed in to change notification settings - Fork 41
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
Workflow get request returns unexpected workflow after unlinking subject set from workflow #4104
Comments
Worth checking the browser network panel, when you reload the page, and check |
Hi, I've been experiencing this issue for some time so thought I'd comment with the hopes of helping to prioritize a fix. For some reason, it seems to be getting worse for me and has led to some subject sets being linked / unlinked by mistake to live workflows. Also, this AM I had to really struggle to use the radio buttons and it took refreshing the page several times to get it right. Screen.Recording.2023-01-30.at.11.46.09.AM.mov |
Noting the request to delete a linked subject set from a workflow appears to succeed (i.e. https://panoptes-staging.zooniverse.org/api/workflows/3275/links/subject_sets/4620?http_cache=true&admin=true => status 204), but then immediate subsequent get requests for the workflow (i.e. https://panoptes-staging.zooniverse.org/api/workflows/3275?http_cache=true&admin=true) include So I think initially (before any workflow inconsistency exists),
Nothing new here, reiterating what Cliff notes. I'm not done investigating, but noting what I have for now... |
Tested workflow and subject set linking/unlinking with the
So it appears there's a delay from |
This could be due to the Rails upgrades that have been undergone. Cached_serializer utilizes resource's
We did see something similar in
( |
Closed with #4108 |
[EDIT 2023-02-03 per @mcbouslog ] Originally opened in Panoptes-Front-End. Transferred to panoptes because we believe this might be a workflow caching issue. With a successful request to unlink a subject set from a workflow, the db reflects the link destroyed, but an immediate subsequent get request returns a workflow that still includes the subject set link (unexpected). The same workflow get request 5 minutes later does not include the subject set link (as expected).
Original comment as opened in PFE...
Expected behavior
If you unlink a subject set on the project builder's workflow editor page, the set should no longer be linked and the tick box remain unchecked.
Current behavior
If you unlink a subject set on the project builder's workflow editor page, then reload the page (within ~5 min), the tick box is reticked. However, if you try to untick the box again, a console error appears:
Couldn't find SubjectSet with 'id'=73874 [WHERE "subject_sets_workflows"."workflow_id" = $1]
When simultaneously tracking subject_sets_workflows entries in the Panoptes DB, it appears that the untick action successfully unlinks the subject set, however the cached state of the page has not been updated so the tickbox is re-checked on reload. Interesting, the caching not only affects the project builder web interface, but also the state of the workflow
links
field from the Python client.Also: it appears that if a second subject set is linked, the state is updated -- i.e., the unlinking of the first subject set is correctly reflected on the workflow editor page (and Client/API response) after reload.
Steps to replicate
Additional Comments
It is possible the issue is not one having to do with PFE, but rather Panoptes in how it is caching responses (as evidenced by similar behavior shown by Python Client) -- worth investigating that backend aspect early on.
The text was updated successfully, but these errors were encountered: