Skip to content

Commit

Permalink
chore: make actor create runtime optional & fix inconsistent snake ca…
Browse files Browse the repository at this point in the history
…se in api
  • Loading branch information
NathanFlurry committed Nov 27, 2024
1 parent f5bba2e commit 8d9cdf7
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 40 deletions.
6 changes: 3 additions & 3 deletions packages/api/actor/src/route/actors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pub async fn create(
// args: body.runtime.arguments.unwrap_or_default(),
args: Vec::new(),
network_mode: network.mode.unwrap_or_default().api_into(),
environment: body.runtime.environment.unwrap_or_default(),
environment: body.runtime.and_then(|r| r.environment).unwrap_or_default(),
network_ports: unwrap!(network
.ports
.unwrap_or_default()
Expand Down Expand Up @@ -331,9 +331,9 @@ pub async fn create_deprecated(
cpu: body.resources.cpu,
memory: body.resources.memory,
}),
runtime: Box::new(models::ActorCreateActorRuntimeRequest {
runtime: Some(Box::new(models::ActorCreateActorRuntimeRequest {
environment: body.runtime.environment,
}),
})),
build: Some(body.runtime.build),
build_tags: None,
tags: body.tags,
Expand Down
3 changes: 1 addition & 2 deletions packages/services/build/ops/create/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ async fn handle(
.await?;
let game = game_res.games.first();
ensure!(game.is_some(), "game not found");
}
else if let Some(env_id) = env_id {
} else if let Some(env_id) = env_id {
let env_res = op!([ctx] game_namespace_get {
namespace_ids: vec![env_id.into()],
})
Expand Down
8 changes: 4 additions & 4 deletions sdks/api/fern/definition/actor/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ types:
region: optional<string>
tags: unknown
build: optional<uuid>
buildTags: optional<unknown>
runtime: CreateActorRuntimeRequest
build_tags: optional<unknown>
runtime: optional<CreateActorRuntimeRequest>
network: optional<CreateActorNetworkRequest>
resources: commons.Resources
lifecycle: optional<commons.Lifecycle>
Expand Down Expand Up @@ -145,7 +145,7 @@ types:
UpgradeActorRequest:
properties:
build: optional<uuid>
buildTags: optional<unknown>
build_tags: optional<unknown>

UpgradeActorResponse:
properties: {}
Expand All @@ -154,7 +154,7 @@ types:
properties:
tags: unknown
build: optional<uuid>
buildTags: optional<unknown>
build_tags: optional<unknown>

UpgradeAllActorsResponse:
properties:
Expand Down
1 change: 0 additions & 1 deletion sdks/api/full/openapi/openapi.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion sdks/api/full/openapi_compat/openapi.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdks/api/full/rust-cli/docs/ActorCreateActorRequest.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdks/api/full/rust/docs/ActorCreateActorRequest.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions sdks/api/full/rust/src/models/actor_create_actor_request.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion sdks/api/runtime/openapi/openapi.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion sdks/api/runtime/openapi_compat/openapi.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdks/api/runtime/rust/docs/ActorCreateActorRequest.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8d9cdf7

Please sign in to comment.