-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[beta] Automaticaly calculate beta prerelease numbers #47396
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
r? @kennytm |
FWIW code looks reasonable to me. |
☔ The latest upstream changes (presumably #47399) made this pull request unmergeable. Please resolve the merge conflicts. |
🔒 Merge conflict |
src/bootstrap/lib.rs
Outdated
self.try_run_quiet( | ||
Command::new("git") | ||
.arg("fetch") | ||
.arg("--unshallow"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the bootstrap is running inside Docker where the repository is mount as read-only, I'm not sure if git fetch --unshallow
will succeed.
This command may need to be run before the docker is built (before src/ci/docker/run.sh
finishes), but it should only be run in the beta channel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah right good point, what a bummer! I think I may try to fold this into the init_repo.sh
script perhaps.
edd1a2f
to
8152a1c
Compare
re r? @kennytm |
Travis's still failing. Try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me after Travis can successfully run tidy
(or is green).
8152a1c
to
41bd3ce
Compare
@bors: r=kennytm alright let's see if that works |
📌 Commit 41bd3ce has been approved by |
@bors r- Travis is still failing |
src/bootstrap/lib.rs
Outdated
.arg("origin") | ||
.arg("beta") | ||
); | ||
let beta = beta.trim().split(' ').next().unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps use split_whitespace()
here. The parts are separated by tabs.
[00:02:47] fatal: Not a valid object name bb9be9ecc0b2501802e50a5c35be14e539be1638 refs/heads/beta
[00:02:47] thread 'main' panicked at 'command did not execute successfully: "git" "merge-base" "bb9be9ecc0b2501802e50a5c35be14e539be1638\trefs/heads/beta" "e6072a7b3835f1875e81c9fd27799f9b20a0770c\trefs/heads/master"
41bd3ce
to
a57032f
Compare
@bors: r=kennytm Oops indeed! |
📌 Commit a57032f has been approved by |
src/bootstrap/lib.rs
Outdated
@@ -346,6 +348,7 @@ impl Build { | |||
|
|||
/// Executes the entire build, as configured by the flags and configuration. | |||
pub fn build(&mut self) { | |||
println!("{}", self.beta_prerelease_version()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not essential, but maybe remove this println!
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Er sorry yeah that was just debugging
This commit automatically calculates the beta prerelease number meaning we'll no longer need to manually change the beta version. Instead beta will automatically deploy any time a backport is merged, ensuring that backports are released for testing ASAP. More details about this can be found on the internal [forums] The only bit of trickiness here was that on CI we do shallow clones by default but the git history probing here requires some more information. Do cope with that this commit chooses the strategy of converting the repository to a full clone via the `--unshallow` flag to `git`. That way this should work for local developers as well as CI changes. Note that this commit is coming first to the beta branch to test it, and if successful we can go back and land it on master. [forums]: https://internals.rust-lang.org/t/tweaking-how-betas-are-produced/6526
a57032f
to
9426dda
Compare
@bors: r=kennytm |
📌 Commit 9426dda has been approved by |
@bors p=4 |
⌛ Testing commit 9426dda with merge 3732f64354c3b77ee728a0797a1a496724d47eea... |
💔 Test failed - status-travis |
@bors: retry
I think those macs are having a bad day... |
[beta] Automaticaly calculate beta prerelease numbers This commit automatically calculates the beta prerelease number meaning we'll no longer need to manually change the beta version. Instead beta will automatically deploy any time a backport is merged, ensuring that backports are released for testing ASAP. More details about this can be found on the internal [forums] The only bit of trickiness here was that on CI we do shallow clones by default but the git history probing here requires some more information. Do cope with that this commit chooses the strategy of converting the repository to a full clone via the `--unshallow` flag to `git`. That way this should work for local developers as well as CI changes. Note that this commit is coming first to the beta branch to test it, and if successful we can go back and land it on master. [forums]: https://internals.rust-lang.org/t/tweaking-how-betas-are-produced/6526
☀️ Test successful - status-appveyor, status-travis |
We got rust-lang#47396 merged but it looks like rcs failed to deploy the beta because when it tried to calculate the beta version its cwd was different. Let's try to fix this bug and fix auto-deploy by explicitly setting the `current_dir` for git commands.
We got rust-lang#47396 merged but it looks like rcs failed to deploy the beta because when it tried to calculate the beta version its cwd was different. Let's try to fix this bug and fix auto-deploy by explicitly setting the `current_dir` for git commands.
This commit automatically calculates the beta prerelease number meaning we'll no
longer need to manually change the beta version. Instead beta will automatically
deploy any time a backport is merged, ensuring that backports are released for
testing ASAP. More details about this can be found on the internal forums
The only bit of trickiness here was that on CI we do shallow clones by default
but the git history probing here requires some more information. Do cope with
that this commit chooses the strategy of converting the repository to a full
clone via the
--unshallow
flag togit
. That way this should work for localdevelopers as well as CI changes.
Note that this commit is coming first to the beta branch to test it, and if
successful we can go back and land it on master.