[SYNPY-1760] Add ability to link Grid to CurationTask#1383
Open
andrewelamb wants to merge 79 commits into
Open
[SYNPY-1760] Add ability to link Grid to CurationTask#1383andrewelamb wants to merge 79 commits into
andrewelamb wants to merge 79 commits into
Conversation
linglp
approved these changes
May 25, 2026
Contributor
linglp
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the fixes!
andrewelamb
commented
May 26, 2026
|
|
||
| if not self.task_properties: | ||
| await self.get_async(synapse_client=synapse_client) | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Should this always do get_async to ensure the CurationTask exists?
andrewelamb
commented
May 26, 2026
thomasyu888
reviewed
May 28, 2026
thomasyu888
reviewed
May 28, 2026
thomasyu888
reviewed
May 29, 2026
Comment on lines
+1089
to
+1091
| "taskProperties was not found in the Synapse response for this CurationTask. " | ||
| "This means it is likely an older CurationTask from before taskProperties was added. " | ||
| "It is recommended that this task be deleted: task.delete(delete_source=False)" |
Member
There was a problem hiding this comment.
Add to the message to recreate the task with the existing source entity
thomasyu888
reviewed
May 29, 2026
| await self.set_active_grid_session_async( | ||
| active_session_id=grid.session_id, synapse_client=synapse_client | ||
| ) | ||
| except Exception: |
Member
There was a problem hiding this comment.
This should probably be the one that catches the 412 error. Should we have a "finally" clause to delete the grid sesison for all other errors on this active grid session command?
thomasyu888
reviewed
May 29, 2026
Comment on lines
+1754
to
+1767
| try: | ||
| await self.set_active_grid_session_async( | ||
| active_session_id=grid.session_id, synapse_client=synapse_client | ||
| ) | ||
| except Exception: | ||
| try: | ||
| await grid.delete_async(synapse_client=synapse_client) | ||
| except Exception: | ||
| Synapse.get_client(synapse_client=synapse_client).logger.warning( | ||
| "Failed to delete orphan grid session %s after status " | ||
| "update failure; manual cleanup may be required.", | ||
| grid.session_id, | ||
| ) | ||
| raise |
Member
There was a problem hiding this comment.
Add a comment
- There can only be one grid session that is active, but there can be multiple grid sessions. So multiple users running this command may run into the 412 error.
thomasyu888
approved these changes
May 29, 2026
Member
There was a problem hiding this comment.
🔥 LGTM! just some minor comments, and will defer to @BryanFauble for a final pass next sprint for the code and @cconrad8 on the documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
Solution:
Added these methods to
CurationTask:get_statusupdate_statusset_active_grid_sessionset_task_state_asynccreate_grid_session_asyncAdded
owner_principal_idtoGridSeparated Curator docs into one for data managers and one for contributors
Testing:
All new methods have unit and integration tests