Skip to content

ETL-811: migrate to pipeline v3#66

Open
PabloPardoGarcia wants to merge 18 commits intomainfrom
add-support-for-pipeline-v3
Open

ETL-811: migrate to pipeline v3#66
PabloPardoGarcia wants to merge 18 commits intomainfrom
add-support-for-pipeline-v3

Conversation

@PabloPardoGarcia
Copy link
Copy Markdown
Member

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

Coverage

Test Coverage Report
FileStmtsMissCoverMissing
etl
   __init__.py60100% 
   api_client.py64592%70–73, 123
   client.py39489%59–61, 141
   dlq.py41197%70
   errors.py280100% 
   pipeline.py149795%353–356, 369, 425–426
   tracking.py260100% 
   utils.py49197%109
etl/models
   __init__.py100100% 
   base.py10190%9
   config.py34876%37, 40–41, 43–45, 47–48
   data_types.py800100% 
   metadata.py40100% 
   pipeline.py137596%58, 167, 207, 232, 263
   resources.py1203769%31, 72–78, 88–95, 125–132, 142, 144–150, 167, 169, 172–174
   sink.py77790%36, 44, 46, 81, 83, 85, 87
   source.py140100% 
etl/models/sources
   __init__.py100100% 
   kafka.py102199%100
   otlp.py150100% 
etl/models/transforms
   __init__.py50100% 
   deduplication.py38489%17, 25, 47, 51
   filter.py15193%15
   join.py67494%55, 85, 95, 101
   stateless_transformation.py48883%48, 52, 56, 61, 73, 75, 77, 79
TOTAL11889492% 

@github-actions
Copy link
Copy Markdown
Contributor

Coverage

Test Coverage Report
FileStmtsMissCoverMissing
glassflow/etl
   __init__.py60100% 
   api_client.py64592%70–73, 123
   client.py39489%59–61, 141
   dlq.py41197%70
   errors.py280100% 
   pipeline.py149795%353–356, 369, 425–426
   tracking.py260100% 
   utils.py49197%109
glassflow/etl/models
   __init__.py100100% 
   base.py10190%9
   config.py34876%37, 40–41, 43–45, 47–48
   data_types.py800100% 
   metadata.py40100% 
   pipeline.py137596%58, 167, 207, 232, 263
   resources.py1203769%31, 72–78, 88–95, 125–132, 142, 144–150, 167, 169, 172–174
   sink.py77790%36, 44, 46, 81, 83, 85, 87
   source.py140100% 
glassflow/etl/models/sources
   __init__.py100100% 
   kafka.py102199%100
   otlp.py150100% 
glassflow/etl/models/transforms
   __init__.py50100% 
   deduplication.py38489%17, 25, 47, 51
   filter.py15193%15
   join.py67494%55, 85, 95, 101
   stateless_transformation.py48883%48, 52, 56, 61, 73, 75, 77, 79
TOTAL11889492% 

PabloPardoGarcia and others added 2 commits April 10, 2026 18:05
Restructure the SDK models to match the new V3 pipeline specification:

- sources: flat list of independent source objects (each with own
  connection_params and single topic) replaces nested source.topics
- transforms: unified list of {type, source_id, config} entries
  replaces separate filter, stateless_transformation, and per-topic
  deduplication fields
- join: explicit left_source/right_source with output_fields replaces
  sources list with orientation
- resources: renamed from pipeline_resources, with sources list
  (replaces ingestor) and per-source_id transform list

Also fixes: NullPointerError in resource update methods, missing
source_id uniqueness validation, duplicate data_types mapping key,
and missing @classmethod on Pydantic validator.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@PabloPardoGarcia PabloPardoGarcia marked this pull request as ready for review April 10, 2026 16:07
@github-actions
Copy link
Copy Markdown
Contributor

Coverage

Test Coverage Report
FileStmtsMissCoverMissing
glassflow/etl
   __init__.py60100% 
   api_client.py64592%70–73, 123
   client.py39489%59–61, 141
   dlq.py41197%70
   errors.py280100% 
   pipeline.py149397%365, 439–440
   tracking.py260100% 
   utils.py1152082%73, 93, 126–127, 165, 231–236, 238–241, 244–247, 250
glassflow/etl/models
   __init__.py100100% 
   base.py10190%9
   config.py34682%30–35
   data_types.py810100% 
   metadata.py40100% 
   pipeline.py1281191%52, 84, 89, 92, 111, 120, 145, 171, 184, 187, 190
   resources.py731184%33, 42–47, 93, 97, 122, 124
   sink.py77790%36, 44, 46, 81, 83, 85, 87
   source.py140100% 
glassflow/etl/models/sources
   __init__.py100100% 
   kafka.py94297%64, 95
   otlp.py110100% 
glassflow/etl/models/transforms
   __init__.py250100% 
   deduplication.py18194%16
   filter.py30100% 
   join.py51198%49
   stateless_transformation.py80100% 
TOTAL11197393% 

@github-actions
Copy link
Copy Markdown
Contributor

Coverage

Test Coverage Report
FileStmtsMissCoverMissing
glassflow/etl
   __init__.py60100% 
   api_client.py64592%70–73, 123
   client.py39489%59–61, 141
   dlq.py41197%70
   errors.py280100% 
   pipeline.py149397%365, 439–440
   tracking.py260100% 
   utils.py1152082%73, 93, 126–127, 165, 231–236, 238–241, 244–247, 250
glassflow/etl/models
   __init__.py100100% 
   base.py10190%9
   config.py34682%30–35
   data_types.py810100% 
   metadata.py40100% 
   pipeline.py1281191%52, 84, 89, 92, 111, 120, 145, 171, 184, 187, 190
   resources.py731184%33, 42–47, 93, 97, 122, 124
   sink.py77790%36, 44, 46, 81, 83, 85, 87
   source.py140100% 
glassflow/etl/models/sources
   __init__.py100100% 
   kafka.py94297%64, 95
   otlp.py110100% 
glassflow/etl/models/transforms
   __init__.py250100% 
   deduplication.py18194%16
   filter.py30100% 
   join.py51198%49
   stateless.py80100% 
TOTAL11197393% 

PabloPardoGarcia and others added 2 commits April 22, 2026 16:53
The backend v3.0.0 release ships a POST /api/v1/pipeline/migrate-preview
endpoint that converts v2 pipeline configs to v3 server-side. The SDK
no longer needs its own local conversion logic.

Changes:

- Add Client.migrate_pipeline_v2_to_v3(config) that POSTs to the new
  endpoint and returns a validated PipelineConfig. Same signature as
  the removed helper so callers only update the import site.
- Remove src/glassflow/etl/utils.py (the old local helper) and
  tests/test_utils.py (its tests).
- Drop migrate_pipeline_v2_to_v3 from the etl package __all__ export.
- Update the v2-rejection error in PipelineConfig.validate_version to
  suggest the new Client method:

      Pipeline version v2 is no longer supported by this SDK. Convert
      your v2 configuration to v3 by calling
      `glassflow.etl.Client().migrate_pipeline_v2_to_v3(config)`,
      then pass the returned config to create_pipeline(). Alternatively,
      pin glassflow-python-sdk<4.0.0 to keep working with v2 pipelines
      directly.

  The v1 rejection is now a separate message (no Client hint — no
  migration path for v1).

- Add two unit tests for the new Client method: success path asserts a
  POST to /api/v1/pipeline/migrate-preview with the v2 body and a
  validated PipelineConfig return; error path asserts APIError
  surfaces.

Verified on the staging cluster (http://localhost:8081 port-forward):
the endpoint correctly migrates a real v2 Kafka+dedup pipeline to v3
(sources[], transforms[], nested sink.connection_params, sink.mapping
from top-level schema). The full SDK smoke test across Client,
Pipeline, and DLQ methods passes (17/17) including create from dict
and YAML file, get, rename, to/from YAML and JSON, stop, resume,
terminate, delete, and DLQ state/consume.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collapsed the migrate test signature onto a single line per ruff
format; no behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Coverage

Test Coverage Report
FileStmtsMissCoverMissing
etl
   __init__.py50100% 
   api_client.py64592%70–73, 123
   client.py46491%59–61, 176
   dlq.py41197%70
   errors.py280100% 
   pipeline.py149397%365, 439–440
   tracking.py260100% 
etl/models
   __init__.py100100% 
   base.py10190%9
   config.py34682%30–35
   data_types.py810100% 
   metadata.py40100% 
   pipeline.py1301290%52, 57, 91, 96, 99, 118, 127, 152, 178, 191, 194, 197
   resources.py731184%33, 42–47, 93, 97, 122, 124
   sink.py77790%36, 44, 46, 81, 83, 85, 87
   source.py140100% 
etl/models/sources
   __init__.py100100% 
   kafka.py94297%64, 95
   otlp.py110100% 
etl/models/transforms
   __init__.py250100% 
   deduplication.py18194%16
   filter.py30100% 
   join.py51198%49
   stateless.py80100% 
TOTAL10125494% 

@github-actions
Copy link
Copy Markdown
Contributor

Coverage

Test Coverage Report
FileStmtsMissCoverMissing
etl
   __init__.py50100% 
   api_client.py64592%70–73, 123
   client.py46491%59–61, 176
   dlq.py41197%70
   errors.py280100% 
   pipeline.py149397%365, 439–440
   tracking.py260100% 
etl/models
   __init__.py100100% 
   base.py10190%9
   config.py34682%30–35
   data_types.py810100% 
   metadata.py40100% 
   pipeline.py1301290%52, 57, 91, 96, 99, 118, 127, 152, 178, 191, 194, 197
   resources.py731184%33, 42–47, 93, 97, 122, 124
   sink.py77790%36, 44, 46, 81, 83, 85, 87
   source.py140100% 
etl/models/sources
   __init__.py100100% 
   kafka.py94297%64, 95
   otlp.py110100% 
etl/models/transforms
   __init__.py250100% 
   deduplication.py18194%16
   filter.py30100% 
   join.py51198%49
   stateless.py80100% 
TOTAL10125494% 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant