-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Daemon auto-provisioning downloads toolchain from provided url #29166
Draft
vmadalin
wants to merge
3
commits into
gradle:release
Choose a base branch
from
vmadalin:daemon-toolchain-auto-provisioning-download-toolchain
base: release
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Daemon auto-provisioning downloads toolchain from provided url #29166
vmadalin
wants to merge
3
commits into
gradle:release
from
vmadalin:daemon-toolchain-auto-provisioning-download-toolchain
Conversation
This file contains 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
Signed-off-by: Madalin Valceleanu <vmadalin@google.com>
… download URLs on the build properties Signed-off-by: Madalin Valceleanu <vmadalin@google.com>
There are new TODOs present in this change. Should any be removed? |
vmadalin
force-pushed
the
daemon-toolchain-auto-provisioning-download-toolchain
branch
2 times, most recently
from
May 18, 2024 16:53
d580e6a
to
cd5bc8b
Compare
vmadalin
force-pushed
the
daemon-toolchain-auto-provisioning-download-toolchain
branch
from
May 20, 2024 13:45
cd5bc8b
to
b7b9880
Compare
Change SummaryThis PR is 75.98% new code.
|
vmadalin
force-pushed
the
daemon-toolchain-auto-provisioning-download-toolchain
branch
3 times, most recently
from
May 29, 2024 15:08
1d45b54
to
ab7d661
Compare
…ureFileDownloader Signed-off-by: Madalin Valceleanu <vmadalin@google.com>
vmadalin
force-pushed
the
daemon-toolchain-auto-provisioning-download-toolchain
branch
from
May 30, 2024 09:31
ab7d661
to
134a1cc
Compare
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.
Context
The
Daemon toolchain auto-provisioning mechanism
is part ofPhase 2
oftoolchain support for Gradle Daemon
, where the motivation behind it and other technical details can be found on the public spec document. ThisPR adds the capability for the auto-provisioning mechanism to download the toolchain given the specified url on the
gradle/gradle-daemon-jvm.properties
, supporting as well local files.Here is the summary about the changes:
SecureFileDownloader
fromresources-http
on the Launcher by creating an abstraction forSecureFileDownloader.createExternalResource
calledExternalResourceFactory
allowing to have two different implementations for daemon and tasks toolchain, since this last one is using many services outside of the scope of the LauncherJavaToolchainQueryService
and its dependencies fromtoolchain-jvm
totoolchain-jvm-shared
so it can be reused from the launcherJavaToolchainQueryService
at a higher level #24353Global
andProject
for now since it requires a major refactor to keep justGlobal
, allowing to reuse this from the Launcher. The same approach has been taken forFileResourceListener
whereEventScope
now allows an array of scopes similar toServiceScope
to be able to supportFileResourceConnector
for local file urlsDaemonJavaToolchainQueryService
implementation by reusing theJavaToolchainQueryService
from the LauncherJavaToolchainSpec
calledDaemonJvmToolchainSpec
allowing to create it based onPropertyFactory
which is available on the Launcher. This is required forJavaToolchainQueryService.findMatchingToolchain
ProgressLoggerFactory
to display the downloading progress for the toolchainHttpResourceAccessor
instead ofUrlExternalResource
since the last one doesn’t return the metadata containing the file nameAbstractProgressLoggingHandler.ProgressLoggingInputStream
moved to separate file so it can be reusedProgressLoggingInputSteamListener
toProgressLoggingInputStream
to capture read operation progress instead of build specificResourceOperation
ToolchainDownloadProgressListener
which is responsible for sending proper everts to display downloading toolchain progress on theCLI
andTAPI
:DefaultToolingImplementationLoader
was modified to includeDownload
progress related events forTAPI
since this was causing them to be ignored due toclassloader
conflict causing forDefaultFileDownloadStartEvent
:NOTE: This change was built on top of #29022 to avoid merge conflicts.
Tests
Demo
Simple demo exposing how auto-provisioning mechanism download the daemon toolchain from the specified url or from a local file. Note that the error is because of missing installation part, which will be addressed separately
Daemon.toolchain.downloaded.by.auto-provisioning.mechanism.mov
Screen.Recording.2024-05-28.at.15.28.54.mov
Contributor Checklist
<subproject>/src/integTest
) to verify changes from a user perspective<subproject>/src/test
) to verify logic./gradlew sanityCheck
./gradlew <changed-subproject>:quickTest