Skip to content

Dist build manifest #77762

New issue

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

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

Already on GitHub? # to your account

Merged
merged 7 commits into from
Oct 13, 2020
Merged

Dist build manifest #77762

merged 7 commits into from
Oct 13, 2020

Conversation

pietroalbini
Copy link
Member

@pietroalbini pietroalbini commented Oct 9, 2020

This PR makes two changes that should remove a significant chunk of the time spent in our release process: cloning the rust-lang/rust monorepo, all its submodules, and building bootstrap to then invoke build-manifest:

  • build-manifest doesn't rely on a clone of the monorepo being present anymore. The only remaining bit of information it fetched from it (the Rust version) is instead bundled in the binary.
  • A new "component" is added, build-manifest. That component includes a prebuilt version of the tool, and it's not included in the Rustup manifest. This will allow promote-release to directly invoke the tool without interacting with our build system.
  • The Linux x86_64 CI is changed to also build the component mentioned above. It's the only CI builder tasked to do so, and to cleanly support this a new --include-default-paths flag was added to ./x.py.
  • The BUILD_MANIFEST_NUM_THREADS environment variable is added to configure the number of threads at runtime.

This PR is best reviewed commit-by-commit.
r? @Mark-Simulacrum

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 9, 2020
@Mark-Simulacrum
Copy link
Member

Can't we just include the rust version in this component? (Or all components, whatever)

@pietroalbini
Copy link
Member Author

We need the version to extract the component's tarball anyway, so promote-release will have to fetch it regardless. I guess we could const VERSION: &str = include!("src/version");, but I'm not sure that's worth it.

@pietroalbini
Copy link
Member Author

This also added the BUILD_MANIFEST_NUM_THREADS environment variable to be able to configure the number of threads at runtime. r? @Mark-Simulacrum

@Mark-Simulacrum
Copy link
Member

I think the const VERSION is what I'd personally like to see FWIW, it seems like we're intending promote-release to be tightly coupled anyway.

@Mark-Simulacrum
Copy link
Member

r=me though on the PR as-is, we can worry about how we get version separately if you want

@pietroalbini
Copy link
Member Author

@Mark-Simulacrum pushed two commits to do the changes you requested.

@Mark-Simulacrum
Copy link
Member

I think you've rebased since "Note: this PR builds on top of #77336. The first commit is already approved in that PR, and it will be rebased away as soon as that PR is merged." -- can you remove that and more broadly update description as necessary for the version changes? r=me with that done.

This commit changes the way build-manifest is invoked, to let it accept
the Rust version directly instead of requiring the path of the Rust
monorepo and letting build-manifest figure out the path on its own.

This allows to run build-manifest without a clone of the monorepo.
This will prevent the tool mistakenly ignoring the variables if they
happen to contain non-utf8 data.
@pietroalbini
Copy link
Member Author

@bors r=Mark-Simulacrum

@bors
Copy link
Collaborator

bors commented Oct 12, 2020

📌 Commit 0b7ee9d has been approved by Mark-Simulacrum

@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 12, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 13, 2020
…=Mark-Simulacrum

Dist build manifest

This PR makes two changes that should remove a significant chunk of the time spent in our release process: cloning the `rust-lang/rust` monorepo, all its submodules, and building `bootstrap` to then invoke `build-manifest`:

* `build-manifest` doesn't rely on a clone of the monorepo being present anymore. The only remaining bit of information it fetched from it (the Rust version) is instead bundled in the binary.
* A new "component" is added, `build-manifest`. That component includes a prebuilt version of the tool, and it's *not* included in the Rustup manifest. This will allow `promote-release` to directly invoke the tool without interacting with our build system.
* The Linux x86_64 CI is changed to also build the component mentioned above. It's the only CI builder tasked to do so, and to cleanly support this a new `--include-default-paths` flag was added to `./x.py`.
* The `BUILD_MANIFEST_NUM_THREADS` environment variable is added to configure the number of threads at runtime.

This PR is best reviewed commit-by-commit.
r? @Mark-Simulacrum
@pietroalbini
Copy link
Member Author

@bors try

Getting a CI build to allow me to continue developing locally.

@bors
Copy link
Collaborator

bors commented Oct 13, 2020

🙅 Please do not try after a pull request has been r+ed. If you need to try, unapprove (r-) it first.

@pietroalbini
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 13, 2020
@pietroalbini
Copy link
Member Author

@bors try

@bors
Copy link
Collaborator

bors commented Oct 13, 2020

⌛ Trying commit 0b7ee9d with merge acb9961a544903a7530fcd72e71a3e50518a230f...

@bors
Copy link
Collaborator

bors commented Oct 13, 2020

☀️ Try build successful - checks-actions, checks-azure
Build commit: acb9961a544903a7530fcd72e71a3e50518a230f (acb9961a544903a7530fcd72e71a3e50518a230f)

@pietroalbini
Copy link
Member Author

@bors r=Mark-Simulacrum

@bors
Copy link
Collaborator

bors commented Oct 13, 2020

📌 Commit 0b7ee9d has been approved by Mark-Simulacrum

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 13, 2020
@bors
Copy link
Collaborator

bors commented Oct 13, 2020

⌛ Testing commit 0b7ee9d with merge d772879...

@bors
Copy link
Collaborator

bors commented Oct 13, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Mark-Simulacrum
Pushing d772879 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 13, 2020
@bors bors merged commit d772879 into rust-lang:master Oct 13, 2020
@rustbot rustbot added this to the 1.49.0 milestone Oct 13, 2020
@pietroalbini pietroalbini deleted the dist-build-manifest branch October 14, 2020 09:05
@pietroalbini pietroalbini added beta-nominated Nominated for backporting to the compiler in the beta channel. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. beta-accepted Accepted for backporting to the compiler in the beta channel. labels Oct 14, 2020
@pietroalbini pietroalbini modified the milestones: 1.49.0, 1.48.0 Oct 20, 2020
@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 20, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 20, 2020
[beta] Rollup backports

Cherry-picked:

*  Always use the Rust version in package names rust-lang#77336
*  rustc_parse: More precise spans for `tuple.0.0` rust-lang#77774
*  Update crossbeam-channel to avoid UB rust-lang#77819
*  build-manifest: stop generating numbered channel names except for stable rust-lang#77854
*  Dist build manifest rust-lang#77762
*  bootstrap: set correct path for the build-manifest binary rust-lang#77909

r? `@ghost`
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants