Repository navigation
fix(gem4gov-cli): handle empty data store lists and missing data store names - #336
Merged
Merged
Conversation
aghassemlouei
requested review from
Calvin-Cheng1,
LanceWray and
mgcarey-google
October 22, 2026 01:31
12 of 19 tasks
aghassemlouei
marked this pull request as ready for review
October 22, 2026 01:53
aghassemlouei
force-pushed
the
fix/gem4gov-cli-empty-data-stores
branch
from
October 22, 2026 01:54
52f1cab to
a29b94a
Compare
…e names
- Guard `name.split('/')[-1]` in `validate_data_store()` so missing
`name` fields fall back to `data_store_id`.
- Return `None` early with an informational message in
`list_data_stores()` when no valid search data stores exist before
calling `click.IntRange(1, len(valid_data_stores))`.
- Add `HEALTHCHECK` instruction (`/_stcore/health`) to
`blueprints/gemini-enterprise/analytics/Dockerfile` (Trivy `DS-0026`).
- Add unit tests in `tests/gem4gov_cli/test_data_stores.py` covering
all three fixes.
aghassemlouei
force-pushed
the
fix/gem4gov-cli-empty-data-stores
branch
from
October 22, 2026 01:57
a29b94a to
66dc9d9
Compare
Member
Author
|
@digitalresistor - Just tagging you here to mention that this gem4gov cli is far from ideal. We would love to add as many HashiCorp resources as possible rather than relying on this but any ideas you have would be greatly appreciated. |
Calvin-Cheng1
approved these changes
Oct 22, 2026
Merged
18 of 19 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Guards empty data store lists and missing data store
namefields inblueprints/gemini-enterprise/gem4gov-cli/data_stores.pysogem4govdoes not crash when no valid search data stores exist or when a data store payload omitsname, and adds a containerHEALTHCHECKinstruction (/_stcore/health) toblueprints/gemini-enterprise/analytics/Dockerfileto resolve TrivyDS-0026.Split out from #286 (authored by @ForeverYoung48) so repository lint hygiene (#286) and these
gemini-enterprisefixes can be reviewed and merged independently.Fixes: N/A (split out from #286)
name.split('/')[-1]invalidate_data_store()so missingnamefields fall back todata_store_id.Noneearly with an informational message inlist_data_stores()when no valid search data stores exist before callingclick.IntRange(1, len(valid_data_stores)).HEALTHCHECK(http://127.0.0.1:8080/_stcore/health) toblueprints/gemini-enterprise/analytics/Dockerfile(DS-0026).tests/gem4gov_cli/test_data_stores.pycovering missingnamepayloads, empty/filtereddataStoresresponses, and the analyticsDockerfileHEALTHCHECKinstruction.Type of Change
Deployment & Compliance Impact
blueprints/gemini-enterprise/analytics/Dockerfile.Checklist
Code Quality & Reusability
modules/orfast/stages-aw/can be leveraged for this change.docs/naming-convention.md.Documentation
README.mdof the modified module or blueprint.Security
Testing
Testing Performed
uv run --locked pytest tests/gem4gov_cli/test_data_stores.py: 13 unit tests passed (test_validate_data_store_missing_name_falls_back_to_id,test_list_data_stores_empty_returns_none_without_prompt,test_analytics_dockerfile_defines_healthcheck, plus 10 existing tests).uv run --locked ruff check blueprints/gemini-enterprise/gem4gov-cli/data_stores.py tests/gem4gov_cli/test_data_stores.pyanduv run --locked ruff format --check: 0 issues.bash tools/lint.shandbash tools/run_tests.sh: all checks and test suites passed.