-
Notifications
You must be signed in to change notification settings - Fork 64
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
U/kkasp/tron 2239 migrate pickle only state to json #1016
U/kkasp/tron 2239 migrate pickle only state to json #1016
Conversation
…le and all pickles
…output failures to file
dump_json_key(source_table, key) | ||
|
||
|
||
def delete_keys(source_table: ServiceResource, keys: List[str]) -> None: |
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.
Based on discussion with @nemacysts and @EmanElsaban we can probably do something here where we look for jobs that Tron doesn't know about and use that as the test for a valid delete
tools/pickles_to_json.py
Outdated
delete_keys_parser.add_argument( | ||
"--dry-run", | ||
action="store_true", | ||
help="Simulate the deletion without making any changes to the DynamoDB table", | ||
) |
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.
i'm personally a fan of dry-run by default, but that's just me :p
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.
Good call.
I took the easier (lazy) path here with an --execute flag and just passed not args.execute
to the existing dry_run logic. I am down to rewrite the conversion functions a bit to avoid the negative logic, but only if you comment that 😛
Script for working with pickle/json keys. Supports outputting, converting, and deleting.
TODO: probably worth incorporating some of luis' state restore script?