Remove Data Connect service deletion logic on deploy - #10619
Conversation
### 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`
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
### 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`
* 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`
* 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`
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
deploy.spec.tsupdated and run:npx mocha src/deploy/dataconnect/deploy.spec.tsSample Commands
firebase deploy --only dataconnectDescription
Scenarios Tested
Sample Commands