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

Merging master into next. #6619

Merged
merged 320 commits into from
Dec 14, 2023
Merged

Merging master into next. #6619

merged 320 commits into from
Dec 14, 2023

Conversation

joehan
Copy link
Contributor

@joehan joehan commented Dec 14, 2023

Description

Scenarios Tested

Sample Commands

christhompsongoogle and others added 30 commits June 21, 2023 22:24
* Fixed a bug in the hosting config for emulators. Also fixed an issue
where an empty folder creates an issue loading the side panel.

* Missed some changes

* Update firebase-vscode/webviews/components/EmulatorPanel.tsx

Co-authored-by: joehan <joehanley@google.com>

---------

Co-authored-by: joehan <joehanley@google.com>
* Update proxyResponse method

* Add proper types to proxyResponse function

* Changelog

* Changelog formatting

* Update CHANGELOG.md

* Update firebase-vscode/package-lock.json

---------

Co-authored-by: joehan <joehanley@google.com>
* Added init flow commands

* change region name

* Enable frameworkstacks api

* Added code review changes

* Revert unwanted changes

* Revert unwanted changes

* Revert unwanted changes

* change according to project id

* Removed unwanted statements related to projectId
* Initial commit to stacks api

* Added more properties to the Stack and Build object

* Added api calls for framework stacks

* Changed naming

* Changed naming

* Review changes

* Removed and used minimal fields

* Moved frameworks api file
* Switched most uses of track to GA4

* Move duration out of params, and improve debug logging slightly
* Release Firestore emulator 1.18.1

* Update CHANGELOG.md

Co-authored-by: joehan <joehanley@google.com>

* Formatting changes in CHANGE.md

* Update CHANGELOG.md

---------

Co-authored-by: Jia You <jiayou@google.com>
Co-authored-by: joehan <joehanley@google.com>
Co-authored-by: christhompsongoogle <106194718+christhompsongoogle@users.noreply.github.com>
…n discovery and emulation (#5985)

When deploying functions that makes use of GCP's usage-based (not resource-based) APIs , such as Vertex AI or ML Vision API, users may see an error like this:


```
// main.py
import vertexai
# Initialize the Vertex AI client
vertexai.init()

$ firebase deploy
Failed to load function definition from source: FirebaseError: Failed to parse build specification

Caused by:
403 Vertex AI API has not been used in project 563584335869 before or it is disabled. 
```

During function discovery, `vertex.init()` makes a call to the Vertex AI with the client credentials associated with Firebase CLI . In the case of usage-based APIs, the call is being made on the Firebase CLI project, not the users project, resulting in the error message like `been used in project 563584335869 before or it is disabled.` (project `563584335869` is the Firebase CLI GCP project).

Similar issue happens when running the function on the emulator.

To workaround the issue, we have to properly override the client project associated with the Vertex AI API call. There are few ways for doing this, and here we choose to leverage `GOOGLE_CLOUD_QUOTA_PROJECT` environment variable to correctly override the quota project to be the user project associated with the Firebase CLI session.
* stash

* commit

* commit

* lint

* fix tests

* const
* Starting on extension.yaml json schema

* finsh extension.yaml schema

* adding events

* add billingrequired

* Adding schemas to vscode plugin too

* reverting new format for firebase-config.json
* Print functions discovery to stdout/error

* More tweaking

* lint fixes

* Use logger instead of console to work with --json

---------

Co-authored-by: Daniel Lee <danielylee@google.com>
Fixes compatibility with latest Next.js
Multi-line table syntax is not supported in GitHub Markdown.
* add internal testing cmd for connecting gh to cloud build repos

* use regex to extract repo slug

* add comments

* add unit tests

* fix tests

* refactoring & allow changing gh app access settings

* refactor & update unit tests

* add comments & change internaltesting name

* rename to composer
* Switched most uses of track to GA4

* Move duration out of params, and improve debug logging slightly

* Improved metrics for extensions

* formats
* Added cascading of latest approved version to latest version when installing.

* Changed output of extension version info.

* Formatting, added more metadata, and cleaned up TODOs.

* Formatting and extra notices.

* Added even more metadata.

* Formatting.

* Fixing tests.

* Added display of extension resources.

* Added link to Extensions Hub.

* Added displaying of events.

* Formatting.

* Formatting.

* Version bug.

* Added displaying of secrets and task queues.

* Added displaying of external services.

* Fixed resolveVersion() + tests.

* Added tests for displayExtensionInfo().

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: joehan <joehanley@google.com>

* Better messaging and parameterizing.

* Update displayExtensionInfo.ts

* Update displayExtensionInfo.spec.ts

* Update CHANGELOG.md

---------

Co-authored-by: joehan <joehanley@google.com>
* Added runtime command discovery

* Resolved comments

* Added error case to analyse codebase method

* Updated install command

* Reorganized tests and removed unwated promise.resolve stmt

* Added review changes on install command and node version string array

* Changes to node.ts to include additional condions on run script

* Added code comments to types

* Added undefied to return if no cmd

* Added undefied to return if no cmd
* Normalized extension root path before usage.

* Update CHANGELOG.md

* Update publisherApi.ts

* Update extensionsHelper.ts

* Update CHANGELOG.md

* Replaced join() with normalize() and fixed regex.

* Update extensionsHelper.ts

* Update extensionsHelper.ts
* track functions metrics with ga4

* remove old track() calls
* Only record metrics if user confirms ext:install

* format
…dev:upload. (#6052)

* Added more descriptive error message when repo is private (or not found).

* Formatting.

* Formatting.

* Update CHANGELOG.md

---------

Co-authored-by: joehan <joehanley@google.com>
* Allow $schema property in firebase.json

* Add $schema property via firebaseConfig.ts

---------

Co-authored-by: joehan <joehanley@google.com>
* run lifecycle hooks for individual functions
taeold and others added 29 commits December 7, 2023 09:09
As written, various utility command used for onboarding uses untyped `setup` object. Making a small refactoring here to explicitly pull out `backenId`, `locations`, and other variables that's used throughout the module.
As written, `backend:get` accepts a `--backend` flag:

```
firebase backends:get --backend foo
```

However, the approved API design accepts backend as an argument instead:

```
firebase backends:get foo
```
* Grab the raw options, if a configuration isn't present
* Accept serveTarget from ng-deploy, setting this by default in angularfire@17
Use fileURLToPath to address astro relative directories

---------

Co-authored-by: James Daniels <jamesdaniels@google.com>
Fix issue #5561 emulators not starting with vite

---------

Co-authored-by: Viktor Sotov <sotov.victor@gmail.com>
Co-authored-by: sotovviktor <70816266+sotovviktor@users.noreply.github.com>
Co-authored-by: Leonardo Ortiz <leo@monogram.io>
Update list of `ALLOWED_SSR_REGIONS` in web frameworks config to include the current list of regions that support gen 2 Cloud Functions.

---------

Co-authored-by: James Xabregas <james@sparkello.com>
Co-authored-by: Alex Astrum <sandu@google.com>
* add nuxt init method for firebase init hosting
* Changelog, supportedRange, and address feedback

---------

Co-authored-by: Leonardo Ortiz <leo@monogram.io>
Co-authored-by: James Daniels <jamesdaniels@google.com>
…tions (#6583)

During deployment of a 2nd Gen Firestore functions, the CLI retrieves metadata associated with the Firestore database in order to ensure that the region of the Firestore database matches the region of the deployed function:

https://github.com/firebase/firebase-tools/blob/1f4f6f494fd7a8a29887a8306930cda56aa7e13b/src/deploy/functions/services/firestore.ts#L9-L15

Unfortunately, when a large number of functions are deployed that each target a different Firestore instance (you are allowed to have multiple instances of Firestore on a single GCP project), developer will likely see a quota exceeds error:

```
Quota exceeded for quota metric 'Database operation requests' and limit 'Database Operations Per Minute' of service 'firestore.googleapis.com' for consumer ...
```

We mitigate the issue by memoizing the API calls. This should help with cases where multiple firestore functions are associated with a database, but wouldn't help if developer is setting up and deploying 60+ unique functions.

Mitigates #6574
Co-authored-by: joehan <joehanley@google.com>
Fixed by adding the VERCEL_URL env var

---------

Co-authored-by: James Daniels <jamesdaniels@google.com>
…6608)

* check route or page from app path routes manifest

* add pages headers to framework deploy tests
Instead of hard-coding supported regions, we dynamically fetch the list of supported regions from the API.

This is great especially when a org policy is set to restrict region availability for a project!
Quick refactor to rename "frameworks" to "apphosting".

Also include a change to rename `backends:*` family of commands to `apphosting:backends:*` which matches the approved API proposal.
After creating a build via the "backends:create" command, follow up by creating a new build and updating the traffic setting to the newly created build.

This allows users to access their newly created site without having to manually trigger a rollout themselves.
…associated with the backend instead of the resource itself. (#6612)

The existing implementation includes a bug where it will only look for connection in the region of the backend.
We haven't finalized the design of these commands, but they sure are handy for local testing.
@joehan joehan merged commit 916a790 into next Dec 14, 2023
30 of 33 checks passed
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.