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

Fix Timeouts Default in v1 PipelienRun #6546

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

JeromeJu
Copy link
Member

@JeromeJu JeromeJu commented Apr 17, 2023

Changes

This commit fixes the SetDefault for v1 pipelinerun.timeouts. Previously it would reset pipelinerun.timeouts fields with only timeouts.pipeline while it should have kept timeouts.tasks and timeouts.finally as expected.

/kind bug
follows: #6311
needed by: #6444
cc @jerop @lbernick

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • [n/a] Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • [n/a] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • [n/a] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

This commit fixes the SetDefault for v1 pipelinerun.timeouts. Previously
it would reset pipelinerun.timeouts fields with only timeouts.pipeline while
it should have kept timeouts.tasks and timeouts.finally as expected.
@tekton-robot tekton-robot added kind/bug Categorizes issue or PR as related to a bug. release-note-none Denotes a PR that doesnt merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 17, 2023
@tekton-robot
Copy link
Collaborator

@JeromeJu: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-tekton-pipeline-alpha-integration-tests
  • /test pull-tekton-pipeline-beta-integration-tests
  • /test pull-tekton-pipeline-build-tests
  • /test pull-tekton-pipeline-integration-tests
  • /test tekton-pipeline-unit-tests

The following commands are available to trigger optional jobs:

  • /test pull-tekton-pipeline-go-coverage

Use /test all to run all jobs.

In response to this:

/test check-pr-has-kind-label

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@lbernick lbernick left a comment

Choose a reason for hiding this comment

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

thanks Jerome, nice catch! I think we don't have the same bug in v1beta1, but we should add test coverage for it since I don't see any here: https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1beta1/pipelinerun_defaults_test.go

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lbernick

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 17, 2023
@JeromeJu
Copy link
Member Author

thanks Jerome, nice catch! I think we don't have the same bug in v1beta1, but we should add test coverage for it since I don't see any here: https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1beta1/pipelinerun_defaults_test.go

Great point. thanks, I added in the follow up PR #6548 for test coverage increase.

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 17, 2023
@vdemeester
Copy link
Member

@JeromeJu @jerop @lbernick This probably need to get backported to 0.44.x right ?

@JeromeJu
Copy link
Member Author

JeromeJu commented Apr 17, 2023

@JeromeJu @jerop @lbernick This probably need to get backported to 0.44.x right ?

Thanks @vdemeester yes indeed

Just to double check, we should backport it to v0.44.x and v0.46.x.

@tekton-robot tekton-robot merged commit bd7a02f into tektoncd:main Apr 17, 2023
@JeromeJu
Copy link
Member Author

/cherry-pick release-v0.44.x

@tekton-robot
Copy link
Collaborator

@JeromeJu: #6546 failed to apply on top of branch "release-v0.44.x":

Applying: Fix Timeouts Default in v1 PipelienRun
Using index info to reconstruct a base tree...
M	pkg/apis/pipeline/v1/pipelinerun_defaults.go
M	pkg/apis/pipeline/v1/pipelinerun_defaults_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/apis/pipeline/v1/pipelinerun_defaults_test.go
CONFLICT (content): Merge conflict in pkg/apis/pipeline/v1/pipelinerun_defaults_test.go
Auto-merging pkg/apis/pipeline/v1/pipelinerun_defaults.go
CONFLICT (content): Merge conflict in pkg/apis/pipeline/v1/pipelinerun_defaults.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix Timeouts Default in v1 PipelienRun
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-v0.44.x

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@JeromeJu
Copy link
Member Author

could we help to make this into a milestone? Thanks:) 🙏

@vdemeester
Copy link
Member

@JeromeJu ah we need to make a "manual" cherry-pick 😅

@JeromeJu
Copy link
Member Author

@JeromeJu ah we need to make a "manual" cherry-pick 😅

Yeah thanks @vdemeester tried that but not very sure how to get permission pushing this through as tekton-bot does?

ERROR: Permission to tektoncd/pipeline.git denied to JeromeJu.
fatal: Could not read from remote repository.

Saw the above when trying to push through the manual cherry-pick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants