Skip to content
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

bootstrap: don't use --merges to look for commit hashes for downloading artifacts #89655

Merged
merged 2 commits into from
Oct 11, 2021

Conversation

tlyu
Copy link
Contributor

@tlyu tlyu commented Oct 8, 2021

Shallow clones (and possibly worktrees, though I can't seem to reproduce the problem there) can cause git rev-list --merges to falsely return no results, even if a merge commit is present. Stop using the --merges option when looking for commit hashes that have build artifacts. --first-parent and --author=bors@rust-lang.org should be sufficient.

Also exit with an error if the configuration asks for artifacts to be downloaded and we can't determine an appropriate commit hash to use to download artifacts.

Fixes #87890.

r? @jyn514
@rustbot label +A-rustbuild +A-contributor-roadblock

tlyu added 2 commits October 7, 2021 18:41
Shallow clones can cause `git rev-list --merges` to miss merge
commits. Omit it, because the most recent bors commit is
almost always a merge commit.
Exit with an error if we can't find a commit hash for downloading
LLVM or rustc snapshots.
@rustbot rustbot added A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Oct 8, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 8, 2021
@jyn514
Copy link
Member

jyn514 commented Oct 11, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 11, 2021

📌 Commit 8e46742 has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 11, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 11, 2021
bootstrap: don't use `--merges` to look for commit hashes for downloading artifacts

Shallow clones (and possibly worktrees, though I can't seem to reproduce the problem there) can cause `git rev-list --merges` to falsely return no results, even if a merge commit is present. Stop using the `--merges` option when looking for commit hashes that have build artifacts. `--first-parent` and `--author=bors@rust-lang.org` should be sufficient.

Also exit with an error if the configuration asks for artifacts to be downloaded and we can't determine an appropriate commit hash to use to download artifacts.

Fixes rust-lang#87890.

r? `@jyn514`
`@rustbot` label +A-rustbuild +A-contributor-roadblock
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 11, 2021
…laumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#89655 (bootstrap: don't use `--merges` to look for commit hashes for downloading artifacts)
 - rust-lang#89726 (Add #[must_use] to alloc constructors)
 - rust-lang#89729 (Add #[must_use] to core and std constructors)
 - rust-lang#89743 (Fix RUSTC_LOG handling)
 - rust-lang#89753 (Add #[must_use] to from_value conversions)
 - rust-lang#89754 (Cleanup .item-table CSS)
 - rust-lang#89761 (:arrow_up: rust-analyzer)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 08a7a57 into rust-lang:master Oct 11, 2021
@rustbot rustbot added this to the 1.57.0 milestone Oct 11, 2021
@tlyu tlyu deleted the find-non-merge-commits branch November 16, 2021 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bootstrap tries to download the wrong link from ci-artifacts.rust-lang.org if the local repository is shallow
5 participants