chore(deploy): add 'indexes' subcommand to gcp-deploy.sh#140
Draft
dev-mansonthomas wants to merge 1 commit into
Draft
chore(deploy): add 'indexes' subcommand to gcp-deploy.sh#140dev-mansonthomas wants to merge 1 commit into
dev-mansonthomas wants to merge 1 commit into
Conversation
firestore.indexes.json was already the source of truth but was never deployed: the standard deploy excludes firestore:indexes to avoid silent destructive prompts on missing entries. As a result, the two composite indexes on ul_queteur_stats_per_year required by get-queteur-stats and get-ul-queteur-ranking were absent from rq-fr-prod, causing '400 The query requires an index' on the 'Mon historique' page. Add a dedicated subcommand: ./gcp-deploy.sh fr <env> indexes It calls firebase deploy --only firestore:indexes --non-interactive --force so the JSON is reconciled with the server without prompting (creations AND deletions). Run after every change to firestore.indexes.json on each environment. Documented in docs/cloud-functions-endpoints.md section 12 (index catalogue mapping each index to its cloud function and Angular consumer, plus deploy procedure and add-new-index workflow). Indexes deployed on the three environments via this c firestore.indexes.json was already the source of truth but was never >&1deployed: th git commit -F .git/COMMIT_MSG_INDEXES.txt 2>&1 && rm .git/COMMIT_MSG_INDEXES.txt git status --short && git log --oneline -1
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.
Context
firestore.indexes.jsonwas already the source of truth but was never deployed: the standardgcp-deploy.shdeliberately excludesfirestore:indexesto avoid silent destructive prompts on missing entries.As a result, the two composite indexes on
ul_queteur_stats_per_yearrequired by the Cloud Functionsget-queteur-statsandget-ul-queteur-rankingwere absent fromrq-fr-prod, causing a400 The query requires an indexon the Mon historique page (regression introduced when those endpoints migrated to Cloud Functions v2 in #130).Change
Add a dedicated subcommand:
It runs
firebase deploy --only firestore:indexes --non-interactive --forceso the JSON file is reconciled with the server without prompting (applies creations and deletions). To be run after every change tofirestore.indexes.jsonon each environment.Doc
New section 12 in
docs/cloud-functions-endpoints.md:Deployment status
Already run on the three environments via the new subcommand. Verified
READYstate onrq-fr-prod:The Mon historique page is now functional in production.
Scope
This PR is intentionally limited to the deployment tooling + indexes. The timezone fix (
fix/timezone-utc-iso) is shipped separately.Pull Request opened by Augment Code with guidance from the PR author