fix: add RAG projects to scheduled cleanup#800
Conversation
Add asp-rag-dev/stg/prd to the cleanup project list so test resources in RAG projects are cleaned up daily. Also remove the redundant _E2E_PROJECT_IDS substitution since it always matches _PROJECT_IDS.
Summary of ChangesHello @eliasecchig, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical issue where test resources for RAG projects were not being properly cleaned up by the daily scheduled job. By extending the cleanup configuration to include these projects and unifying related project ID variables, it ensures that all relevant test resources are regularly maintained, preventing resource accumulation and potential cost overruns. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly adds the RAG projects (asp-rag-dev, asp-rag-stg, asp-rag-prd) to the scheduled cleanup configuration, addressing the issue of leftover test resources. The unification of _PROJECT_IDS and _E2E_PROJECT_IDS is a good refactoring that improves maintainability by removing redundancy. I've added one comment regarding a potential inconsistency in a related script that should be addressed to ensure manual cleanups behave as expected.
| substitutions: | ||
| _PROJECT_IDS: 'asp-e2e-dev,asp-e2e-stg,asp-e2e-prd,asp-test-dev,asp-test-prd,asp-test-stg' | ||
| _E2E_PROJECT_IDS: 'asp-e2e-dev,asp-e2e-stg,asp-e2e-prd,asp-test-dev,asp-test-prd,asp-test-stg' | ||
| _PROJECT_IDS: 'asp-e2e-dev,asp-e2e-stg,asp-e2e-prd,asp-test-dev,asp-test-prd,asp-test-stg,asp-rag-dev,asp-rag-stg,asp-rag-prd' |
There was a problem hiding this comment.
While this change correctly adds the RAG projects for the scheduled cleanup job, the default values for PROJECT_IDS and E2E_PROJECT_IDS in tests/cicd/scripts/force-cleanup.sh are now out of sync. This could lead to incomplete cleanups if the script is run manually without the environment variables set.
To ensure consistency, please consider updating the default project lists on lines 18 and 19 of tests/cicd/scripts/force-cleanup.sh to include the new RAG projects.
Summary
asp-rag-dev,asp-rag-stg,asp-rag-prdto the scheduled cleanup project list_PROJECT_IDSand_E2E_PROJECT_IDSinto a single substitution variableProblem
RAG project test resources (Agent Engines, Vector Search, Service Accounts, etc.) were not being cleaned up by the daily scheduled job because the RAG projects were missing from the cleanup config.
Changes
.cloudbuild/scheduled-cleanup.yaml: Add RAG projects to_PROJECT_IDS, remove redundant_E2E_PROJECT_IDSsubstitution (both env vars now fed from_PROJECT_IDS)