Skip to content

[DX-4045] Loopinstall Caching - #23285

Merged
kalverra merged 6 commits into
developfrom
loopinstallCaching
Jul 31, 2026
Merged

[DX-4045] Loopinstall Caching#23285
kalverra merged 6 commits into
developfrom
loopinstallCaching

Conversation

@kalverra

@kalverra kalverra commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Running loopinstall takes ~5 minutes in CI, and there's no proper caching for it. This PR adds it in two tiers.

  • Tier 1 caches the binaries. Handy when plugins file doesn't change.
  • Tier 2 handles the build cache for the binaries, for when plugin versions do change.

@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@trunk-io

trunk-io Bot commented Jul 30, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@kalverra
kalverra force-pushed the loopinstallCaching branch from 8e381c7 to 454e0a2 Compare July 30, 2026 22:33
@kalverra
kalverra marked this pull request as ready for review July 30, 2026 22:33
@kalverra
kalverra requested review from a team as code owners July 30, 2026 22:33
@kalverra
kalverra requested a review from Copilot July 30, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Risk Rating: MEDIUM — Changes are confined to CI/workflow + composite actions, but they can affect CI correctness and reliability across many runs (cache correctness, module resolution, and tool installation).

This PR aims to reduce CI time spent running loopinstall by introducing a two-tier caching strategy (cached plugin binaries + cached Go build cache), and also standardizes/caches Aptos (and tweaks Solana caching) via composite actions.

Changes:

  • Replace make install-plugins steps in CI with a new composite action that restores/saves cached LOOP plugin binaries and (on miss) a scoped Go build cache.
  • Replace direct Aptos CLI installation with a composite action that caches the installed binary.
  • Adjust Solana setup caching strategy (path/key), and refactor deployment workflow setup steps.

Scrupulous human review recommended for:

  • Cache key correctness vs. what is actually installed/built in:
    • .github/actions/setup-solana/action.yml (new version input vs installer script behavior)
    • .github/actions/setup-loop-plugins/action.yml (plugin-file input vs make install-plugins-public behavior)
  • Module resolution in .github/workflows/ci-deployments.yml (go mod download directory vs configured deployment/go.* inputs)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/ci-deployments.yml Switches to composite actions for Aptos + LOOP plugins; adjusts module download and DB setup invocation.
.github/workflows/ci-core.yml Switches Aptos + LOOP plugins setup to composite actions for reuse/caching.
.github/actions/setup-solana/action.yml Updates Solana caching behavior and introduces a version input.
.github/actions/setup-loop-plugins/action.yml New composite action implementing two-tier caching for LOOP plugin installation.
.github/actions/setup-aptos/action.yml New composite action to install Aptos CLI with caching.

Comment thread .github/workflows/ci-deployments.yml
Comment thread .github/actions/setup-solana/action.yml Outdated
Comment thread .github/actions/setup-loop-plugins/action.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 6 out of 6 changed files in this pull request and generated no new comments.

Suppressed comments (3)

.github/actions/setup-loop-plugins/action.yml:44

  • The cache key hash computation uses shasum -a 256, which isn't reliably available on Linux runners by default. If shasum is missing, this step will fail and the whole composite action will break. Consider using sha256sum when available (and optionally falling back to shasum for portability).
        MANIFEST_HASH=""
        if [ -n "$FILES" ]; then
          MANIFEST_HASH=$(cat $FILES 2>/dev/null | shasum -a 256 | awk '{print $1}')
        fi

.github/actions/setup-loop-plugins/action.yml:109

  • make install-plugins-local uses go install (see GNUmakefile:109), which respects GOBIN. This action currently sets GOBIN/GOCACHE for the remote plugin installs but not for local plugins, so local plugin binaries won't land in the cached bin directory that this action adds to PATH (and won't benefit from the scoped GOCACHE). Setting the same env vars here makes behavior consistent and ensures the binaries are in the expected directory.
    - name: Install local plugins
      if: ${{ inputs.install-local == 'true' }}
      shell: bash
      run: make install-plugins-local

.github/workflows/ci-deployments.yml:161

  • This step name says "vendor packages", but go mod download downloads module dependencies into the module cache (it doesn't populate vendor/). Renaming the step avoids confusion when debugging CI.
      - name: Download Go vendor packages
        working-directory: deployment
        run: go mod download

@cl-sonarqube-production

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
E Security Rating on New Code (required ≥ A)
3 New Blocker Issues (required ≤ 0)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE SonarQube for IDE

@kalverra
kalverra disabled auto-merge July 31, 2026 11:33
@kalverra
kalverra enabled auto-merge July 31, 2026 11:53
@kalverra
kalverra added this pull request to the merge queue Jul 31, 2026
Merged via the queue into develop with commit 767c9f1 Jul 31, 2026
224 checks passed
@kalverra
kalverra deleted the loopinstallCaching branch July 31, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants