Skip to content

x/build: run platform/arch specific builders when platform/arch constrained files are changed #71396

Open
@rolandshoemaker

Description

@rolandshoemaker

When making changes to platform or arch constrained files (.go/.s) it would be nice for LUCI to automatically include builders of those types in the set that is run. Currently this has to be done manually, which is not always particularly obvious, and can lead to changes appearing to pass builders when they would fail in the specific builders were included.

This doesn't seem to be easily done with location filters regexps in the luci main.star, since we want to be more specific when there is a platform suffix (e.g. if example_linux_amd64.go changes, we only want to run the linux-amd64 builder), and less specific when there is only an arch suffix (e.g. if example_amd64.go changes, we want to run all of the amd64 builders). I fiddled around with this and couldn't find an obvious way to accomplish it.

One possible option is to add a special mode to golangbuild which scans the file names changed in a CL, and does this matching itself, spawning an additional set of builders.

Ideally we'd also do this for build constrained files which use the //go:build syntax, but this seems a lot more complex, as it's not particularly easy to extract this information via the gerrit API (as far as I can tell). For a first pass, it'd probably be fine to just do the file name based approach, since that covers the majority of use cases.

cc @golang/release

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buildersx/build issues (builders, bots, dashboards)NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions