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

Check rustbook links on all platforms when running locally #62950

Merged
merged 1 commit into from Aug 9, 2019

Conversation

mati865
Copy link
Contributor

@mati865 mati865 commented Jul 24, 2019

cc #62739

@mati865
Copy link
Contributor Author

mati865 commented Jul 24, 2019

cc @mark-i-m

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

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

@rust-highfive
Copy link
Collaborator

⚠️ Warning ⚠️

  • These commits modify submodules.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 24, 2019
@alexcrichton
Copy link
Member

We have historically disabled this because of the significant amount of time it takes to execute on CI. Is there a good grasp on how much time this adds to CI builders to execute this step?

@mati865
Copy link
Contributor Author

mati865 commented Jul 25, 2019

Is there a good grasp on how much time this adds to CI builders to execute this step?

It's hard to tell because it's not a separate step (it's part of rustbook).


@ehuss had troubles with current approach:

this is especially awkward for me to deal with, because it only runs on linux, which is not my native platform.


I haven't thought about it earlier but maybe it could be disabled on CI (except 1 job) and still ran locally?

My idea is to make linkcheck a feature of rustbook, it would be enabled unless some kind of environment variable or configuration option is present.

@alexcrichton
Copy link
Member

That seems reasonable to me, but I think it'd also be reasonable to do a little work and basically execute this locally to see how long it takes to see whether it's necessary.

@mati865
Copy link
Contributor Author

mati865 commented Jul 29, 2019

On my box (lldb tests are failing so I excluded them), ./x.py clean was ran before every test:

  • with linkcheck ./x.py test --exclude src/test/debuginfo 10944,00s user 875,25s system 707% cpu 27:51,09 total
  • without linkcheck ./x.py test --exclude src/test/debuginfo 10623,22s user 868,37s system 698% cpu 27:25,33 total

Linkcheck was nuked out of existence with this diff: https://gist.github.com/mati865/00fd7281723a4922a719902ad5c3d4ce

So it will increase build time by ~1.6%.

@alexcrichton
Copy link
Member

That looks like linkcheck is taking 300s (5 minutes), is that right? If so that's definitey much too long to execute on each builder running tests.

@mati865
Copy link
Contributor Author

mati865 commented Jul 30, 2019

I don't know about Rust CI but on my machine it increased build time by 1.6% (25,7 seconds) to 27 minutes 51 seconds total time.

@alexcrichton
Copy link
Member

Sorry I'm having trouble parsing this. Is the data here showing that your build increased by 30 seconds after enabling this? If that's the case this seems fine to enable, that's just margin of error.

@mati865
Copy link
Contributor Author

mati865 commented Jul 31, 2019

Generally you want to look for real in bash or total in zsh (this case).
10944,00s user 875,25s system 707% cpu 27:51,09 total means the command spent 10944s CPU time in user, 875s CPU time in kernel mode, avg CPU usage was 707% and clock time was 27 minutes 51 seconds.

Ryzen 2700X is much more powerful CPU than what Rust have as the CI so it will definitely take longer but I'm not able tell how much longer.

@alexcrichton
Copy link
Member

So.... your local build took 30 seconds more, right?

If that's true then my thinking is the same, 30 seconds of a 30 minute build is margin of error which means this has basically no real impact. I'm just trying to confirm because I literally didn't understand "27,51s" before, I haven't seen that syntax to denote "27 minutes and 51 seconds" before myself.

@mati865
Copy link
Contributor Author

mati865 commented Aug 1, 2019

Right, it should have been: "Increased build time by 1.6% (25,7 seconds) from 27 minutes 25 seconds to 27 minutes 51 seconds total time.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Aug 2, 2019

📌 Commit 2282c213e126362433f2b3a1a9434433b14fdb4a has been approved by alexcrichton

@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 Aug 2, 2019
@mark-i-m
Copy link
Member

mark-i-m commented Aug 2, 2019 via email

@alexcrichton
Copy link
Member

@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 Aug 2, 2019
@mati865 mati865 changed the title Run linkcheck on all platforms Check rustbook links on all platforms when running locally Aug 6, 2019
@mati865
Copy link
Contributor Author

mati865 commented Aug 6, 2019

Should be ready for review.

src/tools/rustbook/build.rs Outdated Show resolved Hide resolved
src/tools/rustbook/src/main.rs Show resolved Hide resolved
@mati865
Copy link
Contributor Author

mati865 commented Aug 7, 2019

Changed the way the feature is enabled and improved CI detection tu reuse bootstrap check in the last commit.
I'll squash the commits when this is accepted.

@alexcrichton
Copy link
Member

@bors: delegate+

Looks good to me!

@bors
Copy link
Contributor

bors commented Aug 8, 2019

✌️ @mati865 can now approve this pull request

@mati865
Copy link
Contributor Author

mati865 commented Aug 9, 2019

Squashed and rebased.

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Aug 9, 2019

📌 Commit c7e16c5 has been approved by alexcrichton

@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 Aug 9, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 9, 2019
Check rustbook links on all platforms when running locally

cc rust-lang#62739
bors added a commit that referenced this pull request Aug 9, 2019
Rollup of 7 pull requests

Successful merges:

 - #62672 (Deprecate `try!` macro)
 - #62950 (Check rustbook links on all platforms when running locally)
 - #63114 (Remove gensym in format_args)
 - #63397 (Add tests for some ICEs)
 - #63403 (Improve test output)
 - #63404 (enable flt2dec tests in Miri)
 - #63407 (reduce some test sizes in Miri)

Failed merges:

r? @ghost
@bors bors merged commit c7e16c5 into rust-lang:master Aug 9, 2019
@mati865 mati865 deleted the linkcheck branch August 9, 2019 17:22
@mark-i-m
Copy link
Member

mark-i-m commented Aug 9, 2019

cc @ehuss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants