Skip to content

Commit 3e90e74

Browse files
feat(api): add readinessTimeout to automations and services
1 parent a6b0e65 commit 3e90e74

3 files changed

Lines changed: 130 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 193
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-439cda23bbab7cb3207b4350637971f50e98624270abba0e636cef39b54d34bd.yml
3-
openapi_spec_hash: 5b2ead9eced70d525d4348b2ed3f1387
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c1f318f2e8413e0195faf5e4216a17cf106cf942e2c51c5174476e801c097e2b.yml
3+
openapi_spec_hash: d6ec53f1cd8364bb6261cd3c0a5d2869
44
config_hash: 4447d1e1149a80d1bec70d353fb8acbf

src/resources/environments/automations/automations.ts

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,67 @@ export namespace AutomationsFile {
103103

104104
name?: string;
105105

106+
/**
107+
* A Duration represents a signed, fixed-length span of time represented as a count
108+
* of seconds and fractions of seconds at nanosecond resolution. It is independent
109+
* of any calendar and concepts like "day" or "month". It is related to Timestamp
110+
* in that the difference between two Timestamp values is a Duration and it can be
111+
* added or subtracted from a Timestamp. Range is approximately +-10,000 years.
112+
*
113+
* # Examples
114+
*
115+
* Example 1: Compute Duration from two Timestamps in pseudo code.
116+
*
117+
* Timestamp start = ...;
118+
* Timestamp end = ...;
119+
* Duration duration = ...;
120+
*
121+
* duration.seconds = end.seconds - start.seconds;
122+
* duration.nanos = end.nanos - start.nanos;
123+
*
124+
* if (duration.seconds < 0 && duration.nanos > 0) {
125+
* duration.seconds += 1;
126+
* duration.nanos -= 1000000000;
127+
* } else if (duration.seconds > 0 && duration.nanos < 0) {
128+
* duration.seconds -= 1;
129+
* duration.nanos += 1000000000;
130+
* }
131+
*
132+
* Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
133+
*
134+
* Timestamp start = ...;
135+
* Duration duration = ...;
136+
* Timestamp end = ...;
137+
*
138+
* end.seconds = start.seconds + duration.seconds;
139+
* end.nanos = start.nanos + duration.nanos;
140+
*
141+
* if (end.nanos < 0) {
142+
* end.seconds -= 1;
143+
* end.nanos += 1000000000;
144+
* } else if (end.nanos >= 1000000000) {
145+
* end.seconds += 1;
146+
* end.nanos -= 1000000000;
147+
* }
148+
*
149+
* Example 3: Compute Duration from datetime.timedelta in Python.
150+
*
151+
* td = datetime.timedelta(days=3, minutes=10)
152+
* duration = Duration()
153+
* duration.FromTimedelta(td)
154+
*
155+
* # JSON Mapping
156+
*
157+
* In JSON format, the Duration type is encoded as a string rather than an object,
158+
* where the string ends in the suffix "s" (indicating seconds) and is preceded by
159+
* the number of seconds, with nanoseconds expressed as fractional seconds. For
160+
* example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s",
161+
* while 3 seconds and 1 nanosecond should be expressed in JSON format as
162+
* "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON
163+
* format as "3.000001s".
164+
*/
165+
readinessTimeout?: string;
166+
106167
role?: '' | 'default' | 'editor' | 'ai-agent';
107168

108169
runsOn?: Shared.RunsOn;

src/resources/environments/automations/services.ts

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,12 @@ export interface ServiceSpec {
405405
*/
406406
env?: Array<Shared.EnvironmentVariableItem>;
407407

408+
/**
409+
* readiness_timeout is the maximum duration a service may remain in the Starting
410+
* phase while readiness checks run. 0s disables the timeout.
411+
*/
412+
readinessTimeout?: string;
413+
408414
/**
409415
* runs_on specifies the environment the service should run on.
410416
*/
@@ -574,6 +580,67 @@ export namespace ServiceUpdateParams {
574580

575581
env?: Array<Shared.EnvironmentVariableItem>;
576582

583+
/**
584+
* A Duration represents a signed, fixed-length span of time represented as a count
585+
* of seconds and fractions of seconds at nanosecond resolution. It is independent
586+
* of any calendar and concepts like "day" or "month". It is related to Timestamp
587+
* in that the difference between two Timestamp values is a Duration and it can be
588+
* added or subtracted from a Timestamp. Range is approximately +-10,000 years.
589+
*
590+
* # Examples
591+
*
592+
* Example 1: Compute Duration from two Timestamps in pseudo code.
593+
*
594+
* Timestamp start = ...;
595+
* Timestamp end = ...;
596+
* Duration duration = ...;
597+
*
598+
* duration.seconds = end.seconds - start.seconds;
599+
* duration.nanos = end.nanos - start.nanos;
600+
*
601+
* if (duration.seconds < 0 && duration.nanos > 0) {
602+
* duration.seconds += 1;
603+
* duration.nanos -= 1000000000;
604+
* } else if (duration.seconds > 0 && duration.nanos < 0) {
605+
* duration.seconds -= 1;
606+
* duration.nanos += 1000000000;
607+
* }
608+
*
609+
* Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
610+
*
611+
* Timestamp start = ...;
612+
* Duration duration = ...;
613+
* Timestamp end = ...;
614+
*
615+
* end.seconds = start.seconds + duration.seconds;
616+
* end.nanos = start.nanos + duration.nanos;
617+
*
618+
* if (end.nanos < 0) {
619+
* end.seconds -= 1;
620+
* end.nanos += 1000000000;
621+
* } else if (end.nanos >= 1000000000) {
622+
* end.seconds += 1;
623+
* end.nanos -= 1000000000;
624+
* }
625+
*
626+
* Example 3: Compute Duration from datetime.timedelta in Python.
627+
*
628+
* td = datetime.timedelta(days=3, minutes=10)
629+
* duration = Duration()
630+
* duration.FromTimedelta(td)
631+
*
632+
* # JSON Mapping
633+
*
634+
* In JSON format, the Duration type is encoded as a string rather than an object,
635+
* where the string ends in the suffix "s" (indicating seconds) and is preceded by
636+
* the number of seconds, with nanoseconds expressed as fractional seconds. For
637+
* example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s",
638+
* while 3 seconds and 1 nanosecond should be expressed in JSON format as
639+
* "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON
640+
* format as "3.000001s".
641+
*/
642+
readinessTimeout?: string;
643+
577644
runsOn?: Shared.RunsOn | null;
578645
}
579646

0 commit comments

Comments
 (0)