-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Conversation
I'm preparing nightly now. |
Also, I'm aware of rust 1.44.1 is baking now, but not bothered with waiting after reviewing its pending release notes: rust-lang/rust#73238 |
Hmm, it looks like updating rust and rust-nightly is tightly coupled at the moment... CI failed... |
@@ -2,23 +2,26 @@ Docker image containing rust nightly and some preinstalled crates used in CI. | |||
|
|||
This image may be manually updated by running `CI=true ./build.sh` if you are a member | |||
of the [Solana Labs](https://hub.docker.com/u/solanalabs/) Docker Hub | |||
organization, but it is also automatically updated periodically by | |||
[this automation](https://buildkite.com/solana-labs/solana-ci-docker-rust-nightly). |
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.
I couldn't find this job?
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 was stale information
This image manually maintained: | ||
1. Edit `Dockerfile` to match the desired rust version | ||
2. Run `./build.sh` to publish the new image, if you are a member of the [Solana |
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.
Well, I didn't know it's not needed to manually increment those numbers... ;)
ci/docker-run.sh
Outdated
@@ -60,6 +60,10 @@ if [[ -z "$SOLANA_DOCKER_RUN_NOSETUID" ]]; then | |||
ARGS+=(--user "$(id -u):$(id -g)") | |||
fi | |||
|
|||
if [[ -n $SOLANA_ALLOCATE_TTY ]]; then | |||
ARGS+=(--tty) |
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.
I'm impatient so I wanna view a rainbow progress bar in terminal. :)
@@ -115,7 +115,7 @@ fn main() { | |||
// Sort keypairs so that do_bench_tps() uses the same subset of accounts for each run. | |||
// This prevents the amount of storage needed for bench-tps accounts from creeping up | |||
// across multiple runs. | |||
keypairs.sort_by(|x, y| x.pubkey().to_string().cmp(&y.pubkey().to_string())); | |||
keypairs.sort_by_key(|x| x.pubkey().to_string()); |
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.
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.
@ryoqun I can't think of a good reason. binary comparison sounds good!
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.
I'll do this as a separate pr for back-porting.
@@ -11,7 +11,11 @@ annotate() { | |||
source ci/upload-ci-artifact.sh | |||
source scripts/ulimit-n.sh | |||
|
|||
scripts/coverage.sh | |||
scripts/coverage.sh "$@" |
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.
I want to do like this:
$ SOLANA_ALLOCATE_TTY=1 SOLANA_DOCKER_RUN_NOSETUID=1 ci/docker-run.sh --nopull solanalabs/rust-nightly:2020-06-15 ci/test-coverage.sh -p solana-sdk test_slot_duration_from_slots_per_year
Codecov Report
@@ Coverage Diff @@
## master #10585 +/- ##
========================================
Coverage 81.8% 81.9%
========================================
Files 301 301
Lines 70637 70204 -433
========================================
- Hits 57833 57504 -329
+ Misses 12804 12700 -104 |
scripts/coverage.sh | ||
scripts/coverage.sh "$@" | ||
|
||
if [[ -z $CI ]]; then |
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.
For this manual use case: https://github.com/solana-labs/solana/pull/10585/files#diff-1143f3dc73bf3e79cf89244ccda0fe97R25
@@ -285,7 +285,7 @@ setup_validator_accounts() { | |||
return 0 | |||
} | |||
|
|||
rpc_url=$($solana_gossip rpc-url --entrypoint "$gossip_entrypoint") | |||
rpc_url=$($solana_gossip rpc-url --timeout 180 --entrypoint "$gossip_entrypoint") |
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.
Yeah, was hard to debug.... Well, this depended on exact build timing. ;)
Greatly increase from the default 15
seconds to 180
to prevent another sorrow. ;)
@@ -40,10 +40,12 @@ pub fn years_as_slots(years: f64, tick_duration: &Duration, ticks_per_slot: u64) | |||
|
|||
/// From slots per year to slot duration | |||
pub fn slot_duration_from_slots_per_year(slots_per_year: f64) -> Duration { | |||
// Regarding division by zero potential below: for some reason, if Rust stores an `inf` f64 and |
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.
@CriesofCarrots This is added by https://github.com/solana-labs/solana/pull/7130/files#diff-826aa0353ee517a070e3c98cc61423eaR43
FYI, rust (stable rust 1.45+; this will be affected in our nightly CI builds after this pr) is actually fixing this behavior: https://github.com/rust-lang/rust/blob/master/RELEASES.md#compatibility-notes
I'm preserving the current behavior.
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.
Sweet, thanks!
@svenski123 FYI, we're about to go rust 1.45 based on your previous efforts at #10445. Thank you very much! :) |
@mvines Finally, this got ready for review and merge! I've updated relevant docs and fiddled scripts a bit while doing this for the first time. Could you review these? |
ARG date | ||
|
||
RUN set -x \ | ||
&& rustup install nightly-$date \ | ||
&& rustup component add clippy --toolchain=nightly-$date \ | ||
&& rustup component add rustfmt --toolchain=nightly-$date \ |
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.
Problem
Using older rust.
Summary of Changes
Update it
Credits
@svenski123 Special thanks for previous works at #10445. That pr greatly reduced required efforts in this pr!
prev: #9754