Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 15 additions & 17 deletions sdks/api/fern/definition/actors/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,26 +163,24 @@ types:
tags: unknown
build: optional<uuid>
build_tags: optional<unknown>
runtime: optional<CreateActorRuntimeRequest>
network: optional<CreateActorNetworkRequest>
resources: optional<localCommons.Resources>
lifecycle: optional<localCommons.Lifecycle>

CreateActorRuntimeRequest:
properties:
# arguments: optional<list<string>>
environment: optional<map<string, string>>
network: optional<CreateActorRuntimeNetworkRequest>

CreateActorRuntimeNetworkRequest:
properties:
endpoint_type: localCommons.EndpointType

CreateActorNetworkRequest:
properties:
mode: optional<localCommons.NetworkMode>
network_mode: optional<localCommons.NetworkMode>
network_endpoint_type: localCommons.EndpointType
Copy link
Contributor

Choose a reason for hiding this comment

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

The network_endpoint_type field appears to be required in the flattened structure, whereas previously it was nested inside the optional runtime.network object chain. This change could break backward compatibility for clients that don't specify this field. Consider making it optional with optional<localCommons.EndpointType> to maintain backward compatibility with existing API consumers.

Suggested change
network_endpoint_type: localCommons.EndpointType
network_endpoint_type: optional<localCommons.EndpointType>

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor

Choose a reason for hiding this comment

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

fixed in upstack

Copy link
Contributor

Choose a reason for hiding this comment

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

The network_endpoint_type field should be marked as optional to maintain backward compatibility with existing clients. In the original structure, this field was nested inside an optional network object, meaning it could effectively be absent. To preserve this behavior in the flattened structure, please change:

network_endpoint_type: localCommons.EndpointType

to:

network_endpoint_type: optional<localCommons.EndpointType>

This ensures that existing API consumers won't encounter validation errors when the field is not provided.

Suggested change
network_endpoint_type: localCommons.EndpointType
network_endpoint_type: optional<localCommons.EndpointType>

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

ports: optional<map<string, CreateActorPortRequest>>
wait_ready: optional<boolean>
wait_for_network_ready: optional<boolean>
resources: optional<localCommons.Resources>
kill_timeout:
docs: >-
The duration to wait for in milliseconds before killing the actor.
This should be set to a safe default, and can be overridden during a
DELETE request if needed.
type: optional<long>
durable:
docs: >-
If true, the actor will try to reschedule itself automatically in the event of a crash or a
datacenter failover. The actor will not reschedule if it exits successfully.
type: optional<boolean>

CreateActorPortRequest:
properties:
Expand Down
34 changes: 17 additions & 17 deletions sdks/api/fern/definition/actors/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,11 @@ types:
id: commons.Id
region: string
tags: unknown
runtime: Runtime
network: Network
lifecycle: Lifecycle
created_at: commons.Timestamp
started_at: optional<commons.Timestamp>
destroyed_at: optional<commons.Timestamp>

Runtime:
properties:
build: uuid
arguments: optional<list<string>>
environment: optional<map<string, string>>

Lifecycle:
properties:
network_mode: NetworkMode
ports: map<string, Port>
kill_timeout:
docs: >-
The duration to wait for in milliseconds before killing the actor.
Expand All @@ -35,11 +25,9 @@ types:
If true, the actor will try to reschedule itself automatically in the event of a crash or a
datacenter failover. The actor will not reschedule if it exits successfully.
type: optional<boolean>

Network:
properties:
mode: NetworkMode
ports: map<string, Port>
created_at: commons.Timestamp
started_at: optional<commons.Timestamp>
destroyed_at: optional<commons.Timestamp>

NetworkMode:
enum:
Expand Down Expand Up @@ -83,3 +71,15 @@ types:
- hostname
- path

Resources:
properties:
cpu:
docs: |
The number of CPU cores in millicores, or 1/1000 of a core. For example,
1/8 of a core would be 125 millicores, and 1 core would be 1000
millicores.
type: integer
memory:
docs: The amount of memory in megabytes
type: integer

Loading