Skip to content

fix: CE-1414 rely on flashBootType instead of -fb#297

Merged
deanq merged 2 commits intomainfrom
luxbarker/ce-1414-update-flash-to-use-flashboottype
Apr 1, 2026
Merged

fix: CE-1414 rely on flashBootType instead of -fb#297
deanq merged 2 commits intomainfrom
luxbarker/ce-1414-update-flash-to-use-flashboottype

Conversation

@k-nox
Copy link
Copy Markdown
Contributor

@k-nox k-nox commented Mar 31, 2026

Instead of appending -fb to signal an endpoint is flashboot-enabled, we can now set flashBootType = "FLASHBOOT". This PR leaves in place some -fb parsing to be fully back-compatible, because graphql is still appending -fb until all codebases are cleaned up.
All places where we manually appended -fb to the name have been removed, and tests have been updated accordingly.

@k-nox k-nox force-pushed the luxbarker/ce-1414-update-flash-to-use-flashboottype branch from 9833db8 to 7e6394a Compare March 31, 2026 21:09
@deanq deanq requested a review from Copilot April 1, 2026 19:58
Copy link
Copy Markdown
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 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 -fb suffixes, and set flashBootType.
  • Extend the GraphQL saveEndpoint selection set to include flashBootType.
  • Update unit/integration tests to assert stable names (no -fb) and flashBootType == "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"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
self.flashBootType = "FLASHBOOT"
self.flashBootType = "FLASHBOOT"
else:
# Ensure flashBootType is cleared when flashboot is disabled
self.flashBootType = None

Copilot uses AI. Check for mistakes.
@deanq deanq merged commit 1f8b7d6 into main Apr 1, 2026
4 checks passed
@deanq deanq deleted the luxbarker/ce-1414-update-flash-to-use-flashboottype branch April 1, 2026 20:50
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.

4 participants