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

Scheduled jobs attemptDeadline default configuration #75

Open
RaymondBibby opened this issue Jan 10, 2025 · 0 comments
Open

Scheduled jobs attemptDeadline default configuration #75

RaymondBibby opened this issue Jan 10, 2025 · 0 comments

Comments

@RaymondBibby
Copy link

For scheduled jobs when there is no attemptDeadline in the GcpConfig the default 3 minutes is applied:

  + resource "google_cloud_scheduler_job" "scheduler-integrations-trustpilot-fetchAndUpdateTpReviewDataInBc" {
      + attempt_deadline = "3m"
      + id               = (known after apply)
      + name             = "integrations-trustpilot-fetchAndUpdateTpReviewDataInBc"
      + paused           = (known after apply)
      + project          = "focusrite-staging"
      + region           = "europe-west2"
      + schedule         = "0 0 * * *"
      + state            = (known after apply)
      + time_zone        = "Etc/UTC"
      + http_target {
          + http_method = "POST"
          + uri         = "https://integrations-trustpilot-fetchandupdatetpreviewdat-6lrdsxsy7q-nw.a.run.app/"
        }
    }

Default attempt_deadline is not defined in seconds however which is required by GCP:

│ Error: Error creating Job: googleapi: Error 400: Invalid value at 'job.attempt_deadline' (type.googleapis.com/google.protobuf.Duration), Field 'attemptDeadline', Illegal duration format; duration must end with 's'
│ Details:
│ [
│   {
│     "@type": "type.googleapis.com/google.rpc.BadRequest",
│     "fieldViolations": [
│       {
│         "description": "Invalid value at 'job.attempt_deadline' (type.googleapis.com/google.protobuf.Duration), Field 'attemptDeadline', Illegal duration format; duration must end with 's'",
│         "field": "job.attempt_deadline"
│       }
│     ]
│   }
│ ]
│ 
│   with google_cloud_scheduler_job.scheduler-integrations-trustpilot-fetchAndUpdateTpReviewDataInBc,
│   on cdk.tf.json line 307, in resource.google_cloud_scheduler_job.scheduler-integrations-trustpilot-fetchAndUpdateTpReviewDataInBc:
│  307:       }
│ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant