[SYNPY-1913] Added missing grid field - #1465
Merged
Merged
Conversation
andrewelamb
marked this pull request as draft
October 1, 2026 17:40
andrewelamb
marked this pull request as ready for review
October 1, 2026 17:42
BryanFauble
approved these changes
Oct 1, 2026
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:
GridandGridSessionmodels do not capture all fields in the current GridSession REST schema.get_or_create_curator_grid(task_id=...). The raw GET grid session response includessourceEntityVersionNumber(e.g.13), but the returnedGridobject has nosource_entity_version_numberattribute. Thesource_entity_idfield from the same response is captured correctly.synapseclient/models/curation.py(GridSession,Grid,CreateGridRequest).Solution:
source_entity_version_number: Optional[int]field and its docstring toGridSessionandGrid.GridSession.fill_from_dictandGrid.fill_from_dictnow readsourceEntityVersionNumber.CreateGridRequest.fill_grid_session_from_responsenow readssourceEntityVersionNumber.Grid.create_async(attach-to-previous-session path) now copiessource_entity_version_numberfrom the existing session.Grid.create_asyncalso does not copyowner_principal_idorauthorization_mode. This is a separate defect. The raw GET response does not includeauthorizationMode, so copying it could set it toNoneand remove the caller's value. We must find out what the server returns before we fix this in a separate ticket.Testing:
tests/unit/synapseclient/models/async/unit_test_curation_async.py):sourceEntityVersionNumberto the shared_get_grid_session_response()fixture.source_entity_version_numberasserts toTestGrid.test_fill_from_dict,test_create_async_with_record_set_id,test_create_async_attach_to_previous_session,test_list_async, andTestCreateGridRequest.test_fill_grid_session_from_response.tests/integration/synapseclient/models/async/test_grid_async.py):source_entity_version_numberassert next to eachsource_entity_idassert.Nonefor an EntityView source.🤖 Generated with Claude Code