From 74f63382f3e3890ae3d1f62480a9a8d85109ddff Mon Sep 17 00:00:00 2001 From: Piotr Karczmarz Date: Thu, 5 Dec 2024 13:32:58 +0100 Subject: [PATCH] Fixed agent cache issue when only single agent.version file was used to create agent cache (#164) CLOSE https://linear.app/sourcegraph/issue/CODY-4472/cody-agent-is-cached-using-only-agentagentversion-file Changes in the agent/buildAgent.ps1 and agent/runBuildAgent.ps1 don't trigger building agent, but they should. Example - latest changes to buildAgent.ps1, like copying `agent.version` file to VSIX installer, didn't take effect because old cache from the agent was used. In this case call to `VersionService.GetAgentVersion()` fails. --- .github/workflows/build.yml | 2 +- .github/workflows/publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9c2081a..18f7d041 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: uses: actions/cache@v4 with: path: src/Cody.VisualStudio/Agent - key: ${{ runner.os }}-agent-${{ hashFiles('agent/agent.version') }} + key: ${{ runner.os }}-agent-${{ hashFiles('agent/agent.version', 'agent/buildAgent.ps1', 'agent/runBuildAgent.ps1') }} - name: Build agent if needed if: ${{ steps.cache-agent.outputs.cache-hit != 'true' }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 55e245e1..04a8ebec 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -59,7 +59,7 @@ jobs: uses: actions/cache@v4 with: path: src/Cody.VisualStudio/Agent - key: ${{ runner.os }}-agent-${{ hashFiles('agent/agent.version') }} + key: ${{ runner.os }}-agent-${{ hashFiles('agent/agent.version', 'agent/buildAgent.ps1', 'agent/runBuildAgent.ps1') }} - name: Build agent if needed if: ${{ steps.cache-agent.outputs.cache-hit != 'true' }}