Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying Firebase extensions not considering --force and --non-interactive #6321

Closed
vpusher opened this issue Sep 4, 2023 · 1 comment · Fixed by #6337
Closed

Deploying Firebase extensions not considering --force and --non-interactive #6321

vpusher opened this issue Sep 4, 2023 · 1 comment · Fixed by #6337

Comments

@vpusher
Copy link

vpusher commented Sep 4, 2023

[REQUIRED] Environment info

firebase-tools: 12.4.7

Platform: Ubuntu 22.04 (Github Actions Image)

[REQUIRED] Test case

Deploying from continuous integration server (here using Github Actions) may lead to the following warning message when updating extensions:

The following instances may have been changed in the Firebase console or by another machine since the last deploy from this machine.
	storage-resize-images
	fs-bq-agreements
        ...

We ALWAYS deploy (extensions included) from Github Actions and NEVER from the console. However, we never commit back the new extensions etags after deployment because we don't want de deployment pipeline to change the release code. This is most probably what triggers the warning in the first place.

Consequently we deploy with the following command: firebase-tools --non-interactive deploy --force, so that we always force deploy what's in the code base which is our only source of truth.

Unfortunately, the previous command cannot complete cause of the following confirmation prompt, which obviously cannot be answered on a CI server:

If you proceed with this deployment, those changes will be overwritten. To avoid this, run `firebase ext:export` to sync these changes to your local extensions manifest.
? Do you wish to continue deploying these extension instances? (y/N) 

[REQUIRED] Steps to reproduce

  1. Deploy a least one Firebase extension.
  2. Commit your up to date .firebaserc after deployment.
  3. Update your firebase extension so a new deployment is needed (e.g increment extension version)
  4. Deploy your new extension version
  5. Reset your .firebaserc to discard the last etags changes (this should give you the etags of step 2).
  6. Deploy one last time using --non-interactive and --force.

=> You are still prompted for override confirmation.

[REQUIRED] Expected behavior

The CLI should force deploy, overriding anyway without entering interactive mode.

[REQUIRED] Actual behavior

The CLI enters the interactive mode and ask wether to continue with the deployment.

@aalej
Copy link
Contributor

aalej commented Sep 8, 2023

Hi @vpusher, thanks for providing a detailed report. I was able to reproduce the behavior you mentioned. Even after passing the --force and --non-interactive flags, confirmation prompts would still appear.

I’ll raise this issue to our team so that we can investigate what’s causing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants