Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/workflow: fix sub-workflow prefix for tasks added via expansion
Tasks added by expansions, in contrast to all other tasks, didn't handle the sub-workflow prefix. A while back I looked into it briefly, and saw that shallowClone didn't clone that one field, so figured CL 546235 would fix it. It didn't, and now it's apparent to me why not. The expansion always gets a copy of the top-level workflow definition, even if it was made by a task with some prefix. Modify addExpansion to record not just that a given task is an expansion, but also the workflow prefix at that time. We also have a test that makes it easy to verify this works now. Keep shallowClone as is, to match the behavior implied by its name, even though by now the namePrefix it clones gets overwritten anyway. For golang/go#70249. Change-Id: Ib1cb34ef121baf946fe6f2500c4bf1611aaa6db7 Reviewed-on: https://go-review.googlesource.com/c/build/+/626336 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]>
- Loading branch information