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

fix(firebase): apply region for gen2 deployments #1657

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

y-takebe
Copy link
Contributor

πŸ”— Linked issue

Fixes #1655

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Resolves #1655

firebase functions gen2 with region specified can be deployed.

manual integration tests

Since there is no integrated test code that includes firebase deploy, I manually performed the following three tests.

  1. have region and deploy to firebase.
export default defineNitroConfig({
  firebase: {
    gen: 2,
    nodeVersion: "18",
    httpsOptions: {
      region: "asia-northeast1",
      maxInstances: 3,
    },
  },
});
  1. have no httpsOptions configuration and deploy to firebase.
export default defineNitroConfig({
  firebase: {
    gen: 2,
    nodeVersion: "18",
  },
});
  1. have no region configuration and deploy to firebase.
export default defineNitroConfig({
  firebase: {
    gen: 2,
    nodeVersion: "18",
    httpsOptions: {
      maxInstances: 3,
    },
  },
});

These three tests passed.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pi0 pi0 changed the title fix: runtime-entries update for firebase gen2 region-specific deployments fix(firebase): apply region for gen2 deployments Aug 28, 2023
@pi0 pi0 requested a review from posva August 28, 2023 11:10
@posva
Copy link
Collaborator

posva commented Aug 28, 2023

Tested locally on a project and it does fix the issue πŸ’―

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Merging #1657 (179c3e9) into main (88e79fc) will decrease coverage by 0.11%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1657      +/-   ##
==========================================
- Coverage   77.76%   77.65%   -0.11%     
==========================================
  Files          76       76              
  Lines        7824     7824              
  Branches      803      799       -4     
==========================================
- Hits         6084     6076       -8     
- Misses       1738     1745       +7     
- Partials        2        3       +1     

see 2 files with indirect coverage changes

@pi0 pi0 merged commit 4ac686a into nitrojs:main Aug 28, 2023
8 checks passed
@pi0
Copy link
Member

pi0 commented Aug 28, 2023

Thanks all! You can confirm it on edge channel now πŸ‘πŸΌ

@snsxn
Copy link

snsxn commented Aug 29, 2023

Using Nitro 2.6.3-28220517.4ac686a and setting region in nuxt.config.ts as

nitro: { preset: 'firebase', firebase: { gen: 2, httpsOptions: { region: 'europe-west1' }, serverFunctionName: 'functionname', nodeVersion: '18' } },

Still deploying to 'us-central1'

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.

Firebase gen2 / region specification does not work and deploys to us-central1
4 participants