Skip to content

fix(migrate): keep pre-worker earners visible to the worker after the owner migration - #646

Closed
GeiserX wants to merge 1 commit into
mainfrom
fix/migrate-adopts-direct-earners
Closed

GeiserX wants to merge 1 commit into
mainfrom
fix/migrate-adopts-direct-earners

Conversation

@GeiserX

@GeiserX GeiserX commented Nov 7, 2026

Copy link
Copy Markdown
Owner

On a host that still runs earners from the deploy path before workers (label cashpilot.deployed-by=direct), the owner migration left them alone. CashPilot counts direct as its own everywhere else (constants.CASHPILOT_DEPLOYED), but the migrator only took worker. So the fence network they sit on stayed unlabelled, and once the socket proxy started, those earners vanished from the worker.

The migrator now treats direct containers as CashPilot's:

  • a direct earner on the fence network no longer blocks the network from being relabelled;
  • each direct earner is recreated with cashpilot.deployed-by=worker, the only way Docker allows to change a container's labels. If it has unlabelled volumes they move in the same plan, with the same backup and checks as before. If it has none, the plan just stops, removes and recreates it as it was.

A container that is neither worker nor direct is still left alone, as before.

Test: test_earners_the_pre_worker_deploy_path_made_are_adopted_with_the_fence failed on main (the network was left alone with a warning) and passes here; the other 35 migrator tests still pass.

Desktop: nothing to port. Desktop has no socket proxy or owner migration.

…e proxy

The owner migrator only took containers labelled deployed-by=worker, but
CashPilot also counts deployed-by=direct as its own. On a host with such
earners the fence network was left unlabelled and the earners dropped out
of the worker's view. They now count as ours, and each is recreated with
the worker label (with its volumes moved when they need it).
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a4c867f and 17b7dbe.

Files selected for processing: 2

  • app/owner_migrate.py
  • tests/test_owner_migrate.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.98%. Comparing base (a4c867f) to head (17b7dbe).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #646   +/-   ##
=======================================
  Coverage   93.97%   93.98%           
=======================================
  Files          74       74           
  Lines       15686    15698   +12     
=======================================
+ Hits        14741    14753   +12     
  Misses        945      945           
Files with missing lines Coverage Δ
app/owner_migrate.py 90.72% <100.00%> (+0.22%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GeiserX

GeiserX commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Landed in #653 (f681889), which combined this fix with the others into one release.

@GeiserX GeiserX closed this Nov 7, 2026
@GeiserX
GeiserX deleted the fix/migrate-adopts-direct-earners branch November 7, 2026 21:42
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.

1 participant