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

[beta] Automaticaly calculate beta prerelease numbers #47396

Merged
merged 1 commit into from Jan 18, 2018

Conversation

Projects
None yet
6 participants
@alexcrichton
Copy link
Member

alexcrichton commented Jan 12, 2018

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.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 12, 2018

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 12, 2018

warning Warning warning

  • Pull requests are usually filed against the master branch for this repo, but this one is against beta. Please double check that you specified the right target!
@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 12, 2018

@rust-highfive rust-highfive assigned kennytm and unassigned aturon Jan 12, 2018

@shepmaster

This comment has been minimized.

Copy link
Member

shepmaster commented Jan 13, 2018

FWIW code looks reasonable to me.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 13, 2018

☔️ The latest upstream changes (presumably #47399) made this pull request unmergeable. Please resolve the merge conflicts.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 13, 2018

🔒 Merge conflict

self.try_run_quiet(
Command::new("git")
.arg("fetch")
.arg("--unshallow"),

This comment has been minimized.

@kennytm

kennytm Jan 13, 2018

Member

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.

This comment has been minimized.

@alexcrichton

alexcrichton Jan 13, 2018

Author Member

Gah right good point, what a bummer! I think I may try to fold this into the init_repo.sh script perhaps.

@alexcrichton alexcrichton force-pushed the alexcrichton:beta-next branch 2 times, most recently from edd1a2f to 8152a1c Jan 13, 2018

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 13, 2018

re r? @kennytm

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Jan 13, 2018

Travis's still failing. Try git fetch origin --unshallow beta master?

@kennytm
Copy link
Member

kennytm left a comment

r=me after Travis can successfully run tidy (or is green).

@alexcrichton alexcrichton force-pushed the alexcrichton:beta-next branch from 8152a1c to 41bd3ce Jan 14, 2018

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 14, 2018

@bors: r=kennytm

alright let's see if that works

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 14, 2018

📌 Commit 41bd3ce has been approved by kennytm

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Jan 14, 2018

@bors r-

Travis is still failing

.arg("origin")
.arg("beta")
);
let beta = beta.trim().split(' ').next().unwrap();

This comment has been minimized.

@kennytm

kennytm Jan 14, 2018

Member

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"

@alexcrichton alexcrichton force-pushed the alexcrichton:beta-next branch from 41bd3ce to a57032f Jan 14, 2018

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 14, 2018

@bors: r=kennytm

Oops indeed!

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 14, 2018

📌 Commit a57032f has been approved by kennytm

@@ -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());

This comment has been minimized.

@kennytm

kennytm Jan 14, 2018

Member

This is not essential, but maybe remove this println!?

This comment has been minimized.

@alexcrichton

alexcrichton Jan 14, 2018

Author Member

Er sorry yeah that was just debugging

[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

@alexcrichton alexcrichton force-pushed the alexcrichton:beta-next branch from a57032f to 9426dda Jan 14, 2018

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 14, 2018

@bors: r=kennytm

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 14, 2018

📌 Commit 9426dda has been approved by kennytm

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Jan 17, 2018

@bors p=4

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 17, 2018

⌛️ Testing commit 9426dda with merge 3732f64...

bors added a commit that referenced this pull request Jan 17, 2018

Auto merge of #47396 - alexcrichton:beta-next, r=kennytm
[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
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 18, 2018

💔 Test failed - status-travis

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 18, 2018

@bors: retry

[01:42:02] test [run-pass] run-pass/zero-sized-linkedlist-push.rs has been running for over 60 seconds

[01:42:02] test [run-pass] run-pass/zero-sized-tuple-struct.rs has been running for over 60 seconds



No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

I think those macs are having a bad day...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 18, 2018

⌛️ Testing commit 9426dda with merge 597549e...

bors added a commit that referenced this pull request Jan 18, 2018

Auto merge of #47396 - alexcrichton:beta-next, r=kennytm
[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
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 18, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: kennytm
Pushing 597549e to beta...

@bors bors merged commit 9426dda into rust-lang:beta Jan 18, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@alexcrichton alexcrichton deleted the alexcrichton:beta-next branch Jan 18, 2018

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 18, 2018

[beta] Attempt to fix prerelease version calculation
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.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 18, 2018

[beta] Attempt to fix prerelease version calculation
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.