Skip to content

ci: file_diff_from_base does not work for ghstack PRs on GHA #60111

@seemethere

Description

@seemethere

Problem

The function file_diff_from_base does not currently work for ghstack PRs on GHA.

Previous attempts at this can be found in the commits from April 23, 2021 here:

With failures mostly looking like:

+ file_diff_from_base /tmp/tmp.cgmJJ3LQMK
+ set +e
+ git fetch origin master --quiet
+ set -e
+ [[ -n true ]]
+ git diff --name-only e2fe5924201ed1e7cc48aaa6cb21732c694c34fc d1cae0dae7602df47d9d1981e44116f216960c4a
fatal: bad object e2fe5924201ed1e7cc48aaa6cb21732c694c34fc

Logs: https://github.com/pytorch/pytorch/runs/2423051948

NOTE: Logs may have disappeared since GHA only keeps logs for ~30days

Context

The reason why I think this happens is due to the way ghstack creates the branches needed to make the stacked PRs work in the first place.

Basically ghstack creates references that aren't really real references so you can't find a merge base between the two references, nor create a real diff between the two references.

cc @ezyang @seemethere @malfet @walterddr @pytorch/pytorch-dev-infra

Metadata

Metadata

Assignees

Labels

module: ciRelated to continuous integrationmodule: infraRelates to CI infrastructuretriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions