[PR #84] [CLOSED] fix: refresh worker container when REPO changes between runs #109

Closed
opened 2026-02-27 07:20:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/KeygraphHQ/shannon/pull/84
Author: @ChinmayShringi
Created: 2/7/2026
Status: Closed

Base: mainHead: fix/repo-change-between-runs


📝 Commits (1)

  • f44b058 fix: refresh worker container when REPO changes between runs

📊 Changes

1 file changed (+8 additions, -0 deletions)

View changed files

📝 shannon (+8 -0)

📄 Description

Summary

When users changed REPO= between runs, the old repository content persisted because the worker container wasn't recreated with the new volume mount.

Root Cause

In ensure_containers(), if Temporal is already healthy, the function returns early without refreshing the worker container. The existing fix for OUTPUT_DIR wasn't applied to TARGET_REPO.

Solution

Add the same worker refresh logic for TARGET_REPO that already exists for OUTPUT_DIR. Docker compose will only recreate the container if the mount actually changed.

Changes

  • shannon: Added TARGET_REPO refresh logic (7 lines)

Test plan

  • Run ./shannon start URL=... REPO=/path/to/repo1
  • Run ./shannon start URL=... REPO=/path/to/repo2
  • Verify the second run uses repo2's source code

Fixes #70


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/KeygraphHQ/shannon/pull/84 **Author:** [@ChinmayShringi](https://github.com/ChinmayShringi) **Created:** 2/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/repo-change-between-runs` --- ### 📝 Commits (1) - [`f44b058`](https://github.com/KeygraphHQ/shannon/commit/f44b05840aff940be077faa714484b59c7fb24fc) fix: refresh worker container when REPO changes between runs ### 📊 Changes **1 file changed** (+8 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `shannon` (+8 -0) </details> ### 📄 Description ## Summary When users changed `REPO=` between runs, the old repository content persisted because the worker container wasn't recreated with the new volume mount. ## Root Cause In `ensure_containers()`, if Temporal is already healthy, the function returns early without refreshing the worker container. The existing fix for `OUTPUT_DIR` wasn't applied to `TARGET_REPO`. ## Solution Add the same worker refresh logic for `TARGET_REPO` that already exists for `OUTPUT_DIR`. Docker compose will only recreate the container if the mount actually changed. ## Changes - `shannon`: Added TARGET_REPO refresh logic (7 lines) ## Test plan - [ ] Run `./shannon start URL=... REPO=/path/to/repo1` - [ ] Run `./shannon start URL=... REPO=/path/to/repo2` - [ ] Verify the second run uses repo2's source code Fixes #70 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:20:27 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shannon-KeygraphHQ#109
No description provided.