Skip to content

Refactor: Extract downstream variables methods into a generator

Albert requested to merge 390252-refactor-downstream-variables into master

What does this MR do and why?

Part 2 of #390252 (closed)

Refactor existing methods to create downstream pipeline variables into separate classes.

  1. This approach separates the construction of downstream variables from the Bridge model. The construction only takes a Collection of variables that needs to be turned into downstream variables and another collection of reference variables for expansion.
  2. Each component in the factory converts a variable into the downstream variable.
    1. RawVariable keeps raw variable as is.
    2. ExpandedVariable turns variables into its expanded value by expanding it using the reference provided.
  3. This prepares for the next step in !124320 (merged) to add a file variable dependencies into downstream variables.

MR dependencies:

  1. !121215 (merged) - adds a keyword argument to ExpandVariables to choose between expanding file variables or not.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #390252 (closed)

Edited by Albert

Merge request reports