GQL addModelRevision fails with relay global ID for deployment_id
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
## Bug Description
The `addModelRevision` mutation fails when `deploymentId` is passed as a relay global ID (base64-encoded). The resolver calls `input.to_pydantic()` which tries to convert the base64 global ID directly to UUID, causing `badly formed hexadecimal UUID string`.
## Root Cause
The `add_model_revision` resolver in `resolver/revision.py` passes `input.to_pydantic()` directly to the adapter without resolving the relay global ID first. In contrast, `activate_deployment_revision` correctly calls `resolve_global_id()` before constructing the DTO.
## Reproduction
```
mutation {
addModelRevision(input: {
deploymentId: "TW9kZWxEZXBsb3ltZW50OmFhYjUyNDIyLS4uLg==" # relay global ID
name: "v2"
...
}) { revision { id } }
}
```
Error: `badly formed hexadecimal UUID string`
## Fix
In the resolver, resolve the global ID before calling the adapter, matching the pattern used by `activate_deployment_revision`.
JIRA Issue: BA-5362
Contributor guide
Research direction
Start in resolver/revision.py at the add_model_revision resolver and compare it with activate_deployment_revision, which already resolves the relay global ID. Verify the addModelRevision mutation with the provided deploymentId, and confirm that the relay ID is resolved before input.to_pydantic() reaches the adapter without the UUID error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100