Skip to content

Use manifests to download tools#948

Merged
dividedmind merged 10 commits into
mainfrom
feat/manifests
Jun 15, 2026
Merged

Use manifests to download tools#948
dividedmind merged 10 commits into
mainfrom
feat/manifests

Conversation

@dividedmind

Copy link
Copy Markdown
Contributor

This changes the download strategy of CLI/scanner to use release manifests – this aligns with recent change in VSCode and allows overriding the manifest locations to enable enterprise mirroring.

The changeset also includes refactoring of the asset download code and changes the download cache and binary location to the convention used by the VSCode extension. This prevents having to redownload the binaries if the user uses both IDEs (or indeed several different versions of intellij).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated 7 comments.

Comment thread plugin-core/src/main/java/appland/cli/LocalAssetRepository.java
Comment thread plugin-core/src/main/java/appland/cli/LocalAssetRepository.java
Comment thread plugin-core/src/main/java/appland/cli/ManifestManager.java Outdated
Comment thread plugin-core/src/test/java/appland/cli/DefaultAppLandDownloadServiceProxyTest.java Outdated
Comment thread plugin-core/src/test/java/appland/cli/DefaultAppLandDownloadServiceProxyTest.java Outdated
Comment thread plugin-core/src/test/java/appland/cli/CliToolsTest.java
Extracts platform identifier generation into a dedicated CliPlatform
utility, ensuring consistent mapping to manifest keys (e.g., linux-x64).
Also isolates all local file resolution, version parsing, and cache
cleanup logic from DefaultAppLandDownloadService into a new
LocalAssetRepository.

This purely structural change prepares the download service to
transition from GitHub release-based discovery to a manifest-driven
strategy.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 32 out of 32 changed files in this pull request and generated 4 comments.

Comment thread plugin-core/src/main/java/appland/cli/LocalAssetRepository.java
Comment thread plugin-core/src/main/java/appland/cli/ManifestManager.java

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 32 out of 32 changed files in this pull request and generated 9 comments.

Comment thread plugin-core/src/main/java/appland/settings/DownloadSettings.java Outdated
Comment thread plugin-core/src/main/java/appland/settings/DownloadSettings.java
Comment thread plugin-core/src/main/kotlin/appland/settings/AppMapProjectSettingsPanel.kt Outdated
Comment thread plugin-core/src/main/kotlin/appland/settings/AppMapProjectSettingsPanel.kt Outdated
Comment thread plugin-core/src/main/java/appland/cli/DefaultAppLandDownloadService.java Outdated
Comment thread plugin-core/src/main/java/appland/cli/LocalAssetRepository.java
Comment thread plugin-core/src/test/java/appland/cli/DefaultAppLandDownloadServiceProxyTest.java Outdated
dividedmind and others added 7 commits June 15, 2026 14:02
Introduces a manifest-based update strategy for AppMap and Scanner
CLI binaries, replacing the legacy GitHub releases tag-parsing fallback
chain. Binaries are now verified via SHA-256 digests.

Enterprise deployments can specify a base manifest URL via
appMap.manifest.appmapUrl, and users can override these via the
plugin settings UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Old versions now accumulate in the system cache directory rather than
being pruned on each download, which simplifies the download path and
makes manual testing easier.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e paths

Moves downloaded CLI binaries from the IDE's system-path directory into the
platform-specific OS cache directory (matching the VSCode AppMap extension):
  - Linux:   $XDG_CACHE_HOME/appmap or ~/.cache/appmap
  - macOS:   ~/Library/Caches/AppMap
  - Windows: %LOCALAPPDATA%\AppMap\cache

Binary filenames now embed the version (e.g. appmap-linux-x64-1.2.3) in a
flat layout rather than nested version subdirectories, matching the VSCode
convention.  Both plugins now resolve to the same cached files, avoiding
duplicate large downloads for users running both IDEs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the plugin-private active-version.txt mechanism with symlinks in
~/.appmap/bin/ (e.g. ~/.appmap/bin/appmap → ~/.cache/appmap/appmap-linux-x64-1.2.3),
matching the scheme used by the VSCode AppMap extension.  Both plugins now share
not just the cached binaries but also the current-version pointer, so a download
by either plugin is immediately visible to the other.

On Windows systems where symlinks are unavailable, the file is copied instead
(same fallback as VSCode).  Version is recovered best-effort via readlink on the
symlink target; if the target cannot be resolved (copy fallback), "unknown" is
shown in status reports rather than marking the binary unavailable.

Also adds an INFO log entry when the JSON-RPC server is launched, consistent
with the existing entries for the indexer and scanner processes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…leaks

Background debouncing alarms were scoped to AppLandLifecycleService
(application lifetime), causing them to fire after a test finished and
trigger unexpected server restarts in subsequent tests.

A @testonly constructor accepts an explicit Disposable parent so tests
can pass getTestRootDisposable(). Production code defaults to
AppLandLifecycleService. This also keeps the class compliant with the
JetBrains guideline that applicationListeners subscribers must not
implement Disposable.
HttpConfigurable is deprecated; use ProxySettings (the recommended
replacement) instead.
…inary selection

In findHighestCachedBinary, we search for the best cached binary using
LocalAssetRepository::isExecutableBinary, then call .max() with
SemVerComparator.INSTANCE. Previously, SemVerComparator sorted nulls
to the end, making them "larger" than any valid SemVer version. This
caused .max() to incorrectly select unversioned or strangely-named
executables (such as leftovers from a crash) as fallback binaries.

This commit updates SemVerComparator to treat null SemVer values as the
smallest elements, ensuring that valid, parsed versions are always
preferred during fallback selection. Includes tests verifying the
comparator and the fallback lookup behavior.
Adds an explicit Yarn resolution for esbuild to 0.28.1 in the
appland-webview subproject to address security vulnerabilities.
This overrides the ^0.27.0 transitive constraint from tsup. Verified
that the webview workspace builds successfully after upgrading.
Tag tests that require a live network connection with @RequiresNetwork
and exclude them from the default test task. Opt in with
-PincludeNetworkTests, which CI always passes.

The test binary cache is moved from an ephemeral IntelliJ temp directory
to ~/.cache/appmap-test so downloaded binaries (~274 MB) survive across
Gradle invocations and only need to be fetched once per version per
machine. removeDownloads() now only clears symlinks, leaving the cache
intact. Tests that only need a binary to exist use a new
ensureStubInstalled() helper instead of hitting the network.

CI caches ~/.cache/appmap-test via actions/cache@v5 with a run_id-keyed
save and prefix-based restore so the cache stays current as new binary
versions are released.
@dividedmind dividedmind merged commit ae510c8 into main Jun 15, 2026
5 checks passed
@dividedmind dividedmind deleted the feat/manifests branch June 15, 2026 20:56
@appmap-releasebot

Copy link
Copy Markdown

🎉 This PR is included in version 0.84.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants