Add option to run CI with a different submodule commit to test upstream CLs
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 431
- Forks
- 44
- Avg merge
- 21h 18m
- Merged PRs (30d)
- 30
Description
Sometimes it would be useful to run PR CI (or CI from the main branch) but with a different commit in the submodule. Currently, the way to do this is to create a dev branch and update the submodule or add a patch file. This takes medium effort: naming the branch, navigating around the repo to make the change, making a commit, pushing it to the right remote, and finally triggering the build.
Instead, I think we could pretty reasonably add a parameter to the CI trigger that lets you optionally specify a submodule commit, and if specified, the build would run a step after cloning the repo to change the submodule to a new commit. This means:
- If we want to make sure a CL doesn't break
microsoft/main(even a CL we submit ourselves), we could run CI onmicrosoft/mainthat points at that CL's commit without any manual Git work. - If we have a broken sync PR, and want to confirm that a CL fixes the PR validation build, I believe we could run a build that points at our GitHub ref for the outer repo and the CL commit for the submodule.
Similar to GitHub, Gerrit adds CL commits to the repo, so Git remotes/sources shouldn't be an issue. But we could also add a parameter (in public builds) to configure the source repo for the submodule, so we can also validate changes that aren't even in a CL yet. We could use a GitHub URL, for example. You can find the Gerrit CL refs here:

This also shows them: git ls-remote https://go.googlesource.com/go | grep <cl-number>
Note that in all of these cases, the patch files are still being applied. We could consider a toggle to disable patching, if we want to validate a change in our infra (machine pool) but don't want to resolve any patch conflicts caused by that change yet.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the CI trigger and the build step that clones the repository and applies patch files. Review how the submodule commit, optional source repository, and patching behavior are currently selected. Done means CI can accept the requested submodule revision and run with the documented patching options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git
- Domain
- build-system, ci-cd
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100