feat(BA-6874): wire compute-schedule into the API handler#12841
Draft
fregataa wants to merge 3 commits into
Draft
feat(BA-6874): wire compute-schedule into the API handler#12841fregataa wants to merge 3 commits into
fregataa wants to merge 3 commits into
Conversation
Connect the compute-schedule GraphQL resolver to the session service so callers can invoke the query end-to-end (resolver -> adapter -> service -> scheduling controller). - Session adapter: build ComputeScheduleAction from the input DTO, resolve the requesting user from context, and delegate to the processor; map the ComputeScheduleResult back onto the response DTO. - Resolve the caller's main access key in the service from user_uuid (via the user repository) instead of threading a hardcoded value. - Extend the payload to carry the full remediation breadth the data type already exposes: UnschedulableReasonHint.required_container_reduction / image_not_found and ComputeSchedulePayload.resource_group_reason, using gql_added_field for the new GraphQL fields. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-authored-by: octodog <[email protected]>
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
ServiceUnavailable.user_uuidvia the user repository) instead of passing a hardcoded value from the adapter.UnschedulableReasonHint.required_container_reduction/image_not_foundandComputeSchedulePayload.resource_group_reason(new GraphQL fields usegql_added_field).Known limitation (draft)
The end-to-end path is not yet functional at runtime: the
compute_scheduleservice builds aSessionSpecDraftwhosescope.domain_id/domain_name/project_idare unset, so the sharedSessionSpecfinalize validation (session_spec_preparer._finalize) rejects every request withIncompleteSessionSpecbefore node-fitting runs. These scope fields are consumed only by the enqueue persistence path (scheduler/creators.py) and are dead weight for the DB-mutation-free dry-run. Resolving this (populate scope from the user vs. relax the validation for this path) is deferred and tracked separately; this PR lands the wiring + payload surface.Test plan
pants fmt / fix / lint / checkpassrequiredContainerReduction,imageNotFound,resourceGroupReason) exposed in SDLResolves BA-6874