Skip to content
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

feat: Add script to refresh IDs to the new format. #2896

Merged
merged 6 commits into from
Nov 26, 2024

Conversation

another-rex
Copy link
Contributor

@another-rex another-rex commented Nov 25, 2024

fix: #2786

This script can also be used if we ever change the key format in the future, we just need to update the check for whether a key needs to be updated or not.

I'll run this on a machine in the US when merged.

tools/datafix/refresh_ids.py Outdated Show resolved Hide resolved
tools/datafix/refresh_ids.py Outdated Show resolved Hide resolved
default=False,
help="Print each ID that needs to be processed")
parser.add_argument(
"--project",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a --source to allow only refresh IDs from a certain source repository.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This would require adding a new index which is why it is not an option here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(db_id, source)

tools/datafix/refresh_ids.py Outdated Show resolved Hide resolved
tools/datafix/refresh_ids.py Show resolved Hide resolved
tools/datafix/refresh_ids.py Outdated Show resolved Hide resolved
Copy link
Contributor

@andrewpollock andrewpollock left a comment

Choose a reason for hiding this comment

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

Will this get run against staging first to catch any runtime corner cases not easily picked up by code review?

@another-rex
Copy link
Contributor Author

Yep, I've tested this with a few records in staging already and it seems to work. Will do a full pass for staging before applying it to production.

@another-rex
Copy link
Contributor Author

A few issues I can see is all of those old oss-fuzz records that's hidden but still exists in our database, which might fail when we try to reput it.

Copy link
Collaborator

@oliverchang oliverchang left a comment

Choose a reason for hiding this comment

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

very nice!

@another-rex another-rex merged commit e1ad1ba into google:master Nov 26, 2024
11 checks passed
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.

Migrate Datastore Bug keys after removing logic to create source-specific keys
5 participants