[SYNPY-1437] INCOMPLETE/DRAFT - Start the process to move to use the /bundle2 rest API #1201
Draft
BryanFauble wants to merge 1 commit intodevelopfrom
Draft
[SYNPY-1437] INCOMPLETE/DRAFT - Start the process to move to use the /bundle2 rest API #1201BryanFauble wants to merge 1 commit intodevelopfrom
BryanFauble wants to merge 1 commit intodevelopfrom
Conversation
… entity date. NOTE: This is incomplete, and contains a number of non-working changes. Progress was topped after being blocked due to ticket (PLFM-8313)
BryanFauble
commented
May 12, 2025
Comment on lines
+223
to
+230
| # For creation, parent ID is required | ||
| # TODO: Projects won't have a parent in this case | ||
| # if parent_id: | ||
| # # Add parentId to the entity if not already set | ||
| # if not entity.get("parentId"): | ||
| # entity["parentId"] = parent_id | ||
| # elif not entity.get("parentId"): | ||
| # raise ValueError("Parent ID must be provided for entity creation") |
BryanFauble
commented
May 12, 2025
Comment on lines
+242
to
+243
| # For updates we might need to retrieve the existing entity to merge data | ||
| # Only retrieve if we need |
Member
Author
There was a problem hiding this comment.
update functionality is incomplete
BryanFauble
commented
May 12, 2025
| ) | ||
|
|
||
|
|
||
| async def store_entity( |
Member
Author
There was a problem hiding this comment.
This function is incomplete, more work to support all functionality from the existing synapse class .store() function is needed
BryanFauble
commented
May 12, 2025
| return re_read_required | ||
|
|
||
|
|
||
| async def store_entity_components_file_folder_only( |
Member
Author
There was a problem hiding this comment.
This was a hack to make sure that storing files/folders attached to the project and folder class could still be saved. See the logic for annotations and activity is commented out in this code.
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.
NOTE: This is an incomplete solution. All the changes included here are largely un-tested. Development on this jira stopped when I re-discovered that https://sagebionetworks.jira.com/browse/PLFM-8313 blocks us from being able to move to the
/bundle2rest APIs, as this prevents our ability to forcefully increment entities as available in an API like https://rest-docs.synapse.org/rest/PUT/entity/id.htmlProblem:
Solution:
/bundle2API callsTesting: