close
Skip to content

purge_s3_keys.py script updates - #13302

Merged
mekarpeles merged 3 commits into
masterfrom
purged-key-counts
Aug 12, 2026
Merged

purge_s3_keys.py script updates#13302
mekarpeles merged 3 commits into
masterfrom
purged-key-counts

Conversation

@jimchamp

@jimchamp jimchamp commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Updates purge_s3_keys.py in the following ways:

  • Prints the number of updated records after processing a batch of records
  • Sets a 7.5 minute timeout for affected key query transactions

The query to find all affected accounts takes over an hour to run, so the printing the number of updated records will help us determine the number of remaining records w/o the need to wait so long for results.

The default query timeout is too short for the affected keys query, which takes less than 3 minutes currently. I wouldn't be surprised if this query takes longer as more records are updated, so I've set the timeout to 7.5 minutes.

Technical

Testing

Screenshot

Stakeholders

Copilot AI lite review requested due to automatic review settings August 10, 2026 22:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the scripts/purge_s3_keys.py maintenance script to report how many records were updated before the script exits, including when a graceful shutdown is requested. This helps operators understand progress without needing to rerun a long-running “find affected accounts” query.

Changes:

  • Introduces an updated_count variable intended to track successful updates.
  • Prints “Records updated this session: …” on normal completion and on shutdown-request termination.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/purge_s3_keys.py
Comment thread scripts/purge_s3_keys.py
@jimchamp
jimchamp marked this pull request as draft August 10, 2026 23:46
@jimchamp jimchamp changed the title Output count of updated records on purge_s3_keys.py script termination Print periodic status updates during purge_s3_keys.py script execution Aug 11, 2026
@jimchamp
jimchamp marked this pull request as ready for review August 11, 2026 00:16
@jimchamp jimchamp changed the title Print periodic status updates during purge_s3_keys.py script execution purge_s3_keys.py script updates Aug 11, 2026
Comment thread scripts/purge_s3_keys.py Outdated
Co-authored-by: jimchamp <28732543+jimchamp@users.noreply.github.com>
@mekarpeles
mekarpeles merged commit a17ed9b into master Aug 12, 2026
3 of 4 checks passed
@mekarpeles
mekarpeles deleted the purged-key-counts branch August 12, 2026 06:46
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.

3 participants