fix(copaw): fall back to static mc alias in local k8s mode - #1097
Open
RerankerGuo wants to merge 1 commit into
Open
fix(copaw): fall back to static mc alias in local k8s mode#1097RerankerGuo wants to merge 1 commit into
RerankerGuo wants to merge 1 commit into
Conversation
Closes agentscope-ai#957 - When AGENTTEAMS_RUNTIME=k8s, check if MC_HOST_{alias} is already set by the cloud STS path before skipping the alias setup - If MC_HOST is not set (local K8s with self-hosted MinIO), fall through to the static mc alias set path - Prevents copaw-worker startup failure in local K8s deployments where mc-wrapper does not provide STS credentials - Add 3 unit tests covering all k8s/non-k8s MC_HOST scenarios Test: pytest tests/test_sync.py (3 new tests pass)
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
RerankerGuo
force-pushed
the
fix/issue-957-k8s-copaw-worker-alias
branch
from
July 30, 2026 00:53
38fdd52 to
dd683e5
Compare
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.
Summary
This PR fixes #957 by adding a fallback path in
_ensure_alias()for local K8s deployments with self-hosted MinIO.Problem
In v1.1.2, commit
fc1b934added k8s mode detection that unconditionally skipped mc alias setup whenAGENTTEAMS_RUNTIME=k8s. This assumedmc-wrapper.shwould always provide STS credentials viaMC_HOST_*environment variables. However, this assumption only holds for Aliyun cloud deployments (RRSA/STS).In local K8s deployments with self-hosted MinIO:
HICLAW_RUNTIME=k8s→ k8s mode = True → alias setup skippedmc-wrapper.shdoes not setMC_HOST_hiclaw(no STS provider)mc mirror hiclaw/...fails with alias not foundFix
When
AGENTTEAMS_RUNTIME=k8s, check ifMC_HOST_{alias}is already set:mc alias setpathChanges
copaw/src/copaw_worker/sync.py: Modified_ensure_alias()to conditionally skip in k8s modecopaw/tests/test_sync.py: Added 3 unit tests covering:Testing
pytest tests/test_sync.py::test_ensure_alias_k8s_with_mc_host_set_skips_staticPASSEDpytest tests/test_sync.py::test_ensure_alias_k8s_without_mc_host_falls_through_staticPASSEDpytest tests/test_sync.py::test_ensure_alias_non_k8s_uses_staticPASSED