fix: CE-1414 rely on flashBootType instead of -fb#297
Conversation
9833db8 to
7e6394a
Compare
There was a problem hiding this comment.
Pull request overview
This PR migrates flashboot endpoint signaling away from name suffixes (-fb) and toward the explicit flashBootType = "FLASHBOOT" field, while keeping limited -fb handling for backward compatibility with older GraphQL behavior.
Changes:
- Update
ServerlessResource.sync_input_fields()to stop appending-fb, strip legacy-fbsuffixes, and setflashBootType. - Extend the GraphQL
saveEndpointselection set to includeflashBootType. - Update unit/integration tests to assert stable names (no
-fb) andflashBootType == "FLASHBOOT".
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_resource_identity.py | Updates identity/validator expectations to no longer rely on -fb and to assert flashBootType. |
| tests/unit/test_regressions.py | Adjusts regression assertion to expect unchanged name and flashBootType. |
| tests/unit/test_load_balancer_sls_resource.py | Updates LB serverless default-name expectations and asserts flashBootType. |
| tests/unit/runtime/test_resource_provisioner.py | Tightens manifest-created resource name expectation (no suffix mutation). |
| tests/unit/resources/test_serverless.py | Reworks flashboot-related tests to assert no -fb suffix and presence of flashBootType. |
| tests/unit/resources/test_cpu_load_balancer.py | Updates CPU LB tests to expect stable name and serialized flashBootType. |
| tests/integration/test_lb_remote_execution.py | Updates integration assertions to use unsuffixed resource names. |
| tests/integration/test_deploy_undeploy_lifecycle.py | Updates lifecycle assertions to expect stable names and flashBootType. |
| tests/integration/test_build_pipeline.py | Updates manifest/resource naming expectations to remove -fb. |
| src/runpod_flash/core/resources/serverless.py | Core behavior change: remove -fb mutation, strip legacy suffixes, set flashBootType. |
| src/runpod_flash/core/api/runpod.py | Adds flashBootType to the saveEndpoint GraphQL response fields. |
| src/runpod_flash/cli/commands/build_utils/resource_config_generator.py | Clarifies -fb handling as “historical” in generated config helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| while self.name.endswith("-fb"): | ||
| self.name = self.name[:-3] | ||
| self.name += "-fb" | ||
| self.flashBootType = "FLASHBOOT" |
There was a problem hiding this comment.
sync_input_fields() sets flashBootType = "FLASHBOOT" when flashboot is truthy, but it never clears flashBootType when flashboot is false. Since flashboot is excluded from the API payload (_payload_exclude()), a config that flips flashboot from True→False (or is initialized from an API response with flashBootType set) can still send flashBootType="FLASHBOOT" on deploy/update, making it impossible to disable flashboot via config. Consider explicitly setting flashBootType = None (or the appropriate non-flashboot value) in the else branch, and keep the -fb suffix stripping independent of the flag if you want to normalize legacy names consistently.
| self.flashBootType = "FLASHBOOT" | |
| self.flashBootType = "FLASHBOOT" | |
| else: | |
| # Ensure flashBootType is cleared when flashboot is disabled | |
| self.flashBootType = None |
Instead of appending
-fbto signal an endpoint is flashboot-enabled, we can now setflashBootType = "FLASHBOOT". This PR leaves in place some-fbparsing to be fully back-compatible, because graphql is still appending-fbuntil all codebases are cleaned up.All places where we manually appended
-fbto the name have been removed, and tests have been updated accordingly.