Env value contamination between pipelines

This is a bug request that seemed to work but seems to have broken recently. Not sure where to seek help so posting here.

We have three different pipelines for one of our products.
Each one loaded through buildkite-agent pipeline upload sub-pipeline.yml file.
Each sub pipeline files had a “PRODUCT” environment key set in their env block. They mostly all run in parallel except we have some dependencies across steps in different pipeline files.

Before, after each plugin was uploaded, we found that the PRODUCT env key was what was defined in each file, available for substitution and passed down to plugins used in steps of that files. Since about 2 days ago, we are finding that it is only working for string substitution in steps. As far as env passed down to plugins go, same value gets sent down to plugins for all steps across all pipelines.

Things work if we do a massive wait step at top pipeline level and make our pipelines execute one after another. But I am not sure why this regressed. We’ve had it working for a long time until about 2 days ago.

Any help appreciated.

Hello @nakbarakbarscg!

Thanks for the message - a warm welcome to the Buildkite Community :wave:

From a first glance, this does sound in a similar nature to what we usually see with Visual Step → Legacy Step migrations and the changes that occurs between the two versions and the precedence of environment variables. Just wondering if either / all of the pipelines in question were migrated recently?

There was also quite numerous parsing issues within agent versions v3.50.0 - v3.50.3 and was solved with v3.50.4 onwards - wondering if the agents that the builds of these pipelines are running on are using any of those?

Cheers :slight_smile:

I wonder if they are related. The only place this env value is defined is at the top of the individual pipeline .yml files. We are also using step groups inside individual pipeline files if that makes any difference.

We haven’t done any migrations recently.

Our agents seem to be on v3.56.0.

Thanks @nakbarakbarscg for the extra information :slight_smile: - latest agent version there!

I think it’ll be worth taking a look at this more closely - would it be possible to send us a email over to support@buildkite.com with a link to the pipelines in question - and any recent builds with the behaviour you are seeing above?

Would be hugely helpful also if you could include a build before this behaviour was noticed - for assessing where things changed.

Cheers!

1 Like