Skip to content

Conversation

@aleksandarskrbic
Copy link

@aleksandarskrbic aleksandarskrbic commented Nov 24, 2025

What kind of change does this PR introduce?

Feature - Publication lifecycle management and pipeline validation

What is the current behavior?

Fixes #41: Publications can be deleted while pipelines still reference them, causing runtime failures. Pipelines can be created with non-existent publications.

What is the new behavior?

Added validation and protection:

  • Publications cannot be deleted if referenced by active pipelines (returns 409 Conflict with pipeline IDs)
  • Pipeline creation validates publication exists on source database (returns 400 if missing)
  • Pipeline updates validate publication exists on source database (returns 400 if missing)

New endpoint:

  • GET /v1/sources/{source_id}/publications/{publication_name}/pipelines - Lists all pipelines using a publication

Updated endpoints:

  • POST /v1/pipelines - Now validates publication exists before creating pipeline
  • POST /v1/pipelines/{id} - Now validates publication exists before updating pipeline
  • DELETE /v1/sources/{source_id}/publications/{publication_name} - Now returns 409 Conflict if pipelines reference the publication

@aleksandarskrbic aleksandarskrbic requested a review from a team as a code owner November 24, 2025 10:36
@aleksandarskrbic aleksandarskrbic changed the title Aleksandarskrbic/feat/delete publication feat(etl-api): handle case when publication is deleted Nov 24, 2025
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.

Handle the case when publication is deleted when referenced by a pipeline

1 participant