-
Notifications
You must be signed in to change notification settings - Fork 100
feat: Support for canary deployments in gRPC controller #1081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,6 +62,14 @@ service IsolateController { | |
| // Build (or warm the cache for) an environment without running anything in it. | ||
| // Streams build logs and terminal status; reuses the same caches as Run/RegisterApplication. | ||
| rpc BuildEnvironment (BuildEnvironmentRequest) returns (stream BuildEnvironmentResult) {} | ||
| // Update application canary config | ||
| rpc UpdateCanary(UpdateCanaryRequest) returns (UpdateCanaryResponse) {} | ||
| // Rollback (cancel) application canary | ||
| rpc RollbackCanary(RollbackCanaryRequest) returns (RollbackCanaryResponse) {} | ||
| // Commit (roll forward) application canary | ||
| rpc CommitCanary(CommitCanaryRequest) returns (CommitCanaryResponse) {} | ||
| // Get application canary info | ||
| rpc CanaryInfo(CanaryInfoRequest) returns (CanaryInfoResponse) {} | ||
| } | ||
|
|
||
| message HostedMap { | ||
|
|
@@ -290,6 +298,7 @@ enum ApplicationAuthMode { | |
| enum DeploymentStrategy { | ||
| RECREATE = 0; | ||
| ROLLING = 1; | ||
| CANARY = 2; | ||
| } | ||
|
|
||
| message ApplicationHealthCheckConfig { | ||
|
|
@@ -511,6 +520,7 @@ message AliasInfo { | |
| optional int32 scaling_delay_seconds = 15; | ||
| optional string environment_name = 16; | ||
| bool is_rolling = 17; | ||
| optional CanaryInfo canary = 18; | ||
| } | ||
|
|
||
| message SetSecretRequest { | ||
|
|
@@ -595,7 +605,6 @@ message StopRunnerResponse { | |
| // Empty. For future use. | ||
| } | ||
|
|
||
|
|
||
| message KillRunnerRequest { | ||
| string runner_id = 1; | ||
| } | ||
|
|
@@ -663,3 +672,44 @@ message DeleteEnvironmentRequest { | |
| message DeleteEnvironmentResponse { | ||
| // Empty. For future use. | ||
| } | ||
|
|
||
| message CanaryInfo { | ||
| optional bool active = 1; | ||
| optional string revision = 2; | ||
| optional uint32 ratio = 3; // 0-100 | ||
| optional uint32 runners = 4; | ||
| } | ||
|
|
||
| message UpdateCanaryRequest { | ||
| string alias = 1; | ||
| uint32 ratio = 2; // 0-100 | ||
| } | ||
|
|
||
| message UpdateCanaryResponse { | ||
| CanaryInfo info = 1; | ||
| } | ||
|
|
||
| message RollbackCanaryRequest { | ||
| string alias = 1; | ||
| } | ||
|
|
||
| message RollbackCanaryResponse { | ||
| AliasInfo alias = 1; | ||
| } | ||
|
|
||
| message CommitCanaryRequest { | ||
| string alias = 1; | ||
| DeploymentStrategy strategy = 2; | ||
| } | ||
|
|
||
| message CommitCanaryResponse { | ||
| AliasInfo alias = 1; | ||
| } | ||
|
|
||
| message CanaryInfoRequest { | ||
| string alias = 1; | ||
| } | ||
|
|
||
| message CanaryInfoResponse { | ||
| CanaryInfo info = 1; | ||
|
Comment on lines
+713
to
+714
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When clients generate code from this committed Useful? React with 👍 / 👎. |
||
| } | ||
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding
CANARYto the sharedDeploymentStrategyenum makes it a valid value for fields likeRegisterApplicationRequest.deployment_strategyandSetAliasRequest.deployment_strategy, but the Python SDK/CLI still only allows"recreate"and"rolling"(projects/fal/src/fal/sdk.py:52,projects/fal/src/fal/sdk.py:462-484, and CLI choices inprojects/fal/src/fal/cli/apps.py:385-386). In those paths, a user trying to select the newly advertised canary strategy is rejected by argparse or hitsDeploymentStrategy[deployment_strategy.upper()]with no enum member, so the public Python tooling cannot send this new proto value.Useful? React with 👍 / 👎.