Skip to content

Skip best fleet search for dstack offer#3788

Merged
peterschmidt85 merged 2 commits intomasterfrom
fix/offer-skip-best-fleet-search
Apr 16, 2026
Merged

Skip best fleet search for dstack offer#3788
peterschmidt85 merged 2 commits intomasterfrom
fix/offer-skip-best-fleet-search

Conversation

@peterschmidt85
Copy link
Copy Markdown
Contributor

@peterschmidt85 peterschmidt85 commented Apr 16, 2026

Summary

dstack offer without --group-by uses the same /runs/get_plan path as normal run planning, but still ran best-fleet selection before overriding the result with the offer-specific collection path.

This meant dstack offer without --fleet still did candidate-fleet selection and find_optimal_fleet_with_offers(...), then threw that work away and returned global offers.

Also updated in this change:

  • get_job_plans() description to explain dstack offer without --group-by vs normal planning
  • _should_select_best_fleet_candidate() naming and description to make the contract clearer
  • a TODO next to the current commands == [":"] hack to replace it with an explicit request/API signal

Reproduce

  1. Create several fleets in a project.
  2. Run dstack offer --gpu L4.
  3. Check server logs.

Before this change, the request evaluated candidate fleets and called find_optimal_fleet_with_offers(...) even though the final result came from the dstack offer without --group-by path.

@peterschmidt85 peterschmidt85 merged commit 770eaf8 into master Apr 16, 2026
28 checks passed
@peterschmidt85 peterschmidt85 deleted the fix/offer-skip-best-fleet-search branch April 16, 2026 08:59
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