Validate resource IDs at option boundaries - #73
Conversation
Reject path-breaking project, instance, and database IDs during option finalization so invalid resource paths and CREATE DATABASE statements fail before bootstrap. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Code Review
This pull request introduces resource ID validation for projects, instances, and databases during option finalization in both standard and Omni emulator configurations, along with comprehensive unit tests. The review feedback highlights a correctness issue where underscores are incorrectly rejected for database IDs, and suggests enforcing minimum length constraints for resource IDs to prevent late failures.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Allow valid database ID underscores and reject too-short resource IDs at option finalization so invalid fixed IDs fail before backend setup. Co-authored-by: Cursor <cursoragent@cursor.com>
|
/gemini review |
1 similar comment
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces validation for project, instance, and database resource IDs in both standard emulator and Omni configurations. It defines length constraints and character rules (such as requiring lowercase letters, digits, hyphens, and underscores where appropriate) and includes comprehensive unit tests to verify these validation rules. I have no additional feedback to provide as the implementation is clean and well-tested.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Code Review
This pull request introduces validation for project, instance, and database resource IDs during the finalization of emulator and Omni options. It defines length constraints and character rules (e.g., lowercase letters, digits, hyphens, and underscores for databases) and implements helper functions to enforce these constraints. Additionally, comprehensive unit tests have been added to verify that invalid IDs are correctly rejected and that default or random IDs are properly accepted. As there are no review comments, I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
Test plan
go test . -run 'TestValidateResourceID|TestRunOmniRejectsUnsupportedProjectOptions|TestRunOmniDisableBackendGuardrails'go test ./...git diff --checkCloses #61.
Made with Cursor