Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

Conversation

sethvargo
Copy link
Contributor

The e2e-runner does self cleanup, but sometimes the job times out or fails. In those cases, there's no opportunity for cleanup and we gradually leak API keys over time.

This introduces a function for getting the e2e-realm (if one exists), and adds a new task to the cleanup job to delete e2e keys that have existed for more than 24 hours.

Release Note

Cleanup e2e API keys that have existed for > 24 hours.

The e2e-runner does self cleanup, but sometimes the job times out or fails. In those cases, there's no opportunity for cleanup and we gradually leak API keys over time.

This introduces a function for getting the e2e-realm (if one exists), and adds a new task to the cleanup job to delete e2e keys that have existed for more than 24 hours.
@sethvargo sethvargo requested a review from a team as a code owner April 9, 2021 15:40
@sethvargo sethvargo requested review from mikehelmick and whaught April 9, 2021 15:40
@googlebot googlebot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Apr 9, 2021
@sethvargo sethvargo enabled auto-merge (squash) April 9, 2021 15:42
@sethvargo sethvargo merged commit 94222c0 into main Apr 9, 2021
@sethvargo sethvargo deleted the sethvargo/e2egc branch April 9, 2021 15:55
mikehelmick added a commit that referenced this pull request Apr 10, 2021
mikehelmick added a commit that referenced this pull request Apr 10, 2021

result := db.db.
Unscoped().
Where("realm_id = ? AND created_at < ?", realm.ID, deleteBefore).
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should always leave the most recent in place

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes Auto: added by CLA bot when all committers have signed a CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants