File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ def compile(
124124 environment = pipeline_environment ,
125125 secrets = pipeline_secrets ,
126126 settings = pipeline_settings ,
127+ parameters = pipeline ._parameters ,
127128 merge = False ,
128129 )
129130
Original file line number Diff line number Diff line change @@ -686,3 +686,25 @@ class StubSettings(BaseSettings):
686686 stack = local_stack ,
687687 run_configuration = PipelineRunConfiguration (),
688688 )
689+
690+
691+ def test_pipeline_parameters_are_stored_in_config (empty_step , local_stack ):
692+ """Tests that both configured and in-code parameters are stored in the
693+ compiled pipeline configuration.
694+ """
695+
696+ @pipeline
697+ def _pipeline_with_params (a : int , b : int ) -> None :
698+ empty_step ()
699+
700+ # Config params
701+ _pipeline_with_params .configure (parameters = {"a" : 1 })
702+ # In-code params
703+ _pipeline_with_params .prepare (b = 2 )
704+
705+ snapshot = Compiler ().compile (
706+ pipeline = _pipeline_with_params ,
707+ stack = local_stack ,
708+ run_configuration = PipelineRunConfiguration (),
709+ )
710+ assert snapshot .pipeline_configuration .parameters == {"a" : 1 , "b" : 2 }
You can’t perform that action at this time.
0 commit comments