From 4ce7a7f55b6eddf0dc01c2cd722b158887c63065 Mon Sep 17 00:00:00 2001 From: Lux Barker Date: Mon, 23 Mar 2026 14:46:39 -0700 Subject: [PATCH] fix: use flashBootType instead of appending -fb --- runpod/api/mutations/endpoints.py | 6 +++--- tests/test_api/test_mutation_endpoints.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/runpod/api/mutations/endpoints.py b/runpod/api/mutations/endpoints.py index 96a8c665..c9f88320 100644 --- a/runpod/api/mutations/endpoints.py +++ b/runpod/api/mutations/endpoints.py @@ -1,4 +1,4 @@ -""" Runpod | API Wrapper | Mutations | Endpoints """ +f"""Runpod | API Wrapper | Mutations | Endpoints""" # pylint: disable=too-many-arguments @@ -23,7 +23,7 @@ def generate_endpoint_mutation( # ------------------------------ Required Fields ----------------------------- # if flashboot: - name = name + "-fb" + input_fields.append('flashBootType: "FLASHBOOT"') input_fields.append(f'name: "{name}"') input_fields.append(f'templateId: "{template_id}"') @@ -75,12 +75,12 @@ def generate_endpoint_mutation( workersMax allowedCudaVersions gpuCount + flashBootType }} }} """ - def update_endpoint_template_mutation(endpoint_id: str, template_id: str): """Generate a string for a GraphQL mutation to update an existing endpoint's template.""" input_fields = [] diff --git a/tests/test_api/test_mutation_endpoints.py b/tests/test_api/test_mutation_endpoints.py index 8a99efa7..f4d058b3 100644 --- a/tests/test_api/test_mutation_endpoints.py +++ b/tests/test_api/test_mutation_endpoints.py @@ -32,7 +32,7 @@ def test_all_fields(self): 4, True, ) - self.assertIn('name: "test_name-fb"', result) + self.assertIn('name: "test_name"', result) self.assertIn('templateId: "test_template_id"', result) self.assertIn('gpuIds: "AMPERE_20"', result) self.assertIn('networkVolumeId: "test_volume_id"', result) @@ -42,3 +42,4 @@ def test_all_fields(self): self.assertIn("scalerValue: 5", result) self.assertIn("workersMin: 2", result) self.assertIn("workersMax: 4", result) + self.assertIn('flashBootType: "FLASHBOOT"', result)