Skip to content

Align dates in rustup toolchains with those in rustc -V #51764

Closed
@SimonSapin

Description

@SimonSapin

The previous attempt rust-lang/rust-central-station#27 was reverted because things broke. This probably needs someone from @rust-lang/infra to do this more carefully:

Original description:


rustup update tells me that the current Nightly is rustc 1.24.0-nightly (cfba0d446 2017-12-05). This is the output of rustc --version. It’s tempting to think that I can pin to this version by specifying a nightly-2017-12-05 toolchain, but that actually refers to yesterday’s Nightly, rust version 1.24.0-nightly (8503b3ff8 2017-12-04). This discrepancy also makes statements like “I can reproduce bug X in Nightly 2017-12-05” ambiguous.

The reason is that rustc -V contains the commit date of whatever happened to be the latest commit in master when a Nightly was published, but the archive URL (and so the toolchain names) contains the date that is current at that time. Since publication is started at midnight UTC, the latest commit is almost always "yesterday" and the dates end up off by one.

(This is technically a race condition but one that commits can never win since testing a PR takes a couple hours. Bors makes a merge commit before testing, and (if successful) pushes to master afterwards. So the latest commit in master is always at least a couple hours old.)

[This] PR changes the archive URL / toolchain name date to that of "10 minutes ago" instead of "now", soon after Cron starts this program at midnight UTC. That way, the date will most often match that the latest commit. (It can still be off if nothing was merged the day before, but given PR traffic on rust-lang/rust that’s relatively rare.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions