I’ve been trying out the matrix feature and like it, but there are a few things that could be improved to make it a lot more robust:
Allow interpolation of {{matrix}} in the env section
We’ve have to work around this by doing command: env FOO={{matrix}} /path/to/my/command
Allow more than 20 matrix items
Our work around is to create 2 steps to split bigger lists. But that requires copy pasting and doesn’t seem necessary.
I’ve found a few bugs along the way:
Clicking Retry on any step generated via the matrix will retry the whole matrix. It should only retry a single step, or at least I think this would make more sense.
You can’t specify any env block if you have a matrix (even without interpolation). This produces 500s from your API.
Currently interpolation of the matrix values into command step attributes such as environment variables, labels and commands is supported so for attributes such as key or agents block it is not currently supported.
I’d also like to see matrix values be interpolated into key steps. This would def help with step dependencies. Ex: build binary X, Y then test binary X, Y. Right now you have to wait for all build steps in a group to finish before the test the binary because you can not provide it with a dependency step.
Welcome to the community, thanks for reaching out!
You are correct that the matrix does not support using step keys. Group steps might fit into your use case because you can use the steps keys as well as the depends_on attributes, this is just going off a general assumption(without knowing the use case). However I can raise a request on this feedback
Hi @moose thanks heaps for your feedback. I am from the product team at Buildkite. I would love to hear what you think of what @stephanie.atte suggested with regards to groups and if it actually would solve your use case. If it doesn’t could you explain your use case a bit better so we understand the limitations better?
Because matrix interpolation can not drive step keys the scan group must wait for all binaries to be build before jobs can be scheduled. If steps inside a group could have keys based on the matrix then i could have scan steps be dispatched as soon as the binary has been built.
Hi @moose , I definitely understand the problem. I am going to chat with the team about it, but I’ll be honest at this point it doesn’t look like we will end up getting to this till early 2024. I’ll update you if anything changes in the meantime.
Have a great day!