-
Notifications
You must be signed in to change notification settings - Fork 0
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
Upadted dict handling for metadata #147
Conversation
src/shared/functions.py
Outdated
logger.info(f"### Updating metadata {meta_type}") | ||
logger.info(f"{study} {data_package} {version}") | ||
logger.info(f"Key: {target} Value: {value}") | ||
logger.info(f"Pre-update size: {len(metadata.keys)}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I actually catch this? well, we'll see. This logging is in here to hopefully create some breadcrumbs. Should be temporary.
src/shared/functions.py
Outdated
version, TRANSACTION_METADATA_TEMPLATE | ||
version, copy.deepcopy(TRANSACTION_METADATA_TEMPLATE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this kind of tricky nuance repeated multiple times gives me pause - maybe make a utility function like _update_metadata
that takes some args, I dunno. Or just leave it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all three stages do something :slightly: different, but i could try to bundle this up a bit better/make it more readable
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
This updates metadata writing to make explicit copies of templates.
In cases where the session is not fully terminated, this resulted in some by ref passing behavior, where the templates would be modified in place and then persist data into the next update operation. This affected unit tests, and :might: have affected lambda behavior as well.
Also made tests of the write process coming in from the S3 manager class much more robust.