Skip to content

Add support for git tags in --start and --end #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 1, 2022

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Mar 30, 2022

First I tried to add new Bound (Version), but that required a lot of changes in the code.

I think that just adding support for arbitrary tags is more general and should hopefully work out of the box. I changed the GH resolver to use the compare API, which allows us to get commit information together with merge-base ancestor.

@ehuss
Copy link
Collaborator

ehuss commented Mar 30, 2022

Nice!

Can you add some text to the CLI help for the --start and --end flags that documents the kinds of values they support? Maybe something like [a YYYY-MM-DD date or git tag or nightly git SHA] at the end?

@Kobzol
Copy link
Contributor Author

Kobzol commented Mar 31, 2022

Added CLI help. Maybe we should also rename Bound::Commit to something like Bound::GitReference?

@ehuss
Copy link
Collaborator

ehuss commented Mar 31, 2022

I don't feel a particular need to rename it. However, it looks like the new code needs to be formatted.

@Kobzol
Copy link
Contributor Author

Kobzol commented Mar 31, 2022

Done.

Copy link
Collaborator

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ehuss ehuss merged commit ae27060 into rust-lang:master Apr 1, 2022
@Kobzol Kobzol deleted the tag-support branch April 2, 2022 07:41
@ehuss
Copy link
Collaborator

ehuss commented Apr 15, 2022

@Kobzol This seems to have broken bisecting by hash. Can you take a look at fixing it? For example:

cargo-bisect-rustc --start e08d5693609a659e45025b8ea4dbd9efa342fa68 --end ec667fbcfcd29e2b5080f6be04e229356b27e600

will error with:

bisecting ci builds
starting at e08d5693609a659e45025b8ea4dbd9efa342fa68, ending at ec667fbcfcd29e2b5080f6be04e229356b27e600
refreshing repository at "/Users/eric/Proj/rust/rust-upstream"
From https://github.com/rust-lang/rust
 * branch                    HEAD       -> FETCH_HEAD
opening existing repository at "/Users/eric/Proj/rust/rust-upstream"
fetching (via local git) commits from e08d5693609a659e45025b8ea4dbd9efa342fa68 to 175b8db73bfd078b4bcd3c28c8d6f51d5895ebf3
refreshing repository at "/Users/eric/Proj/rust/rust-upstream"
From https://github.com/rust-lang/rust
 * branch                    HEAD       -> FETCH_HEAD
opening existing repository at "/Users/eric/Proj/rust/rust-upstream"
looking up first commit
looking up second commit
checking that commits are by bors and thus have ci artifacts...
finding bors merge commits
ERROR: failed during attempt to create/access local git repository: Expected author Brian Anderson to be bors for beb9a0dfc52ebda4f8db4e5d439e08e4f3a43a39.
 Make sure specified commits are on the master branch!

I notice that the end commit has shifted from ec667fbcfcd29e2b5080f6be04e229356b27e600 to
175b8db73bfd078b4bcd3c28c8d6f51d5895ebf3.

@Kobzol
Copy link
Contributor Author

Kobzol commented Apr 16, 2022

It seems that the problem is that origin/master is not updated when performing merge-base. A temporary workaround is to delete the rust.git directory (or rust-upstream in your case). I will send a PR that will update origin/master before calculating merge-base ancestor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants