Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timeoutSeconds to cloud run #3622

Merged

Conversation

sergeylanzman
Copy link
Contributor

@sergeylanzman sergeylanzman commented Jun 10, 2020

Fixes hashicorp/terraform-provider-google#5924

Release Note Template for Downstream PRs (will be copied)

cloudrun: added `template.spec.timeout_seconds` to `google_cloud_run_service`

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@danawillow, please review this PR or find an appropriate assignee.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 45 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 3 files changed, 45 insertions(+), 4 deletions(-))
TF Conversion: Diff ( 1 file changed, 11 insertions(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=119260"

- !ruby/object:Api::Type::Integer
name: timeoutSeconds
description: |-
TimeoutSeconds holds the max duration the instance is allowed for responding to a request. Not currently used by Cloud Run.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the sentence "Not currently used by Cloud Run." is more confusing than helpful in this context, and should probably be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, it's totally fine to modify descriptions for TF docs so that they make more sense. Using the ones from the GCP docs is just handy as a starting point.

@@ -152,6 +152,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides
default_from_api: true
spec.template.spec.containerConcurrency: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
spec.template.spec.timeoutSeconds: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the default a known value, or might it change depending on how a user configures their service? If we know what it's going to be, it makes more sense to hardcode the default (https://github.com/terraform-providers/terraform-provider-google/wiki/Developer-Best-Practices#default-values)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's depends for fully managed or Cloud Run for Anthos.
From documentations https://cloud.google.com/run/docs/configuring/request-timeout#command-line it's 5 minutes for fully managed(but I think it's 15 minutes from my last test).
I think better use default from API, because it's related to user billing because fully managed cloud run users pay for time of request.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, thanks for the explanation!

@@ -56,6 +56,7 @@ resource "google_cloud_run_service" "default" {
args = ["arrgs"]
}
container_concurrency = %s
timeoutSeconds = %s
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
timeoutSeconds = %s
timeout_seconds = %s

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@sergeylanzman sergeylanzman force-pushed the cloud-run-add-timeout branch from caaefde to a82de46 Compare June 11, 2020 00:09
@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@danawillow, please review this PR or find an appropriate assignee.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 45 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 3 files changed, 45 insertions(+), 4 deletions(-))
TF Conversion: Diff ( 1 file changed, 11 insertions(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=119371"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cloud Run service template spec field timeoutSeconds missing
4 participants