Skip to content

Commit 34f5e1d

Browse files
committed
rename timeoutDestroySeconds → destroyTimeoutSeconds, --timeout → --destroy-timeout-seconds
1 parent 026cc64 commit 34f5e1d

7 files changed

Lines changed: 30 additions & 30 deletions

File tree

cmd/deploy.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ func addServiceFlags(cmd *cobra.Command) {
5959
if f.Lookup("buildpack") == nil {
6060
f.String("buildpack", "railpack", "Build strategy: railpack, dockerfile, static")
6161
}
62-
if f.Lookup("timeout") == nil {
63-
f.Int("timeout", 0, "Auto-destroy after N seconds from deploy completion (0=persistent, max 86400)")
62+
if f.Lookup("destroy-timeout-seconds") == nil {
63+
f.Int("destroy-timeout-seconds", 0, "Auto-destroy after N seconds from deploy completion (0=persistent, max 86400)")
6464
}
6565
}
6666

@@ -203,9 +203,9 @@ func runCreate(cmd *cobra.Command, client graphql.Client, name string) {
203203
region, _ := cmd.Flags().GetString("region")
204204
input.Regions = []string{region}
205205
}
206-
if cmd.Flags().Changed("timeout") {
207-
v, _ := cmd.Flags().GetInt("timeout")
208-
input.TimeoutDestroySeconds = &v
206+
if cmd.Flags().Changed("destroy-timeout-seconds") {
207+
v, _ := cmd.Flags().GetInt("destroy-timeout-seconds")
208+
input.DestroyTimeoutSeconds = &v
209209
}
210210

211211
input.EnvVars = collectEnvVars(cmd)
@@ -291,9 +291,9 @@ func runUpdate(cmd *cobra.Command, client graphql.Client, name string) {
291291
v, _ := cmd.Flags().GetInt("port")
292292
input.Ports = singlePublicHTTPPort(v)
293293
}
294-
if cmd.Flags().Changed("timeout") {
295-
v, _ := cmd.Flags().GetInt("timeout")
296-
input.TimeoutDestroySeconds = &v
294+
if cmd.Flags().Changed("destroy-timeout-seconds") {
295+
v, _ := cmd.Flags().GetInt("destroy-timeout-seconds")
296+
input.DestroyTimeoutSeconds = &v
297297
}
298298

299299
input.EnvVars = collectEnvVars(cmd)

cmd/service_inspect.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ func renderServiceDetail(svc *gql.FindServiceServiceListServiceConnectionNodesSe
232232
}
233233
d.kv("Memory", svc.Memory)
234234
d.kv("vCPU", svc.Vcpus)
235-
if svc.TimeoutDestroySeconds > 0 {
236-
d.kv("Auto-destroy", fmt.Sprintf("%ds after deploy", svc.TimeoutDestroySeconds))
235+
if svc.DestroyTimeoutSeconds > 0 {
236+
d.kv("Auto-destroy", fmt.Sprintf("%ds after deploy", svc.DestroyTimeoutSeconds))
237237
}
238238
if svc.CustomDomain != nil {
239239
status := ""

internal/gql/generated.go

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/gql/operations.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ query FindService($ws: String) {
5656
internalEndpoint
5757
publicEndpoint
5858
}
59-
timeoutDestroySeconds
59+
destroyTimeoutSeconds
6060
envVars { key value }
6161
projectId
6262
project { slug }

pkg/ink/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const serviceGetQuery = `query($id: ID!) {
2929
ports { name port protocol visibility internalEndpoint publicEndpoint }
3030
gitProvider commitHash memory vcpus customDomain customDomainStatus
3131
buildPack buildCommand startCommand publishDirectory rootDirectory dockerfilePath
32-
timeoutDestroySeconds createdAt updatedAt
32+
destroyTimeoutSeconds createdAt updatedAt
3333
}
3434
}`
3535

@@ -41,7 +41,7 @@ const serviceListQuery = `query($ws: String, $proj: String) {
4141
ports { name port protocol visibility internalEndpoint publicEndpoint }
4242
gitProvider commitHash memory vcpus customDomain customDomainStatus
4343
buildPack buildCommand startCommand publishDirectory rootDirectory dockerfilePath
44-
timeoutDestroySeconds createdAt updatedAt
44+
destroyTimeoutSeconds createdAt updatedAt
4545
}
4646
}
4747
}`

pkg/ink/service_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type Service struct {
2626
PublishDirectory string `json:"publishDirectory"`
2727
RootDirectory string `json:"rootDirectory"`
2828
DockerfilePath string `json:"dockerfilePath"`
29-
TimeoutDestroySeconds int `json:"timeoutDestroySeconds"`
29+
DestroyTimeoutSeconds int `json:"destroyTimeoutSeconds"`
3030
CreatedAt string `json:"createdAt"`
3131
UpdatedAt string `json:"updatedAt"`
3232
}
@@ -84,7 +84,7 @@ type CreateServiceInput struct {
8484
RootDirectory string `json:"rootDirectory,omitempty"`
8585
DockerfilePath string `json:"dockerfilePath,omitempty"`
8686
Volumes []VolumeSpec `json:"volumes,omitempty"`
87-
TimeoutDestroySeconds int `json:"timeoutDestroySeconds,omitempty"`
87+
DestroyTimeoutSeconds int `json:"destroyTimeoutSeconds,omitempty"`
8888
}
8989

9090
// CreateServiceResult is the result of creating a service.
@@ -136,7 +136,7 @@ type UpdateServiceInput struct {
136136
RootDirectory *string `json:"rootDirectory,omitempty"`
137137
DockerfilePath *string `json:"dockerfilePath,omitempty"`
138138
Volumes []VolumeSpec `json:"volumes,omitempty"`
139-
TimeoutDestroySeconds *int `json:"timeoutDestroySeconds,omitempty"`
139+
DestroyTimeoutSeconds *int `json:"destroyTimeoutSeconds,omitempty"`
140140
}
141141

142142
// UpdateServiceResult is the result of updating a service.

schema.graphql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ input CreateServiceInput {
737737
"""Persistent volumes to attach."""
738738
volumes: [VolumeInput!]
739739
"""Auto-destroy service after N seconds from deployment completion. 0 or omit for persistent service. Max 86400 (24h)."""
740-
timeoutDestroySeconds: Int
740+
destroyTimeoutSeconds: Int
741741
}
742742

743743
type CreateServiceResult {
@@ -775,7 +775,7 @@ input UpdateServiceInput {
775775
"""Persistent volumes to add."""
776776
volumes: [VolumeInput!]
777777
"""Auto-destroy service after N seconds from deployment completion. 0 for persistent service. Max 86400 (24h)."""
778-
timeoutDestroySeconds: Int
778+
destroyTimeoutSeconds: Int
779779
}
780780

781781
input EnvVarInput {
@@ -854,7 +854,7 @@ type Service {
854854
"""Persistent volumes attached to this service."""
855855
volumes: [VolumeInfo!]!
856856
"""Auto-destroy timeout in seconds. 0 means persistent (no auto-destroy)."""
857-
timeoutDestroySeconds: Int!
857+
destroyTimeoutSeconds: Int!
858858
createdAt: Time!
859859
updatedAt: Time!
860860
}

0 commit comments

Comments
 (0)