OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

Redeploy Pipelines fails for ingestion pipelines referencing soft-deleted Database Services

Open nikhilchennam opened this issue 4 months ago • 1 comments

Affected module

Backend

Describe the bug

During an upgrade to v1.13.1, the Redeploy Pipelines operation fails when one or more ingestion pipelines reference a soft-deleted Database Service.

Instead of handling the soft-deleted service gracefully, the redeploy process throws an EntityNotFoundException and aborts.

Error

org.openmetadata.service.exception.EntityNotFoundException:
databaseService instance for 60278312-d77d-4c59-a246-e98f024b7c0f not found
Failed to deploy pipelines
Parent 'testCase' declares child alias 'testCaseResult' which does not support SoftDelete (isTimeSeries=true)
Parent 'testCase' declares child alias 'testCaseResolutionStatus' which does not support SoftDelete (isTimeSeries=true)

To Reproduce

  • The service is Soft-deleted, "deleted": true
  • Restoring the service unblocks the redeploy operation.

Expected behavior

The redeploy process should handle ingestion pipelines associated with soft-deleted services gracefully. It should either:

  • Skip pipelines belonging to soft-deleted services, or
  • Handle the soft-deleted entity without throwing an EntityNotFoundException.

OS

No response

Python version

No response

OpenMetadata version

No response

OpenMetadata Ingestion package version

No response

Additional context

No response

Pre-submission checklist

  • [x] I searched for duplicate issues.
  • [x] I removed credentials, hostnames, emails, and other sensitive data from logs and config.

nikhilchennam avatar Jul 13 '26 05:07 nikhilchennam

Confirming this also breaks the restore flow itself, not just a standalone redeploy — so the workaround suggested here ("restore the service first") doesn't apply in this scenario, since restoring is exactly what triggers it.

  • OpenMetadata Server Version: 1.13.1
  • Deployment: Self-hosted, Kubernetes (Helm)

Restoring a soft-deleted Database Service (StarRocks connector) fails outright with a 400 error ({"code":400,"message":"Deployment failed. Changes not saved."}), because the restore recursively restores its child ingestion pipeline, which needs redeployment, which then hits this exact EntityNotFoundException trying to read the still-soft-deleted parent service:

INFO [dw-53059 - PUT /api/v1/services/databaseServices/restore] o.o.s.j.EntityRepository - Recursively restoring ingestionPipeline 1340d060-d52c-457a-ad40-89480e0322a4 INFO [dw-53059 - PUT /api/v1/services/databaseServices/restore] o.o.s.j.IngestionPipelineRepository - Pipeline '0cefbbc0-53ed-4801-99db-aee71c4d2fcf' requires redeployment due to configuration changes. Deploying before DB update. ERROR [dw-53059 - PUT /api/v1/services/databaseServices/restore] o.o.s.j.IngestionPipelineRepository - Unexpected error deploying pipeline '0cefbbc0-53ed-4801-99db-aee71c4d2fcf' before update. Aborting DB update. org.openmetadata.service.exception.EntityNotFoundException: databaseService instance for 6528d906-3a8c-4309-af41-d4eab1251b03 not found at org.openmetadata.service.jdbi3.EntityRepository.find(EntityRepository.java:1493) at org.openmetadata.service.jdbi3.IngestionPipelineRepository.deployPipelineBeforeUpdate(IngestionPipelineRepository.java:362) at org.openmetadata.service.jdbi3.IngestionPipelineRepository$IngestionPipelineUpdater.deployIfRequired(IngestionPipelineRepository.java:851) at org.openmetadata.service.jdbi3.EntityRepository.restoreEntity(EntityRepository.java:5667) at org.openmetadata.service.jdbi3.EntityRepository.restoreChildren(EntityRepository.java:5686) at org.openmetadata.service.resources.services.database.DatabaseServiceResource.restoreDatabaseService(DatabaseServiceResource.java:786)

This makes the service completely unrecoverable through the UI/API restore flow — since restoring is itself blocked by the same underlying issue that's supposed to be worked around by restoring.

vis-537 avatar Jul 30 '26 12:07 vis-537