Skip to content

Commit

Permalink
chore(ds): fix started_at server conversion (#1073)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
NathanFlurry committed Aug 16, 2024
1 parent fb3168b commit ec498fb
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 33 deletions.
1 change: 0 additions & 1 deletion fern/definition/servers/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ types:
lifecycle: Lifecycle
created_at: long
started_at: optional<long>
connectable_at: optional<long>
destroyed_at: optional<long>

Runtime:
Expand Down
23 changes: 11 additions & 12 deletions sdks/full/go/servers/types.go

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

3 changes: 0 additions & 3 deletions sdks/full/openapi/openapi.yml

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

3 changes: 0 additions & 3 deletions sdks/full/openapi_compat/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/full/rust-cli/docs/ServersServer.md

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

3 changes: 0 additions & 3 deletions sdks/full/rust-cli/src/models/servers_server.rs

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

1 change: 0 additions & 1 deletion sdks/full/rust/docs/ServersServer.md

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

3 changes: 0 additions & 3 deletions sdks/full/rust/src/models/servers_server.rs

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

4 changes: 2 additions & 2 deletions sdks/full/typescript/archive.tgz

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

4 changes: 2 additions & 2 deletions sdks/runtime/typescript/archive.tgz

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

6 changes: 4 additions & 2 deletions svc/pkg/ds/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ impl ApiTryFrom<Server> for models::ServersServer {
environment: value.env_id,
datacenter: value.datacenter_id,
created_at: value.create_ts,
started_at: value.start_ts,
connectable_at: value.connectable_ts,
// `started_at` -> `connectable_ts` is intentional. We don't expose the internal
// workings of DS to the API, so we need to return the timestamp at which the serer can
// actually do anything useful.
started_at: value.connectable_ts,
destroyed_at: value.destroy_ts,
tags: Some(serde_json::to_value(value.tags)?),
runtime: Box::new(models::ServersRuntime {
Expand Down

0 comments on commit ec498fb

Please sign in to comment.