Skip to content

fix(mysql): orc memberLeave uses the contract member identity and fails closed#3096

Draft
weicao wants to merge 1 commit into
mainfrom
helios/mysql-orc-member-leave-contract
Draft

fix(mysql): orc memberLeave uses the contract member identity and fails closed#3096
weicao wants to merge 1 commit into
mainfrom
helios/mysql-orc-member-leave-contract

Conversation

@weicao

@weicao weicao commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #3095.

Two scoped changes in orc-member-leave.sh:

  • leave_member="${KB_LEAVE_MEMBER_POD_NAME:-${KB_AGENT_POD_NAME}}" — the 05b contract variable, with the old behavior as explicit fallback; forget/verify/log all use it.
  • Verification now probes Orchestrator reachability (-c clusters) before treating an empty -c instance result as "forgotten", because outage and absence are otherwise indistinguishable. Outage → exit 1 (kbagent retry), absence → success, still-present → exit 1 (unchanged).

Validation: bash -n pass. Runtime matrix before undraft: normal scale-in (member forgotten, Ops succeeds); scale-in with Orchestrator down (action fails, retries after recovery); scale-in where the action executes on a pod other than the leaving member.

🤖 Generated with Claude Code

…ls closed

Target KB_LEAVE_MEMBER_POD_NAME (05b memberLeave contract) instead of
the execution pod's name, falling back only when unset. Verify
Orchestrator reachability before interpreting an empty instance query
as "forgotten" - an Orchestrator outage previously made scale-in
report success without deregistering the member.

Fixes #3095

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (35e0ded) to head (2b11a03).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3096   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        144     144           
  Lines      23013   23013           
=====================================
  Misses     23013   23013           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

mysql(orc): memberLeave ignores KB_LEAVE_MEMBER_POD_NAME and reports success when Orchestrator is down

2 participants