[dagster-spark] mark spark declarative pipelines as preview; add API doc references#33665
Merged
Conversation
OwenKephart
approved these changes
Mar 24, 2026
Contributor
Greptile SummaryThis PR marks all three user-facing Spark Declarative Pipeline APIs — Key changes:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| python_modules/libraries/dagster-spark/dagster_spark/components/spark_declarative_pipeline/component.py | Adds @preview decorator above @scaffold_with and @dataclass on SparkDeclarativePipelineComponent; correctly follows the existing pattern used in other Dagster library components. |
| python_modules/libraries/dagster-spark/dagster_spark/components/spark_declarative_pipeline/resource.py | Adds @preview decorator to SparkPipelinesResource (a ConfigurableResource subclass); clean, minimal change. |
| python_modules/libraries/dagster-spark/dagster_spark/components/spark_declarative_pipeline/scaffolder.py | Adds @preview decorator to SparkDeclarativePipelineScaffolder; clean change consistent with the other two classes in this PR. |
| docs/sphinx/sections/integrations/libraries/spark/dagster-spark.rst | Adds a new "Spark Declarative Pipelines" section with autoclass directives for all three new preview classes; currentmodule is correctly scoped — SparkDeclarativePipelineComponent is found under dagster_spark (re-exported in __init__.py) while SparkPipelinesResource and SparkDeclarativePipelineScaffolder use dagster_spark.components.spark_declarative_pipeline. |
| python_modules/libraries/dagster-spark/dagster_spark_tests/components/spark_declarative_pipeline/test_component.py | Adds module-level pytestmark to suppress dagster.PreviewWarning across all component tests; correct approach given the new @preview decorators. |
| python_modules/libraries/dagster-spark/dagster_spark_tests/components/spark_declarative_pipeline/test_resource.py | Adds module-level pytestmark to suppress dagster.PreviewWarning across all resource tests; pytest was already imported so no additional import needed. |
Sequence Diagram
sequenceDiagram
participant User
participant Component as SparkDeclarativePipelineComponent<br/>(@preview)
participant Resource as SparkPipelinesResource<br/>(@preview)
participant Scaffolder as SparkDeclarativePipelineScaffolder<br/>(@preview)
participant CLI as spark-pipelines CLI
User->>Scaffolder: scaffold(request)
Note over Scaffolder: Emits PreviewWarning
Scaffolder-->>User: defs.yaml + pipeline spec
User->>Component: load from YAML
Note over Component: Emits PreviewWarning
Component->>CLI: dry-run / source_only discovery
CLI-->>Component: discovered datasets
Component->>Component: write_state_to_path()
User->>Component: build_defs_from_state()
Component->>Component: deserialize SparkPipelineState
Component->>Component: filter temporary_view datasets
Component-->>User: Definitions (multi_asset + resource)
User->>Resource: run_and_observe(context, spec_path)
Note over Resource: Emits PreviewWarning
Resource->>CLI: spark-pipelines run --spec ...
CLI-->>Resource: stdout/stderr (streaming)
Resource->>Resource: context.log.info(line)
Resource-->>User: raises SparkPipelinesExecutionError on non-zero exit
User->>User: yield MaterializeResult per asset key
Reviews (1): Last reviewed commit: "[dagster-spark] mark spark declarative p..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary & Motivation
Follow up to #33539
previewTest Plan
Changelog