Skip to content

Commit f253994

Browse files
committed
wip
1 parent e4208b0 commit f253994

3 files changed

Lines changed: 17 additions & 111 deletions

File tree

docs/manager/graphql-reference/supergraph.graphql

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,13 +1626,7 @@ to support integers outside the range of a signed 32-bit integer.
16261626
scalar BigInt
16271627
@join__type(graph: GRAPHENE)
16281628

1629-
"""
1630-
Added in 25.19.0.
1631-
Input parameters for configuring a blue-green deployment strategy.
1632-
When auto_promote is true, traffic is automatically switched from the blue (old)
1633-
replica set to the green (new) set after promote_delay_seconds elapse.
1634-
When auto_promote is false (default), an explicit promotion action is required.
1635-
"""
1629+
"""Added in 25.19.0. Configuration for blue-green deployment strategy."""
16361630
input BlueGreenConfigInput
16371631
@join__type(graph: STRAWBERRY)
16381632
{
@@ -3652,14 +3646,7 @@ enum DeploymentOrderField
36523646
NAME @join__enumValue(graph: STRAWBERRY)
36533647
}
36543648

3655-
"""
3656-
Added in 25.19.0.
3657-
Defines the deployment policy attached to a model deployment,
3658-
including the rollout strategy (rolling update or blue-green),
3659-
strategy-specific parameters, and whether to automatically roll back on failure.
3660-
Each deployment has at most one policy; creating a new policy for the same deployment
3661-
replaces the existing one (upsert semantics).
3662-
"""
3649+
"""Added in 25.19.0. Deployment policy configuration."""
36633650
type DeploymentPolicy implements Node
36643651
@join__implements(graph: STRAWBERRY, interface: "Node")
36653652
@join__type(graph: STRAWBERRY)
@@ -3730,10 +3717,7 @@ input DeploymentStrategyInput
37303717
}
37313718

37323719
"""
3733-
Added in 25.19.0.
3734-
Base interface for all deployment strategy specifications.
3735-
Each concrete implementation (RollingUpdateStrategySpec, BlueGreenStrategySpec)
3736-
carries strategy-specific parameters that control how replica transitions are performed.
3720+
Added in 25.19.0. Base interface for deployment strategy specifications.
37373721
"""
37383722
interface DeploymentStrategySpec
37393723
@join__type(graph: STRAWBERRY)
@@ -3742,10 +3726,7 @@ interface DeploymentStrategySpec
37423726
}
37433727

37443728
"""
3745-
Added in 25.19.0.
3746-
Determines how new revisions of a model deployment are rolled out to replace old ones.
3747-
ROLLING performs incremental replica replacement controlled by max_surge and max_unavailable,
3748-
while BLUE_GREEN provisions a complete new replica set before switching traffic.
3729+
Added in 25.19.0. This enum represents the deployment strategy type of a model deployment, indicating the strategy used for deployment.
37493730
"""
37503731
enum DeploymentStrategyType
37513732
@join__type(graph: STRAWBERRY)
@@ -11528,14 +11509,7 @@ enum RoleStatus
1152811509
DELETED @join__enumValue(graph: STRAWBERRY)
1152911510
}
1153011511

11531-
"""
11532-
Added in 25.19.0.
11533-
Input parameters for configuring a rolling update strategy.
11534-
max_surge sets the maximum number of additional replicas that can be created
11535-
beyond the desired count during an update (default: 1).
11536-
max_unavailable sets the maximum number of replicas that can be unavailable
11537-
during the update (default: 0). At least one of these must be positive.
11538-
"""
11512+
"""Added in 25.19.0. Configuration for rolling update strategy."""
1153911513
input RollingUpdateConfigInput
1154011514
@join__type(graph: STRAWBERRY)
1154111515
{

docs/manager/graphql-reference/v2-schema.graphql

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,13 +1083,7 @@ enum BgtaskEventType {
10831083
FAILED
10841084
}
10851085

1086-
"""
1087-
Added in 25.19.0.
1088-
Input parameters for configuring a blue-green deployment strategy.
1089-
When auto_promote is true, traffic is automatically switched from the blue (old)
1090-
replica set to the green (new) set after promote_delay_seconds elapse.
1091-
When auto_promote is false (default), an explicit promotion action is required.
1092-
"""
1086+
"""Added in 25.19.0. Configuration for blue-green deployment strategy."""
10931087
input BlueGreenConfigInput {
10941088
autoPromote: Boolean! = false
10951089
promoteDelaySeconds: Int! = 0
@@ -2080,14 +2074,7 @@ enum DeploymentOrderField {
20802074
NAME
20812075
}
20822076

2083-
"""
2084-
Added in 25.19.0.
2085-
Defines the deployment policy attached to a model deployment,
2086-
including the rollout strategy (rolling update or blue-green),
2087-
strategy-specific parameters, and whether to automatically roll back on failure.
2088-
Each deployment has at most one policy; creating a new policy for the same deployment
2089-
replaces the existing one (upsert semantics).
2090-
"""
2077+
"""Added in 25.19.0. Deployment policy configuration."""
20912078
type DeploymentPolicy implements Node {
20922079
"""The Globally Unique ID of this object"""
20932080
id: ID!
@@ -2143,20 +2130,14 @@ input DeploymentStrategyInput {
21432130
}
21442131

21452132
"""
2146-
Added in 25.19.0.
2147-
Base interface for all deployment strategy specifications.
2148-
Each concrete implementation (RollingUpdateStrategySpec, BlueGreenStrategySpec)
2149-
carries strategy-specific parameters that control how replica transitions are performed.
2133+
Added in 25.19.0. Base interface for deployment strategy specifications.
21502134
"""
21512135
interface DeploymentStrategySpec {
21522136
strategy: DeploymentStrategyType!
21532137
}
21542138

21552139
"""
2156-
Added in 25.19.0.
2157-
Determines how new revisions of a model deployment are rolled out to replace old ones.
2158-
ROLLING performs incremental replica replacement controlled by max_surge and max_unavailable,
2159-
while BLUE_GREEN provisions a complete new replica set before switching traffic.
2140+
Added in 25.19.0. This enum represents the deployment strategy type of a model deployment, indicating the strategy used for deployment.
21602141
"""
21612142
enum DeploymentStrategyType {
21622143
ROLLING
@@ -6918,14 +6899,7 @@ enum RoleStatus {
69186899
DELETED
69196900
}
69206901

6921-
"""
6922-
Added in 25.19.0.
6923-
Input parameters for configuring a rolling update strategy.
6924-
max_surge sets the maximum number of additional replicas that can be created
6925-
beyond the desired count during an update (default: 1).
6926-
max_unavailable sets the maximum number of replicas that can be unavailable
6927-
during the update (default: 0). At least one of these must be positive.
6928-
"""
6902+
"""Added in 25.19.0. Configuration for rolling update strategy."""
69296903
input RollingUpdateConfigInput {
69306904
maxSurge: Int! = 1
69316905
maxUnavailable: Int! = 0

src/ai/backend/manager/api/gql/deployment/types/policy.py

Lines changed: 7 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,23 @@
2222
DeploymentStrategyTypeGQL: type[DeploymentStrategy] = strawberry.enum(
2323
DeploymentStrategy,
2424
name="DeploymentStrategyType",
25-
description=dedent_strip("""
26-
Added in 25.19.0.
27-
Determines how new revisions of a model deployment are rolled out to replace old ones.
28-
ROLLING performs incremental replica replacement controlled by max_surge and max_unavailable,
29-
while BLUE_GREEN provisions a complete new replica set before switching traffic.
30-
"""),
25+
description="Added in 25.19.0. This enum represents the deployment strategy type of a model deployment, indicating the strategy used for deployment.",
3126
)
3227

3328
# ========== Output Types (Response) ==========
3429

3530

3631
@strawberry.interface(
3732
name="DeploymentStrategySpec",
38-
description=dedent_strip("""
39-
Added in 25.19.0.
40-
Base interface for all deployment strategy specifications.
41-
Each concrete implementation (RollingUpdateStrategySpec, BlueGreenStrategySpec)
42-
carries strategy-specific parameters that control how replica transitions are performed.
43-
"""),
33+
description="Added in 25.19.0. Base interface for deployment strategy specifications.",
4434
)
4535
class DeploymentStrategySpecGQL:
4636
strategy: DeploymentStrategyTypeGQL
4737

4838

4939
@strawberry.type(
5040
name="RollingUpdateStrategySpec",
51-
description=dedent_strip("""
52-
Added in 25.19.0.
53-
Strategy specification for rolling updates.
54-
Replicas are replaced incrementally: max_surge controls how many extra replicas
55-
can be created above the desired count, and max_unavailable controls how many
56-
existing replicas can be taken down simultaneously during the transition.
57-
"""),
41+
description="Added in 25.19.0. Rolling update strategy specification.",
5842
)
5943
class RollingUpdateStrategySpecGQL(DeploymentStrategySpecGQL):
6044
max_surge: int
@@ -63,13 +47,7 @@ class RollingUpdateStrategySpecGQL(DeploymentStrategySpecGQL):
6347

6448
@strawberry.type(
6549
name="BlueGreenStrategySpec",
66-
description=dedent_strip("""
67-
Added in 25.19.0.
68-
Strategy specification for blue-green deployments.
69-
A complete new replica set (green) is provisioned alongside the existing one (blue).
70-
When auto_promote is true, traffic is automatically switched to the green set
71-
after promote_delay_seconds; otherwise, manual promotion is required.
72-
"""),
50+
description="Added in 25.19.0. Blue-green deployment strategy specification.",
7351
)
7452
class BlueGreenStrategySpecGQL(DeploymentStrategySpecGQL):
7553
auto_promote: bool
@@ -78,14 +56,7 @@ class BlueGreenStrategySpecGQL(DeploymentStrategySpecGQL):
7856

7957
@strawberry.type(
8058
name="DeploymentPolicy",
81-
description=dedent_strip("""
82-
Added in 25.19.0.
83-
Defines the deployment policy attached to a model deployment,
84-
including the rollout strategy (rolling update or blue-green),
85-
strategy-specific parameters, and whether to automatically roll back on failure.
86-
Each deployment has at most one policy; creating a new policy for the same deployment
87-
replaces the existing one (upsert semantics).
88-
"""),
59+
description="Added in 25.19.0. Deployment policy configuration.",
8960
)
9061
class DeploymentPolicyGQL(Node):
9162
id: NodeID[str]
@@ -136,14 +107,7 @@ def from_data(cls, data: DeploymentPolicyData) -> Self:
136107

137108
@strawberry.input(
138109
name="RollingUpdateConfigInput",
139-
description=dedent_strip("""
140-
Added in 25.19.0.
141-
Input parameters for configuring a rolling update strategy.
142-
max_surge sets the maximum number of additional replicas that can be created
143-
beyond the desired count during an update (default: 1).
144-
max_unavailable sets the maximum number of replicas that can be unavailable
145-
during the update (default: 0). At least one of these must be positive.
146-
"""),
110+
description="Added in 25.19.0. Configuration for rolling update strategy.",
147111
)
148112
class RollingUpdateConfigInputGQL:
149113
max_surge: int = 1
@@ -158,13 +122,7 @@ def to_spec(self) -> RollingUpdateSpec:
158122

159123
@strawberry.input(
160124
name="BlueGreenConfigInput",
161-
description=dedent_strip("""
162-
Added in 25.19.0.
163-
Input parameters for configuring a blue-green deployment strategy.
164-
When auto_promote is true, traffic is automatically switched from the blue (old)
165-
replica set to the green (new) set after promote_delay_seconds elapse.
166-
When auto_promote is false (default), an explicit promotion action is required.
167-
"""),
125+
description="Added in 25.19.0. Configuration for blue-green deployment strategy.",
168126
)
169127
class BlueGreenConfigInputGQL:
170128
auto_promote: bool = False

0 commit comments

Comments
 (0)