Open
Conversation
Keep plain dstack offer global when no fleets are specified, but respect explicitly selected fleets. For a single --fleet, return the same per-fleet offers that would be considered if that fleet were the chosen candidate during apply planning. For multiple --fleet values, collect offers for each selected fleet and merge them instead of picking one best fleet.
Inline the temporary dstack offer dispatcher helper, rename the remaining fleet offer helper to match its behavior, and document the single-fleet vs multi-fleet semantics in docstrings.
added 2 commits
April 14, 2026 11:32
The new offer CLI test helper used asyncio.run(), which clears the current event loop on Python 3.9/3.10 and made a later test_event_loop assertion fail in GitHub Actions. Use a private event loop in the helper instead so the test stays isolated.
Add a short comment explaining why the helper uses a private event loop instead of asyncio.run(): the latter clears the current loop on Python 3.9/3.10 and can break later tests in the same worker.
r4victor
reviewed
Apr 14, 2026
The isolated-loop comment should not claim the same Queue construction failure on Python 3.10. Python 3.9 still constructs Queue via get_event_loop(), while 3.10 removed the loop parameter and defers loop binding until use.
r4victor
reviewed
Apr 14, 2026
r4victor
reviewed
Apr 14, 2026
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
--fleet,dstack offerignores existing fleets and shows all available offers that match the request--fleet,dstack offershows the offers available through that fleet--fleet,dstack offercombines the offers available through the selected fleetsdstack offer --group-by ... --fleet ...follows the same fleet-selection behavior for backend offersdstack applyis unchanged and still chooses a single best fleet--fleetwarning, add a plain-output hint, and document the fleet behavior inSKILL.mdTesting
Validated E2E use cases
--fleet, plain and groupeddstack offerstill ignore existing fleets and show all matching available offers--fleet, plain, JSON, and groupeddstack offershow the offers available through that fleet--fleet,dstack offercombines the offers available through the selected fleets and excludes unselected fleetstotal_offers, including after multi-fleet backend-offer deduplicationdstack offeranddstack applydstack applystill chooses a single best fleet and provisions successfullyChecks
uv run pytestuv run pyright -p .uv run pre-commit run --files src/dstack/_internal/server/services/runs/plan.py src/tests/_internal/server/routers/test_runs.py src/tests/_internal/server/services/runs/test_plan.pyAI Assistance