-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Chore] Automatically cleanup old resources each night (#400)
## Problem Sometimes when test cleanup steps fail, indexes and collections get left behind. ## Solution Create a nightly job to cleanup leftover indexes. Inspect the names of each index and collection to see whether they are more than 24 hours old prior to deleting. This should prevent deleting resources out from underneath any tests that may be running at the same time as the delete job. ## Type of Change - [x] Infrastructure change (CI configs, etc)
- Loading branch information
Showing
3 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'Cleanup All Indexes/Collections (Nightly)' | ||
|
||
on: | ||
schedule: | ||
- cron: '5 22 * * *' # 5 minutes after 10pm UTC, every day | ||
|
||
jobs: | ||
cleanup-all: | ||
name: Cleanupu all indexes/collections | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cleanup all | ||
uses: ./.github/actions/cleanup-all | ||
with: | ||
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} | ||
DELETE_ALL: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters