close
Skip to content

Remove Data Connect service deletion logic on deploy - #10619

Merged
fredzqm merged 4 commits into
mainfrom
dataconnect-remove-delete-prompt
Jun 10, 2026
Merged

Remove Data Connect service deletion logic on deploy#10619
fredzqm merged 4 commits into
mainfrom
dataconnect-remove-delete-prompt

Conversation

@fredzqm

@fredzqm fredzqm commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description

Removes the prompt and backend deletion of Data Connect services during firebase deploy. It is a common and well-intended usecase to have multiple Data Connect repositories sharing the same Firebase project. Without removing this prompt and deletion behavior, deploying from one repository would attempt to delete the services of the other, or prompt the user unexpectedly.

We don't really have good support to track >1 FDC services in the same local folder, making it very difficult to address this prompt in a proper way.

Scenarios Tested

  • Unit tests in deploy.spec.ts updated and run:
    • npx mocha src/deploy/dataconnect/deploy.spec.ts

Sample Commands

  • firebase deploy --only dataconnect

Description

Scenarios Tested

Sample Commands

fredzqm added 2 commits June 10, 2026 10:15
### Description
Removes the prompt and backend deletion of Data Connect services during `firebase deploy`. It is a common and well-intended usecase to have multiple Data Connect repositories sharing the same Firebase project. Without removing this prompt and deletion behavior, deploying from one repository would attempt to delete the services of the other, or prompt the user unexpectedly.

### Scenarios Tested
- Unit tests in `deploy.spec.ts` updated and run:
  - `npx mocha src/deploy/dataconnect/deploy.spec.ts`

### Sample Commands
- `firebase deploy --only dataconnect`
@fredzqm
fredzqm requested a review from joehan June 10, 2026 17:18

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request removes the prompt and logic to delete Data Connect services not listed in firebase.json during deployment, along with their associated unit tests. The reviewer suggests cleaning up the unused numServiceDeleted property from the DeployStats interface and context to avoid maintaining dead code and reporting redundant telemetry metrics.

const servicesToDelete = filters
? []
: services.filter((s) => !serviceInfos.some((si) => matches(si, s)));
dataconnect.deployStats.numServiceDeleted = servicesToDelete.length;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

With the removal of the service deletion logic, dataconnect.deployStats.numServiceDeleted is no longer set and will always default to 0. To avoid maintaining dead code and reporting redundant telemetry metrics, please also clean up numServiceDeleted from the DeployStats interface and deployStatsParams in src/deploy/dataconnect/context.ts.

@fredzqm fredzqm changed the title (cleanup): remove Data Connect service deletion prompt on deploy Remove Data Connect service deletion logic on deploy Jun 10, 2026
fredzqm added 2 commits June 10, 2026 10:21
### Description
Removes `numServiceDeleted` from the `DeployStats` interface and telemetry params (`deployStatsParams`) in `src/deploy/dataconnect/context.ts` to avoid reporting redundant telemetry metrics.

### Scenarios Tested
- Run tests: `npx mocha src/deploy/dataconnect/deploy.spec.ts`
- Ran build: `npm run build`
@fredzqm
fredzqm merged commit 6b9723e into main Jun 10, 2026
51 checks passed
@fredzqm
fredzqm deleted the dataconnect-remove-delete-prompt branch June 10, 2026 19:29
mtr002 pushed a commit that referenced this pull request Jun 10, 2026
* feat: remove Data Connect service deletion prompt on deploy

### Description
Removes the prompt and backend deletion of Data Connect services during `firebase deploy`. It is a common and well-intended usecase to have multiple Data Connect repositories sharing the same Firebase project. Without removing this prompt and deletion behavior, deploying from one repository would attempt to delete the services of the other, or prompt the user unexpectedly.

### Scenarios Tested
- Unit tests in `deploy.spec.ts` updated and run:
  - `npx mocha src/deploy/dataconnect/deploy.spec.ts`

### Sample Commands
- `firebase deploy --only dataconnect`

* no need for changelog

* refactor: clean up numServiceDeleted telemetry metric from DeployStats

### Description
Removes `numServiceDeleted` from the `DeployStats` interface and telemetry params (`deployStatsParams`) in `src/deploy/dataconnect/context.ts` to avoid reporting redundant telemetry metrics.

### Scenarios Tested
- Run tests: `npx mocha src/deploy/dataconnect/deploy.spec.ts`
- Ran build: `npm run build`
fredzqm added a commit that referenced this pull request Jun 10, 2026
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
bkendall pushed a commit that referenced this pull request Jul 9, 2026
* feat: remove Data Connect service deletion prompt on deploy

### Description
Removes the prompt and backend deletion of Data Connect services during `firebase deploy`. It is a common and well-intended usecase to have multiple Data Connect repositories sharing the same Firebase project. Without removing this prompt and deletion behavior, deploying from one repository would attempt to delete the services of the other, or prompt the user unexpectedly.

### Scenarios Tested
- Unit tests in `deploy.spec.ts` updated and run:
  - `npx mocha src/deploy/dataconnect/deploy.spec.ts`

### Sample Commands
- `firebase deploy --only dataconnect`

* no need for changelog

* refactor: clean up numServiceDeleted telemetry metric from DeployStats

### Description
Removes `numServiceDeleted` from the `DeployStats` interface and telemetry params (`deployStatsParams`) in `src/deploy/dataconnect/context.ts` to avoid reporting redundant telemetry metrics.

### Scenarios Tested
- Run tests: `npx mocha src/deploy/dataconnect/deploy.spec.ts`
- Ran build: `npm run build`
bkendall pushed a commit that referenced this pull request Jul 9, 2026
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.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

Successfully merging this pull request may close these issues.

4 participants