Skip to content

Commit

Permalink
Fixed agent cache issue when only single agent.version file was used …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
PiotrKarczmarz authored Dec 5, 2024
1 parent 3e358de commit 74f6338
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down

0 comments on commit 74f6338

Please sign in to comment.