Skip to content

Conversation

@jhcipar
Copy link
Contributor

@jhcipar jhcipar commented Jan 14, 2026

  • Adds GraphQL mutations/queries for manifest management (updateFlashBuildManifest, get_flash_build) and adjusts callers to use build IDs directly.
  • Switches StateManagerClient from REST/httpx calls to GraphQL: it fetches the active build + manifest, merges resource updates, and writes back via updateFlashBuildManifest.
  • Updates documentation to describe the new GraphQL-driven manifest persistence path.

@jhcipar jhcipar requested a review from deanq January 15, 2026 18:52
@jhcipar jhcipar changed the title wip: manifest management via gql for flash client Manifest management via gql for flash client Jan 15, 2026
@jhcipar jhcipar marked this pull request as ready for review January 15, 2026 19:04
@jhcipar
Copy link
Contributor Author

jhcipar commented Jan 15, 2026

AE-1741

- Add 13 unit tests covering basic operations, error handling, retry logic, and concurrency
- Fix race condition by adding asyncio.Lock for manifest updates
- Replace generic exception handling with specific GraphQL exception types
- Add runtime validation to get_flash_build() API
- Standardize error messages and add deprecation warnings
- Update documentation with GraphQL migration guide
@deanq deanq changed the title Manifest management via gql for flash client feat: AE-1471 manifest management via gql for flash client Jan 15, 2026
@deanq deanq changed the title feat: AE-1471 manifest management via gql for flash client feat: AE-1741 manifest management via gql for flash client Jan 15, 2026
@deanq deanq requested a review from Copilot January 15, 2026 22:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates manifest management from REST API to GraphQL for the Flash client, enabling direct interaction with RunPod's GraphQL API for build and manifest operations.

Changes:

  • Introduces GraphQL mutations (updateFlashBuildManifest) and queries (get_flash_build) for manifest management
  • Refactors StateManagerClient to use RunpodGraphQLClient instead of httpx-based REST calls
  • Updates get_flash_build API signature to accept build ID strings directly instead of dictionary inputs

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/unit/runtime/test_state_manager_client.py Comprehensive test suite for GraphQL-based StateManagerClient covering basic operations, error handling, retry logic, and concurrency
src/tetra_rp/runtime/state_manager_client.py Migration from REST/httpx to GraphQL-based manifest persistence with locking for concurrency safety
src/tetra_rp/runtime/exceptions.py New GraphQL-specific exception hierarchy (GraphQLError, GraphQLMutationError, GraphQLQueryError)
src/tetra_rp/core/resources/app.py Updated get_build call to use new string-based API signature
src/tetra_rp/core/api/runpod.py Added update_build_manifest mutation and updated get_flash_build to accept build_id as string
docs/Cross_Endpoint_Routing.md Updated documentation to reflect GraphQL-based architecture and migration guide

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

deanq added 3 commits January 15, 2026 14:34
- Document manifest field change in get_flash_build docstring
- Remove unused _client attribute from StateManagerClient
- Use calculated backoff values in retry tests for maintainability
- Remove unused api_key, base_url, and timeout parameters
- Remove self.api_key storage and validation (redundant with RunpodGraphQLClient)
- Remove unused os import and DEFAULT_REQUEST_TIMEOUT import
- Update all tests to use simplified constructor
- Increase test coverage from 93% to 95%
…nager methods

- Update module docstring: HTTP client -> GraphQL client
- Fix get_persisted_manifest return type docs (never returns None)
- Remove unused context manager methods (close, __aenter__, __aexit__)
@deanq deanq merged commit 83979e7 into main Jan 15, 2026
7 checks passed
@deanq deanq deleted the jhcipar/flash-resource-manifest branch January 15, 2026 23:56
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.

2 participants