Revert reusing processable in Seed::Build evaluation
What does this MR do and why?
Related to Backend: Decouple scoped variables from the job... (#350057)
This MR reverts the changed added in !105492 (merged) because while it brought a small performance improvement to the pipeline creation, it introduced a bug with the evaluation of environment variables.
The bug was caused by the fact that we always memoize variables in the processable
object. The logic was:
- Create a processable object (build or bridge).
- Reuse this object in
Seed::Build::Context
in order to evaluaterules:
, instead of initializing a stub processable just for that. - Assign the attributes that have changed after the evaluation of
rules
. - Now, when calculating variables, some of them may have been memoized during the evaluation of rules (in step 2) and don't take in consideration the new values assigned in step 3.
The previous MR already added some complexity for this performance optimization and fixing this memoization bug could add even more complexity.
Reverting the change for now, (the FF is disabled on production anyway) and re-evaluate solutions if needed.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
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.
-
I have evaluated the MR acceptance checklist for this MR.