Skip to content

Conversation

@jhamon
Copy link
Contributor

@jhamon jhamon commented Jan 14, 2026

Adds a GitHub Actions workflow and enhances the IndexCleanupUtility to automate the cleanup of old Pinecone indexes and collections.

This PR addresses SDK-58 by introducing a scheduled and manually triggerable GitHub Actions workflow to remove aged Pinecone resources. The IndexCleanupUtility has been updated to support collection cleanup, dry-run mode, and command-line arguments for age threshold and dry-run. Currently, age-based filtering processes all resources as creation timestamps are not exposed by the API, but the utility is structured to easily integrate this filtering once available. This helps prevent test failures caused by resource limits.


Linear Issue: SDK-58

Open in Cursor Open in Web


Note

Introduces automated cleanup for Pinecone test resources and expands the Java utility for broader, safer deletion.

  • New GitHub Actions workflow cleanup-test-resources.yml: runs daily at 02:00 UTC and via manual dispatch; accepts age_threshold_days and dry_run; builds project and runs IndexCleanupUtility with PINECONE_API_KEY
  • Enhanced IndexCleanupUtility: parses CLI args (--age-threshold-days, --dry-run), supports deleting both indexes and collections, gracefully skips terminating resources, auto-disables deletion protection before index deletion, aggregates results, and improves logging/error handling
  • Unit tests added for edge cases and behavior (dry-run, terminating resources, null/empty lists, successful deletions)
  • Build tweak: set net.bytebuddy.experimental=true for tests in build.gradle

Written by Cursor Bugbot for commit 86c7104. This will update automatically on new commits. Configure here.

- Enhanced IndexCleanupUtility.java with:
  * Age-based filtering support (structure ready for timestamps)
  * Collection cleanup in addition to indexes
  * Dry-run mode for safe preview of deletions
  * Command-line argument parsing (--age-threshold-days, --dry-run)
  * Improved error handling and logging
  * Comprehensive cleanup statistics

- Created GitHub Actions workflow cleanup-test-resources.yml:
  * Scheduled daily execution at 2 AM UTC
  * Manual trigger via workflow_dispatch with configurable inputs
  * Supports age threshold and dry-run parameters
  * Uses Java 8 for compatibility

Related to Linear issue SDK-58

Co-authored-by: jhamon <jhamon@pinecone.io>
@cursor
Copy link

cursor bot commented Jan 14, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@jhamon jhamon marked this pull request as ready for review January 14, 2026 19:55
cursoragent and others added 3 commits January 14, 2026 20:10
Co-authored-by: jhamon <jhamon@pinecone.io>
Co-authored-by: jhamon <jhamon@pinecone.io>
Co-authored-by: jhamon <jhamon@pinecone.io>
@jhamon
Copy link
Contributor Author

jhamon commented Jan 14, 2026

Merging with failures as the failures are related to resource quota limits that this workflow will help address

@jhamon jhamon merged commit 4e0f948 into main Jan 14, 2026
11 of 13 checks passed
@jhamon jhamon deleted the cursor/SDK-58-automated-test-resource-cleanup-d78b branch January 14, 2026 21:01
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