Skip to content

Conversation

@ThadCastl3
Copy link
Contributor

This pull request introduces a new --force flag for Firebase deployments, enabling users to force deploy changes that may increase their billing, such as deploying more than 0 minimum instances of a function. The changes include updates to the deployment logic, input handling, and test coverage.

Reasoning:

  • If you attempt to modify the 'minimum required instance' value from anything other than 0 then you encounter an error. This '--force' flag bypasses the error.

Enhancements to Deployment Functionality:

  • Added a force input in action.yml to accept the --force flag for deployments. This input is optional and defaults to false.
  • Introduced a new deployWithForce function in src/deploy.ts to handle deployments with the --force flag, including parsing its result.
  • Updated existing deployment functions (deployPreview and deployProductionSite) to support the force option in their configurations. [1] [2]

Codebase Updates for --force Support:

  • Updated execWithCredentials in src/deploy.ts to append the --force flag to Firebase CLI commands when the force option is enabled. [1] [2]
  • Modified src/index.ts to retrieve the force input, pass it to deployment functions, and handle deployments with the force flag if specified. [1] [2] [3]

Test Coverage Improvements:

  • Added a new test case in test/deploy.test.ts to validate that the --force flag is correctly included in deployment commands when enabled.
  • Defined a forceDeploySingleSiteSuccess sample in test/samples/cliOutputs.ts to simulate successful deployments with the --force flag.

Documentation and Cleanup:

  • Consolidated multi-line descriptions in action.yml into single-line format for better readability.

updated for Google CLA

Copy link

@PatrickJODonnell PatrickJODonnell left a comment

Choose a reason for hiding this comment

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

meme-bob-esponja

@PatrickJODonnell
Copy link

@mbleigh @jamesdaniels @paulb777 much needed addition!

@TerranceKelley
Copy link

can someone approve this, thanks

@austindi
Copy link

PLEASE APPROVE THIS!!!!!!

@mrmullen80
Copy link

please approve this.

ThadCastl3 and others added 2 commits August 12, 2025 15:09
Co-authored-by: Bryan Kendall <bryan.a.kendall@gmail.com>
…port for channel site deployment with force flag. Updated tests to and types to account for force flags. Force flag is now optional on ProductionDeployConfig and ChannelDeployConfig. Simplified deploy calls using force flag to automatically append force based on the boolean value nad removed the force-specific branch in index.ts
@ThadCastl3 ThadCastl3 requested a review from bkendall August 12, 2025 19:44
@bkendall
Copy link
Collaborator

bkendall commented Aug 13, 2025

Alright, sorry for the churn, but it turns out that the tests on main have been broken a while. I've updated main just now with some changes, so to get all the green check marks:

  1. merge in main
  2. run npm i (of course)
  3. run npm run format to fix any lint
  4. run npm run build and commit those changes
  5. push everything back up!

(oh, and of course, npm test should pass!)

Copy link
Collaborator

@bkendall bkendall left a comment

Choose a reason for hiding this comment

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

Last bit, but everything looks good.

@ThadCastl3 ThadCastl3 requested a review from bkendall August 14, 2025 21:07
@bkendall bkendall requested a review from jhuleatt August 15, 2025 15:51
Copy link
Collaborator

@jhuleatt jhuleatt left a comment

Choose a reason for hiding this comment

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

Thank you @ThadCastl3!

@bkendall bkendall merged commit 2ff89d6 into FirebaseExtended:main Aug 15, 2025
11 of 13 checks passed
@bkendall
Copy link
Collaborator

I'll work on releasing this on Monday since we don't typically release on Fridays. Thanks for the work @ThadCastl3

@ThadCastl3
Copy link
Contributor Author

I noticed we didn't update the readme but could just throw this in:

### force` {boolean}

Bypass the confirmation prompt.`

@FirebaseExtended FirebaseExtended locked and limited conversation to collaborators Sep 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants