Use manifests to download tools#948
Merged
Merged
Conversation
4744ae0 to
d5bd80b
Compare
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.
d5bd80b to
1b113bf
Compare
1b113bf to
668ef2a
Compare
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.
668ef2a to
4f9eae2
Compare
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.
6a1e999 to
3437337
Compare
|
🎉 This PR is included in version 0.84.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
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).