Skip to content

[SYNPY-1437] INCOMPLETE/DRAFT - Start the process to move to use the /bundle2 rest API #1201

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

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

BryanFauble
Copy link
Member

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 /bundle2 rest 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.html

Problem:

Solution:

  • Starts the process to implement all of the required logic to point the storing of all entities at the /bundle2 API calls
  • Start to drop all usage of the core (And soon to be deprecated/removed) Synapse class functionality in favor or dedicated API call functions

Testing:

  • TODO

… 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)
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")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be addressed

Comment on lines +242 to +243
# For updates we might need to retrieve the existing entity to merge data
# Only retrieve if we need
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update functionality is incomplete

Folder,
Project,
Table,
)


async def store_entity(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is incomplete, more work to support all functionality from the existing synapse class .store() function is needed

@@ -120,6 +120,77 @@ async def store_entity_components(
return re_read_required


async def store_entity_components_file_folder_only(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant