Repository navigation
dist: split DistExecutor's remote compile into prepare, dispatch and finish - #3
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Splits
DistExecutor's remote compile into three steps, so a later PR can run the middle one in the sccache daemon while the client-side CLI runs the other two. That is what makes sccache-dist workin client-side mode.
preparemaps the compile's outputs to paths on the build server and builds its packagers. It needs theCompilation.dispatchruns the compile on the cluster and writes its outputs to their local paths. It needs only plain data and the packagers.finishpasses the outputs to theOutputsRewriterand names the server in stderr if the remote compiler exited non-zero.No behavior change:
run_on_clustercalls the three steps in the order the code ran before, with the same logs, errors and output cleanup.Changes
src/compiler/remote/dist.rs:run_on_clustersplit intoprepare,dispatchandfinish, with theDistRequestandDistResponsetypes they pass along.src/compiler/compiler.rs,src/compiler/remote/mod.rs: fixes from theRemoteExecutortrait PR's review.get_cached_or_compileasks the executor for its dist input options once and passesthem to
remote_or_local_compile.DistJobdropslocal_compiler:DistExecutorreads the compiler path from the local compile, and calls itcompiler_paththroughout.Cost
One more
Stringper distributed compile (out_prettyinDistRequest).Validation
-D warnings.cargo test --lib --bins --tests: the dist tests insrc/compiler/compiler.rsrun all three steps, and the dist error test coversdispatchfailing at each cluster call.cargo check --no-default-features --features dist-client.