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

--quiet option when deploying cloud functions is needed #908

Closed
g-viet opened this issue Sep 10, 2018 · 12 comments
Closed

--quiet option when deploying cloud functions is needed #908

g-viet opened this issue Sep 10, 2018 · 12 comments

Comments

@g-viet
Copy link

g-viet commented Sep 10, 2018

Version info

Firebase SDK version: 4.1.2

Platform Information

Operating System version: OS X

Expected behavior

Should deploy functions with --quiet mode like in gcloud

Actual behavior

Currently, It is unable to build and deploy automatically in CI.
It always requires an answer yes/no for function that need to delete.

@laurenzlong
Copy link
Contributor

Hi, this is intentional to ensure that you don't accidentally delete functions you don't intend to. If you'd like a non-interactive way to delete functions you can run firebase functions:delete <functionName> --force

@g-viet
Copy link
Author

g-viet commented Sep 10, 2018

Thanks for your prompt reply.
I think people always aware that thing when use --force or --quiet. There are many environment when running a project. We just should not use --force in production by the way.
Currently, we are handling that problem by deleting all functions then deploy all again.
But instead of that, I suppose to use --force when deploying functions is better. It reduces many cost time for testing.

@ahaverty
Copy link

@g-viet I think this issue is similar to: #877

Deleting all functions, wouldn't that cause large downtime for users?

@g-viet
Copy link
Author

g-viet commented Sep 11, 2018

@ahaverty That is exactly what I need.
Because now firebase CLI has no option like --allow-deletes as you said.
So we implemented by this way:

  1. Collect all cloud functions by using gcloud
  2. Delete all functions
  3. Deploy again

Because it will take more time when running on CI, so I think --allow-deletes is best.

@mbleigh
Copy link
Contributor

mbleigh commented Sep 11, 2018 via email

@ahaverty
Copy link

@mbleigh thanks for the suggestions, that's kind of what we're doing right now, but as I detailed in #877 (comment) we actually delete functions regularly enough for it to be an annoyance, mostly due to the headache of production access needed, and manual bottlenecks in our CI deploys.

@g-viet
Copy link
Author

g-viet commented Sep 12, 2018

yeah. Maybe it is another way. But it cannot avoid manual operation.
Once using CI, should say no with manual.

@mhuensch
Copy link

mhuensch commented Oct 3, 2018

Totally agreed!

I can't stress how seriously this is making me reconsider adopting Firebase. CI should be completely automated, if it isn't, you invalidate the meaning of "continuous". Not all functions are part of an API (like triggers for starters) and SHOULD be deleted as application architecture changes over time.

Yes, its a small percentage of deployments - but in a multi-stage environment - deployment its a real headache when you have to go to each environment and manually delete and then deploy. Sequencing becomes a real problem, increasing human error, and completely invalidating the point of having a good CI process in place.

Furthermore, I contend that users who are afraid of a deletion behavior (referenced in #877) have problems further upstream with automated testing, code review, source control, etc. If you are doing deployments to a production environment and suddenly find that things are deleted there ... you're doing it wrong. If your a hobbyist, then this is understandable, but your application probably isn't important enough that the deletion is a big deal. If you are "professional" with a large scale application, then you have much bigger issues in your deployment process than deleting functions. Deployment is NOT the place to address this problem.

PLEASE! Don't let development teams, who lack a proper grounding in the fundamentals, ruin the use of your product for the rest of us.

@mbleigh
Copy link
Contributor

mbleigh commented Oct 3, 2018 via email

@danielmhair
Copy link

Any update on this?

@g-viet
Copy link
Author

g-viet commented Jan 19, 2019

@danielmhair This issue was released in v5.1.0
Now we can use with --force flag
https://github.com/firebase/firebase-tools/releases/tag/v5.1.0

@darrelfrancis
Copy link

Awesome, thank you!

joehan added a commit that referenced this issue Apr 26, 2024
* Added support for connecting to cloudSQL using user accounts

* finshing my sentences

* Add extra sequences grant, make URL optional

* More cleanup
joehan added a commit that referenced this issue Apr 26, 2024
* Decode firemat.yaml

* Show codelenses only folders corresponding to firemat.yaml

* Update tests to reflect config changes

* Apply suggestions from code review

* Remove invocation to missing command

* Enable running queries/mutations in production

* Apply suggestions from code review

* Fuse User Mock view and Arguments view (#837)

* Add Firebase Data Connect view

* Add Instance Picker

* Update codelense logic to use instance picker

* Add instance in status bar

* Add project in statusbar

* Add tests for src/core/config.ts (#825)

* Update config parsing to handle custom operationSet keys

* Rename

* Extract functions

* Rename

* Include Firebase logo next to the selected project

* Merge firemat with master

* Fix codelenses incorrectly showing in the schema folder but not in the operation folder (#841)

* Fix merge error

* W

* Complete execution e2e and fix failing e2e

* Cleanup tests

* Add instance picker e2e

* Remove log and revert .vscode change

* Move pageobjects to a separate folder

* Apply suggestions from code review

* Can pick nothing

* initial lsp implementation

* Add lsp binary

* Add lsp binary

* Fix another vue-compiler dynamic dep

* Emulator should stop taking focus

* Don't pick an instance by default, and show statusbar in red

* fix execute codelens not showing in adhoc folder

* fix merge mistake

* Add start-emulator command

* Instance default to emulator

* Show execution codelens even if emulator isn't started

* Auto-start emulator when targeting emulator but it isn't started

* Add support for adhoc files. Update emulator to 0.1.4. Small fix to ls refresh

* update emulator file

* add dataconnect icon to statusbar. Change statusbar color

* Minor ui updates

* Commit

* Delete unused conf

* Fix e2e

* Add some e2e tests

* Fix tests

* fix execute codelens not showing in adhoc folder

* Prototype `deploy --only dataconnect` (#820)

* Scaffolding code and implementing list/createService

* Simple implementation of reading firemat.yaml and deploying schemas/operation sets

* More progress

* Adding source.ts

* Format and clean up bad merge

* cleaned up wrong tests

* Successfully deploying schemas, added cloudSql client

* E2E deploys working, cleaned up some cruft

* Add ensureApiEnabled, more cleanup

* Update src/commands/init.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* remove listSchemas

* trying to get install from git url working

* nope

* Another try

* also no

* Another round of cleanup

* Cleaning up

* starting updates to match dataconect.yaml

* Fixed up deploy flow to read and use approved dataconnect.yaml

* Renaming it all to firemat

* one last spot

* Updating init as well

* Updating json schema

* one last spot

* self review fixes

* simplify init template

* Format and cleanup

* udpated json schema

* Update src/experiments.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* Update src/emulator/constants.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* PR fixes

* cleanup

* format

---------

Co-authored-by: Michael Bleigh <bleigh@google.com>

* Fix Emulators.FIREMAT rename

* Rename emulator to Dataconnect (#869)

The emulator was renamed in a previous commit, but it appears that there were some leftovers.

* Adding a parser for connector and service names (#866)

* Adding a parser for connector and service names

* no only

* update shrinkwrap

* Rename instance

* Update test

* More test update

* Update fishfood e2e

* Update e2e

* Fix emulator

* Fix console errors

* Fix path

* Fix test

* Fix inquirer error

* Rename folder

* Firemat > Data Connect

* webview id fix

* Revert firemat.yaml > dataconnect.yaml for now

* Format

* ignore wdio for vsix package

* Add initial deploy flow

* Add `dataconnect.list` command (#868)

* starting to implement dataconnect:list

* adding command file

* Adding a parser for connector and service names

* no only

* Adding dataconect:list command

* Add --json support

* silence warnings

* More silencing of warnings

* Pr fixes

* Update queries.gql (#889)

Turns out graphql-js is unable to parse empty argument lists

* Fix config file

* Adding a basic cloudsqladmin client (#879)

* starting to implement dataconnect:list

* adding command file

* Adding a parser for connector and service names

* no only

* Adding dataconect:list command

* Add --json support

* Adding a basic clodusqladmin client

* Minor cleanups

* formatting

* Delete is nonstandard

* format

* Connect to CloudSQL as a builtin user or service account (#878)

* starting to implement dataconnect:list

* adding command file

* Adding dataconect:list command

* Add --json support

* Adding a basic clodusqladmin client

* Minor cleanups

* formatting

* Delete is nonstandard

* Prototyping provisioning + connecting to an instance!

* Merge conflict

* Merge conflict

* Connecting via IAM users woprking with ADC auth

* format

* cleanup

* clean up!

* Provision CloudSQL resources on init and deploy (#882)

* starting to implement dataconnect:list

* adding command file

* Adding a parser for connector and service names

* no only

* Adding dataconect:list command

* Add --json support

* Adding a basic clodusqladmin client

* Minor cleanups

* formatting

* Delete is nonstandard

* Prototyping provisioning + connecting to an instance!

* Merge conflict

* Merge conflict

* Connecting via IAM users woprking with ADC auth

* format

* cleanup

* Added cloudSQL provisioning to deploy and init

* fixing instanceId

* Clean up

* npm-shrikwrapped

* Remove dependency on Option from readFirebaseJson (#893)

* Update configs

* Convert paths to absolute

* Fix path

* Fix move to connector

* location > source

* Cleanup

* Bump FDC emulator versions.

* In production, show connector ID

* Kinda update tes

* Fix FDC emulator absolute path.

* Remove log import.

* Lint.

* Fixing a bug from bugbash

* it builds now

* Pass the PG local connection string from an env variable to the emulator.

* Add utils for getting services and connectors. Service file uses correct serviceId. Small refactor

* Separate utils file to file-utils and config

* Pass `local_connection_string` flag to emulator.

* initial deploy commit

* pass config options to deploy

* Update deploy to pick from services, then connectors

* fix deploy

* resolve comments

* Default should be empty string.

* Ran npm run generate:json-schema

* Bump emulator version.

* Implement dataconnect:sql:diff and dataconnect:sgl:migrate (#897)

* Start scaffoling out code for schema migration

* progress on schema migration

* progress

* First time migrating a schema!!

* Adding a SQL formatter and breaking things

* Big improvements to permissions logic

* formats

* Self review

* fiddling with grants

* more cleanup and edge case fixing

* Run npm run generate:json-schema.

* Refactor "move to connector" to an assist

* initial stream compile errors implementation

* Handle multiple connectors for moveToConnector

* forgot to remove a test user

* forgot to remove a test user

* fixing undefined access error

* Validate and patch existing Cloud SQL instances.

* emulator bump

* Cleaning up and running a formatter.

* npm run format

* One more lint error.

* Linting one more time.

* Added support for connecting to cloudSQL using user accounts (#908)

* Added support for connecting to cloudSQL using user accounts

* finshing my sentences

* Add extra sequences grant, make URL optional

* More cleanup

* Address review comments.

* npm run lint:changed-files -- --fix

* emulator bump

* update api ver

* Re-add dataConnect specific api values as getters

* Fix path typo (#913)

* Fix sample project

* rename

* Cleanup

* Fix errors

* Revamp side panel to include postgres setter

* update dc staging api

* update staging url to use https

* ls package fixes

* dataconnect api flag

* update vscode env vars

* cli update

* Update src/utils.ts

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

* Tweak datasource in dataconnect:list (#909)

* format

* Adding schema files for dataconnect.yaml and connector.yaml (#918)

* Adding schema files for dataconnect.yaml and connector.yaml

* Fixed some errors

* add schema to contributes

* Perform schema migration during deploy as well (#917)

* Starting on adding schema migration to deploy

* Fixing force behavior

* format

* self review

* PR suggestions + 2 way choice when not destructive

* Make serviceID optional, prompt for deleting services (#925)

* Fix and refactor tests

* Updating firebase.json to accept array of dataconnects (#931)

* Updating firebase.json to accept array of dataconnects

* Fix type usage

* ===

* Add localConectionString into .firebaserc (#929)

* dataconnect production api

* add missing files

* change string concat

* format

* add language-service file

* fast fix for dataConnectSingle type

* typing fix for DataconnectMultiple

* remove ui for adding psql conn string

* address comments

* Bump FDC emulator version.

* Create CloudSQL instances with configuration needed for FDC free trial.

* Adding support for --only flags (#927)

* Adding support for --only falgs

* Minor cleanups

* Refactor for clarity

* deep equal

* deploy using a terminal

* respond to comments

* Remove backupConfiguration enablement, it already defaults to false.

* Add `dataconnect:sdk:generate` command (#934)

* Starting on generate

* Updating firebase.json to accept array of dataconnects

* More progress on generate

* Updating firebase.json to accept array of dataconnects

* Fix type usage

* ===

* Still getting enoent errors, unsure why

* Working!

* format

* Remove "connect to instance" logic and show running emulators in the status bar. (#947)

* Fixed package-lock and updated to use new emulator

* Refactor --force behavior match Freds proposal (#946)

* Refactor --force behavior match Freds proposal

* PR fixes

* adding comments

* Update emulator

* Add GraphQL.vscode-graphql-syntax as extension dependency (#948)

* Remove duplicate

* Updating emulator

* Correctly watch for dataconnect.yaml changes (#949)

* Validate local schema and connectors together before deploy (#952)

* Starting on build

* types

* Progress!

* Prettify errors

* Line numbers, and save deployment metadata

* Extremely defensive

* Update FDC free trial tag per latest decision. (#953)

* Only one free trial per project, please. (#955)

* Strating on pricing warning/free trial

* waiting until sync to continue

* Added free trial check

* clean up console.log

* Handle malformed dataconnect.yaml files (#950)

* Show FDC views only if FDC is enabled

* Enable Goole ML Integration if vector is used (#954)

* Code cleanup + add vector provisioning

* PR fixes

* Rebase

* Rebase

* Clean up todos

* PR fixes

* Use require vector everywhere

* format

* Update FDC Deploy view (#958)

* Starting point for piping logs to VSCode (#944)

* Starting point for piping logs to VSCode

* Add vsceLogEmitter

* format

* Bump emulator version. (#959)

* Bump emulator version.

* Enable size and checksum check for FDC emulator.

* Add sslMode=disable to default local conn string (#960)

* Added simple smoke test for deploy --only dataconnect (#840)

* Scaffolding code and implementing list/createService

* Simple implementation of reading firemat.yaml and deploying schemas/operation sets

* More progress

* Adding source.ts

* Format and clean up bad merge

* cleaned up wrong tests

* Successfully deploying schemas, added cloudSql client

* E2E deploys working, cleaned up some cruft

* Add ensureApiEnabled, more cleanup

* Update src/commands/init.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* remove listSchemas

* trying to get install from git url working

* nope

* Another try

* also no

* Another round of cleanup

* Cleaning up

* Sketched up a dead simple integration/load test

* Updating to match new format

* Fixed this up to match new semantics

* formats

* Adding actual validation of what is deployed

* Made this way less hacky and easier to add more cases to in the future

* PR fixes

---------

Co-authored-by: Michael Bleigh <bleigh@google.com>

* add deploy all

* address comments

* Pass non demo- project id to emulator

* fix parse

* Adding shell:true to dataconnect emulator

---------

Co-authored-by: Remi Rousselet <darky12s@gmail.com>
Co-authored-by: Harold Shen <hlshen@google.com>
Co-authored-by: Michael Bleigh <bleigh@google.com>
Co-authored-by: TJ Lavelle <tlavelle@google.com>
Co-authored-by: Rosalyn Tan <rosalyntan@google.com>
Co-authored-by: Maneesh Tewani <mtewani@google.com>
blidd-google pushed a commit that referenced this issue May 1, 2024
* Decode firemat.yaml

* Show codelenses only folders corresponding to firemat.yaml

* Update tests to reflect config changes

* Apply suggestions from code review

* Remove invocation to missing command

* Enable running queries/mutations in production

* Apply suggestions from code review

* Fuse User Mock view and Arguments view (#837)

* Add Firebase Data Connect view

* Add Instance Picker

* Update codelense logic to use instance picker

* Add instance in status bar

* Add project in statusbar

* Add tests for src/core/config.ts (#825)

* Update config parsing to handle custom operationSet keys

* Rename

* Extract functions

* Rename

* Include Firebase logo next to the selected project

* Merge firemat with master

* Fix codelenses incorrectly showing in the schema folder but not in the operation folder (#841)

* Fix merge error

* W

* Complete execution e2e and fix failing e2e

* Cleanup tests

* Add instance picker e2e

* Remove log and revert .vscode change

* Move pageobjects to a separate folder

* Apply suggestions from code review

* Can pick nothing

* initial lsp implementation

* Add lsp binary

* Add lsp binary

* Fix another vue-compiler dynamic dep

* Emulator should stop taking focus

* Don't pick an instance by default, and show statusbar in red

* fix execute codelens not showing in adhoc folder

* fix merge mistake

* Add start-emulator command

* Instance default to emulator

* Show execution codelens even if emulator isn't started

* Auto-start emulator when targeting emulator but it isn't started

* Add support for adhoc files. Update emulator to 0.1.4. Small fix to ls refresh

* update emulator file

* add dataconnect icon to statusbar. Change statusbar color

* Minor ui updates

* Commit

* Delete unused conf

* Fix e2e

* Add some e2e tests

* Fix tests

* fix execute codelens not showing in adhoc folder

* Prototype `deploy --only dataconnect` (#820)

* Scaffolding code and implementing list/createService

* Simple implementation of reading firemat.yaml and deploying schemas/operation sets

* More progress

* Adding source.ts

* Format and clean up bad merge

* cleaned up wrong tests

* Successfully deploying schemas, added cloudSql client

* E2E deploys working, cleaned up some cruft

* Add ensureApiEnabled, more cleanup

* Update src/commands/init.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* remove listSchemas

* trying to get install from git url working

* nope

* Another try

* also no

* Another round of cleanup

* Cleaning up

* starting updates to match dataconect.yaml

* Fixed up deploy flow to read and use approved dataconnect.yaml

* Renaming it all to firemat

* one last spot

* Updating init as well

* Updating json schema

* one last spot

* self review fixes

* simplify init template

* Format and cleanup

* udpated json schema

* Update src/experiments.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* Update src/emulator/constants.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* PR fixes

* cleanup

* format

---------

Co-authored-by: Michael Bleigh <bleigh@google.com>

* Fix Emulators.FIREMAT rename

* Rename emulator to Dataconnect (#869)

The emulator was renamed in a previous commit, but it appears that there were some leftovers.

* Adding a parser for connector and service names (#866)

* Adding a parser for connector and service names

* no only

* update shrinkwrap

* Rename instance

* Update test

* More test update

* Update fishfood e2e

* Update e2e

* Fix emulator

* Fix console errors

* Fix path

* Fix test

* Fix inquirer error

* Rename folder

* Firemat > Data Connect

* webview id fix

* Revert firemat.yaml > dataconnect.yaml for now

* Format

* ignore wdio for vsix package

* Add initial deploy flow

* Add `dataconnect.list` command (#868)

* starting to implement dataconnect:list

* adding command file

* Adding a parser for connector and service names

* no only

* Adding dataconect:list command

* Add --json support

* silence warnings

* More silencing of warnings

* Pr fixes

* Update queries.gql (#889)

Turns out graphql-js is unable to parse empty argument lists

* Fix config file

* Adding a basic cloudsqladmin client (#879)

* starting to implement dataconnect:list

* adding command file

* Adding a parser for connector and service names

* no only

* Adding dataconect:list command

* Add --json support

* Adding a basic clodusqladmin client

* Minor cleanups

* formatting

* Delete is nonstandard

* format

* Connect to CloudSQL as a builtin user or service account (#878)

* starting to implement dataconnect:list

* adding command file

* Adding dataconect:list command

* Add --json support

* Adding a basic clodusqladmin client

* Minor cleanups

* formatting

* Delete is nonstandard

* Prototyping provisioning + connecting to an instance!

* Merge conflict

* Merge conflict

* Connecting via IAM users woprking with ADC auth

* format

* cleanup

* clean up!

* Provision CloudSQL resources on init and deploy (#882)

* starting to implement dataconnect:list

* adding command file

* Adding a parser for connector and service names

* no only

* Adding dataconect:list command

* Add --json support

* Adding a basic clodusqladmin client

* Minor cleanups

* formatting

* Delete is nonstandard

* Prototyping provisioning + connecting to an instance!

* Merge conflict

* Merge conflict

* Connecting via IAM users woprking with ADC auth

* format

* cleanup

* Added cloudSQL provisioning to deploy and init

* fixing instanceId

* Clean up

* npm-shrikwrapped

* Remove dependency on Option from readFirebaseJson (#893)

* Update configs

* Convert paths to absolute

* Fix path

* Fix move to connector

* location > source

* Cleanup

* Bump FDC emulator versions.

* In production, show connector ID

* Kinda update tes

* Fix FDC emulator absolute path.

* Remove log import.

* Lint.

* Fixing a bug from bugbash

* it builds now

* Pass the PG local connection string from an env variable to the emulator.

* Add utils for getting services and connectors. Service file uses correct serviceId. Small refactor

* Separate utils file to file-utils and config

* Pass `local_connection_string` flag to emulator.

* initial deploy commit

* pass config options to deploy

* Update deploy to pick from services, then connectors

* fix deploy

* resolve comments

* Default should be empty string.

* Ran npm run generate:json-schema

* Bump emulator version.

* Implement dataconnect:sql:diff and dataconnect:sgl:migrate (#897)

* Start scaffoling out code for schema migration

* progress on schema migration

* progress

* First time migrating a schema!!

* Adding a SQL formatter and breaking things

* Big improvements to permissions logic

* formats

* Self review

* fiddling with grants

* more cleanup and edge case fixing

* Run npm run generate:json-schema.

* Refactor "move to connector" to an assist

* initial stream compile errors implementation

* Handle multiple connectors for moveToConnector

* forgot to remove a test user

* forgot to remove a test user

* fixing undefined access error

* Validate and patch existing Cloud SQL instances.

* emulator bump

* Cleaning up and running a formatter.

* npm run format

* One more lint error.

* Linting one more time.

* Added support for connecting to cloudSQL using user accounts (#908)

* Added support for connecting to cloudSQL using user accounts

* finshing my sentences

* Add extra sequences grant, make URL optional

* More cleanup

* Address review comments.

* npm run lint:changed-files -- --fix

* emulator bump

* update api ver

* Re-add dataConnect specific api values as getters

* Fix path typo (#913)

* Fix sample project

* rename

* Cleanup

* Fix errors

* Revamp side panel to include postgres setter

* update dc staging api

* update staging url to use https

* ls package fixes

* dataconnect api flag

* update vscode env vars

* cli update

* Update src/utils.ts

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

* Tweak datasource in dataconnect:list (#909)

* format

* Adding schema files for dataconnect.yaml and connector.yaml (#918)

* Adding schema files for dataconnect.yaml and connector.yaml

* Fixed some errors

* add schema to contributes

* Perform schema migration during deploy as well (#917)

* Starting on adding schema migration to deploy

* Fixing force behavior

* format

* self review

* PR suggestions + 2 way choice when not destructive

* Make serviceID optional, prompt for deleting services (#925)

* Fix and refactor tests

* Updating firebase.json to accept array of dataconnects (#931)

* Updating firebase.json to accept array of dataconnects

* Fix type usage

* ===

* Add localConectionString into .firebaserc (#929)

* dataconnect production api

* add missing files

* change string concat

* format

* add language-service file

* fast fix for dataConnectSingle type

* typing fix for DataconnectMultiple

* remove ui for adding psql conn string

* address comments

* Bump FDC emulator version.

* Create CloudSQL instances with configuration needed for FDC free trial.

* Adding support for --only flags (#927)

* Adding support for --only falgs

* Minor cleanups

* Refactor for clarity

* deep equal

* deploy using a terminal

* respond to comments

* Remove backupConfiguration enablement, it already defaults to false.

* Add `dataconnect:sdk:generate` command (#934)

* Starting on generate

* Updating firebase.json to accept array of dataconnects

* More progress on generate

* Updating firebase.json to accept array of dataconnects

* Fix type usage

* ===

* Still getting enoent errors, unsure why

* Working!

* format

* Remove "connect to instance" logic and show running emulators in the status bar. (#947)

* Fixed package-lock and updated to use new emulator

* Refactor --force behavior match Freds proposal (#946)

* Refactor --force behavior match Freds proposal

* PR fixes

* adding comments

* Update emulator

* Add GraphQL.vscode-graphql-syntax as extension dependency (#948)

* Remove duplicate

* Updating emulator

* Correctly watch for dataconnect.yaml changes (#949)

* Validate local schema and connectors together before deploy (#952)

* Starting on build

* types

* Progress!

* Prettify errors

* Line numbers, and save deployment metadata

* Extremely defensive

* Update FDC free trial tag per latest decision. (#953)

* Only one free trial per project, please. (#955)

* Strating on pricing warning/free trial

* waiting until sync to continue

* Added free trial check

* clean up console.log

* Handle malformed dataconnect.yaml files (#950)

* Show FDC views only if FDC is enabled

* Enable Goole ML Integration if vector is used (#954)

* Code cleanup + add vector provisioning

* PR fixes

* Rebase

* Rebase

* Clean up todos

* PR fixes

* Use require vector everywhere

* format

* Update FDC Deploy view (#958)

* Starting point for piping logs to VSCode (#944)

* Starting point for piping logs to VSCode

* Add vsceLogEmitter

* format

* Bump emulator version. (#959)

* Bump emulator version.

* Enable size and checksum check for FDC emulator.

* Add sslMode=disable to default local conn string (#960)

* Added simple smoke test for deploy --only dataconnect (#840)

* Scaffolding code and implementing list/createService

* Simple implementation of reading firemat.yaml and deploying schemas/operation sets

* More progress

* Adding source.ts

* Format and clean up bad merge

* cleaned up wrong tests

* Successfully deploying schemas, added cloudSql client

* E2E deploys working, cleaned up some cruft

* Add ensureApiEnabled, more cleanup

* Update src/commands/init.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* remove listSchemas

* trying to get install from git url working

* nope

* Another try

* also no

* Another round of cleanup

* Cleaning up

* Sketched up a dead simple integration/load test

* Updating to match new format

* Fixed this up to match new semantics

* formats

* Adding actual validation of what is deployed

* Made this way less hacky and easier to add more cases to in the future

* PR fixes

---------

Co-authored-by: Michael Bleigh <bleigh@google.com>

* add deploy all

* address comments

* Pass non demo- project id to emulator

* fix parse

* Adding shell:true to dataconnect emulator

---------

Co-authored-by: Remi Rousselet <darky12s@gmail.com>
Co-authored-by: Harold Shen <hlshen@google.com>
Co-authored-by: Michael Bleigh <bleigh@google.com>
Co-authored-by: TJ Lavelle <tlavelle@google.com>
Co-authored-by: Rosalyn Tan <rosalyntan@google.com>
Co-authored-by: Maneesh Tewani <mtewani@google.com>
mathu97 pushed a commit that referenced this issue May 6, 2024
* Decode firemat.yaml

* Show codelenses only folders corresponding to firemat.yaml

* Update tests to reflect config changes

* Apply suggestions from code review

* Remove invocation to missing command

* Enable running queries/mutations in production

* Apply suggestions from code review

* Fuse User Mock view and Arguments view (#837)

* Add Firebase Data Connect view

* Add Instance Picker

* Update codelense logic to use instance picker

* Add instance in status bar

* Add project in statusbar

* Add tests for src/core/config.ts (#825)

* Update config parsing to handle custom operationSet keys

* Rename

* Extract functions

* Rename

* Include Firebase logo next to the selected project

* Merge firemat with master

* Fix codelenses incorrectly showing in the schema folder but not in the operation folder (#841)

* Fix merge error

* W

* Complete execution e2e and fix failing e2e

* Cleanup tests

* Add instance picker e2e

* Remove log and revert .vscode change

* Move pageobjects to a separate folder

* Apply suggestions from code review

* Can pick nothing

* initial lsp implementation

* Add lsp binary

* Add lsp binary

* Fix another vue-compiler dynamic dep

* Emulator should stop taking focus

* Don't pick an instance by default, and show statusbar in red

* fix execute codelens not showing in adhoc folder

* fix merge mistake

* Add start-emulator command

* Instance default to emulator

* Show execution codelens even if emulator isn't started

* Auto-start emulator when targeting emulator but it isn't started

* Add support for adhoc files. Update emulator to 0.1.4. Small fix to ls refresh

* update emulator file

* add dataconnect icon to statusbar. Change statusbar color

* Minor ui updates

* Commit

* Delete unused conf

* Fix e2e

* Add some e2e tests

* Fix tests

* fix execute codelens not showing in adhoc folder

* Prototype `deploy --only dataconnect` (#820)

* Scaffolding code and implementing list/createService

* Simple implementation of reading firemat.yaml and deploying schemas/operation sets

* More progress

* Adding source.ts

* Format and clean up bad merge

* cleaned up wrong tests

* Successfully deploying schemas, added cloudSql client

* E2E deploys working, cleaned up some cruft

* Add ensureApiEnabled, more cleanup

* Update src/commands/init.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* remove listSchemas

* trying to get install from git url working

* nope

* Another try

* also no

* Another round of cleanup

* Cleaning up

* starting updates to match dataconect.yaml

* Fixed up deploy flow to read and use approved dataconnect.yaml

* Renaming it all to firemat

* one last spot

* Updating init as well

* Updating json schema

* one last spot

* self review fixes

* simplify init template

* Format and cleanup

* udpated json schema

* Update src/experiments.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* Update src/emulator/constants.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* PR fixes

* cleanup

* format

---------

Co-authored-by: Michael Bleigh <bleigh@google.com>

* Fix Emulators.FIREMAT rename

* Rename emulator to Dataconnect (#869)

The emulator was renamed in a previous commit, but it appears that there were some leftovers.

* Adding a parser for connector and service names (#866)

* Adding a parser for connector and service names

* no only

* update shrinkwrap

* Rename instance

* Update test

* More test update

* Update fishfood e2e

* Update e2e

* Fix emulator

* Fix console errors

* Fix path

* Fix test

* Fix inquirer error

* Rename folder

* Firemat > Data Connect

* webview id fix

* Revert firemat.yaml > dataconnect.yaml for now

* Format

* ignore wdio for vsix package

* Add initial deploy flow

* Add `dataconnect.list` command (#868)

* starting to implement dataconnect:list

* adding command file

* Adding a parser for connector and service names

* no only

* Adding dataconect:list command

* Add --json support

* silence warnings

* More silencing of warnings

* Pr fixes

* Update queries.gql (#889)

Turns out graphql-js is unable to parse empty argument lists

* Fix config file

* Adding a basic cloudsqladmin client (#879)

* starting to implement dataconnect:list

* adding command file

* Adding a parser for connector and service names

* no only

* Adding dataconect:list command

* Add --json support

* Adding a basic clodusqladmin client

* Minor cleanups

* formatting

* Delete is nonstandard

* format

* Connect to CloudSQL as a builtin user or service account (#878)

* starting to implement dataconnect:list

* adding command file

* Adding dataconect:list command

* Add --json support

* Adding a basic clodusqladmin client

* Minor cleanups

* formatting

* Delete is nonstandard

* Prototyping provisioning + connecting to an instance!

* Merge conflict

* Merge conflict

* Connecting via IAM users woprking with ADC auth

* format

* cleanup

* clean up!

* Provision CloudSQL resources on init and deploy (#882)

* starting to implement dataconnect:list

* adding command file

* Adding a parser for connector and service names

* no only

* Adding dataconect:list command

* Add --json support

* Adding a basic clodusqladmin client

* Minor cleanups

* formatting

* Delete is nonstandard

* Prototyping provisioning + connecting to an instance!

* Merge conflict

* Merge conflict

* Connecting via IAM users woprking with ADC auth

* format

* cleanup

* Added cloudSQL provisioning to deploy and init

* fixing instanceId

* Clean up

* npm-shrikwrapped

* Remove dependency on Option from readFirebaseJson (#893)

* Update configs

* Convert paths to absolute

* Fix path

* Fix move to connector

* location > source

* Cleanup

* Bump FDC emulator versions.

* In production, show connector ID

* Kinda update tes

* Fix FDC emulator absolute path.

* Remove log import.

* Lint.

* Fixing a bug from bugbash

* it builds now

* Pass the PG local connection string from an env variable to the emulator.

* Add utils for getting services and connectors. Service file uses correct serviceId. Small refactor

* Separate utils file to file-utils and config

* Pass `local_connection_string` flag to emulator.

* initial deploy commit

* pass config options to deploy

* Update deploy to pick from services, then connectors

* fix deploy

* resolve comments

* Default should be empty string.

* Ran npm run generate:json-schema

* Bump emulator version.

* Implement dataconnect:sql:diff and dataconnect:sgl:migrate (#897)

* Start scaffoling out code for schema migration

* progress on schema migration

* progress

* First time migrating a schema!!

* Adding a SQL formatter and breaking things

* Big improvements to permissions logic

* formats

* Self review

* fiddling with grants

* more cleanup and edge case fixing

* Run npm run generate:json-schema.

* Refactor "move to connector" to an assist

* initial stream compile errors implementation

* Handle multiple connectors for moveToConnector

* forgot to remove a test user

* forgot to remove a test user

* fixing undefined access error

* Validate and patch existing Cloud SQL instances.

* emulator bump

* Cleaning up and running a formatter.

* npm run format

* One more lint error.

* Linting one more time.

* Added support for connecting to cloudSQL using user accounts (#908)

* Added support for connecting to cloudSQL using user accounts

* finshing my sentences

* Add extra sequences grant, make URL optional

* More cleanup

* Address review comments.

* npm run lint:changed-files -- --fix

* emulator bump

* update api ver

* Re-add dataConnect specific api values as getters

* Fix path typo (#913)

* Fix sample project

* rename

* Cleanup

* Fix errors

* Revamp side panel to include postgres setter

* update dc staging api

* update staging url to use https

* ls package fixes

* dataconnect api flag

* update vscode env vars

* cli update

* Update src/utils.ts

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

* Tweak datasource in dataconnect:list (#909)

* format

* Adding schema files for dataconnect.yaml and connector.yaml (#918)

* Adding schema files for dataconnect.yaml and connector.yaml

* Fixed some errors

* add schema to contributes

* Perform schema migration during deploy as well (#917)

* Starting on adding schema migration to deploy

* Fixing force behavior

* format

* self review

* PR suggestions + 2 way choice when not destructive

* Make serviceID optional, prompt for deleting services (#925)

* Fix and refactor tests

* Updating firebase.json to accept array of dataconnects (#931)

* Updating firebase.json to accept array of dataconnects

* Fix type usage

* ===

* Add localConectionString into .firebaserc (#929)

* dataconnect production api

* add missing files

* change string concat

* format

* add language-service file

* fast fix for dataConnectSingle type

* typing fix for DataconnectMultiple

* remove ui for adding psql conn string

* address comments

* Bump FDC emulator version.

* Create CloudSQL instances with configuration needed for FDC free trial.

* Adding support for --only flags (#927)

* Adding support for --only falgs

* Minor cleanups

* Refactor for clarity

* deep equal

* deploy using a terminal

* respond to comments

* Remove backupConfiguration enablement, it already defaults to false.

* Add `dataconnect:sdk:generate` command (#934)

* Starting on generate

* Updating firebase.json to accept array of dataconnects

* More progress on generate

* Updating firebase.json to accept array of dataconnects

* Fix type usage

* ===

* Still getting enoent errors, unsure why

* Working!

* format

* Remove "connect to instance" logic and show running emulators in the status bar. (#947)

* Fixed package-lock and updated to use new emulator

* Refactor --force behavior match Freds proposal (#946)

* Refactor --force behavior match Freds proposal

* PR fixes

* adding comments

* Update emulator

* Add GraphQL.vscode-graphql-syntax as extension dependency (#948)

* Remove duplicate

* Updating emulator

* Correctly watch for dataconnect.yaml changes (#949)

* Validate local schema and connectors together before deploy (#952)

* Starting on build

* types

* Progress!

* Prettify errors

* Line numbers, and save deployment metadata

* Extremely defensive

* Update FDC free trial tag per latest decision. (#953)

* Only one free trial per project, please. (#955)

* Strating on pricing warning/free trial

* waiting until sync to continue

* Added free trial check

* clean up console.log

* Handle malformed dataconnect.yaml files (#950)

* Show FDC views only if FDC is enabled

* Enable Goole ML Integration if vector is used (#954)

* Code cleanup + add vector provisioning

* PR fixes

* Rebase

* Rebase

* Clean up todos

* PR fixes

* Use require vector everywhere

* format

* Update FDC Deploy view (#958)

* Starting point for piping logs to VSCode (#944)

* Starting point for piping logs to VSCode

* Add vsceLogEmitter

* format

* Bump emulator version. (#959)

* Bump emulator version.

* Enable size and checksum check for FDC emulator.

* Add sslMode=disable to default local conn string (#960)

* Added simple smoke test for deploy --only dataconnect (#840)

* Scaffolding code and implementing list/createService

* Simple implementation of reading firemat.yaml and deploying schemas/operation sets

* More progress

* Adding source.ts

* Format and clean up bad merge

* cleaned up wrong tests

* Successfully deploying schemas, added cloudSql client

* E2E deploys working, cleaned up some cruft

* Add ensureApiEnabled, more cleanup

* Update src/commands/init.ts

Co-authored-by: Michael Bleigh <bleigh@google.com>

* remove listSchemas

* trying to get install from git url working

* nope

* Another try

* also no

* Another round of cleanup

* Cleaning up

* Sketched up a dead simple integration/load test

* Updating to match new format

* Fixed this up to match new semantics

* formats

* Adding actual validation of what is deployed

* Made this way less hacky and easier to add more cases to in the future

* PR fixes

---------

Co-authored-by: Michael Bleigh <bleigh@google.com>

* add deploy all

* address comments

* Pass non demo- project id to emulator

* fix parse

* Adding shell:true to dataconnect emulator

---------

Co-authored-by: Remi Rousselet <darky12s@gmail.com>
Co-authored-by: Harold Shen <hlshen@google.com>
Co-authored-by: Michael Bleigh <bleigh@google.com>
Co-authored-by: TJ Lavelle <tlavelle@google.com>
Co-authored-by: Rosalyn Tan <rosalyntan@google.com>
Co-authored-by: Maneesh Tewani <mtewani@google.com>
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

No branches or pull requests

7 participants