Skip to content

Add firebase run:services:update command - #11206

Open
falahat wants to merge 32 commits into
bapi_deploy_runfrom
bapi_services_update
Open

falahat wants to merge 32 commits into
bapi_deploy_runfrom
bapi_services_update

Conversation

@falahat

@falahat falahat commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Description

Scenarios Tested

Sample Commands

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new command run:services:update (gated behind the direct_cloud_run experiment) to update, rebuild, and redeploy Cloud Run services, specifically supporting setting or clearing a base image. Feedback on the changes suggests: (1) iterating through all configurations returned by getServiceConfigs to properly support multi-region setups instead of only checking the first one, (2) gracefully handling cases where config.region is undefined in missingServiceMessage to prevent printing 'undefined' to users, and (3) using defensive assignment (|| {}) when initializing client.run namespaces to avoid overwriting existing properties.

Comment thread src/deploy/run/update.ts Outdated
Comment thread src/deploy/run/util.ts Outdated
Comment thread src/commands/index.ts Outdated
@falahat
falahat added this pull request to stack #11209 September 30, 2026 04:19
@falahat
falahat force-pushed the bapi_services_update branch from 51f4259 to 595ee57 Compare September 30, 2026 04:20
@falahat
falahat force-pushed the bapi_services_update branch from 1608f73 to 9a8b7ca Compare September 30, 2026 21:37
@falahat
falahat removed this pull request from stack #11209 September 30, 2026 21:42
@falahat
falahat added this pull request to stack #11226 October 2, 2026 16:41
falahat added 21 commits October 2, 2026 10:23
Clearing a base image that isn't set no longer skips the deploy. run:services:update always rebuilds and deploys, the same as firebase deploy, instead of trying to detect no-op updates.
# Conflicts:
#	scripts/run-deploy-tests/tests.ts
firebase run:services:update <serviceId> now also accepts
<serviceId>:<region>.

- If firebase.json lists the service ID once, the region is optional.
- If it lists the ID in more than one region, the command fails and lists
  the <serviceId>:<region> names to choose from.
- It deploys only run:<serviceId>:<region>, so it never redeploys the same
  ID in another region.

The "doesn't exist yet" message also suggests the command that deploys
just that service and region.
Also drops update's own missing-region check, which getAllServiceConfigs
now does for every service, and puts run:services:update back in the
deploy help text.
- Read the flags into a settings object and pass it straight to deploy.
- Move the missing-service message into update.ts, its only caller.
- Tests: realistic names, an update() helper that reads like the CLI call,
  one expectDeployed() helper, and one test for the always-rebuild decision.
@falahat
falahat removed this pull request from stack #11226 October 12, 2026 15:21
@falahat
falahat added this pull request to stack #11267 October 12, 2026 15:22
Comment thread src/deploy/run/update.ts Outdated
updateService took one name that was either <serviceId> or <serviceId>:<region>. It now takes serviceId and region, and the command takes the region from --region.
@falahat
falahat requested a review from Yuangwang October 12, 2026 18:20

This branch has not been deployed

No deployments
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.

2 participants