timeZone support to job by wpjunior · Pull Request #2837 · tsuru/tsuru · GitHub
Skip to content

timeZone support to job - #2837

Open
wpjunior wants to merge 5 commits into
tsuru:mainfrom
wpjunior:feature/job-timezone-support
Open

wpjunior wants to merge 5 commits into
tsuru:mainfrom
wpjunior:feature/job-timezone-support

Conversation

@wpjunior

Copy link
Copy Markdown
Member

No description provided.

@wpjunior
wpjunior marked this pull request as ready for review February 14, 2026 14:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds optional timeZone support to Jobs/CronJobs so schedules can be evaluated in a specific IANA timezone and propagated through the API, persistence layer, and Kubernetes provisioner.

Changes:

  • Introduces timeZone in JobSpec and API input/output models.
  • Validates timeZone values server-side using time.LoadLocation.
  • Sets Kubernetes CronJobSpec.TimeZone and expands test coverage + API reference docs.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
types/job/job.go Adds TimeZone field to JobSpec.
types/job/error.go Introduces ErrInvalidTimeZone for validation failures.
job/job.go Validates timeZone via time.LoadLocation.
provision/kubernetes/job.go Propagates job.Spec.TimeZone into CronJobSpec.TimeZone.
provision/kubernetes/job_test.go Adds CronJob provisioning test case covering timezone propagation.
job/job_test.go Adds create/update validation tests for timezone.
api/job.go Adds timeZone to create/update request handling.
api/job_test.go Updates API tests to include timeZone in create/update flows.
docs/reference/api.yaml Documents timeZone in Job and InputJob schemas.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread job/job.go Outdated
Comment thread docs/reference/api.yaml
Comment thread docs/reference/api.yaml
Comment thread job/job_test.go Outdated
wpjunior and others added 2 commits February 20, 2026 14:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

2 participants