pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

Fix Existing Requests and Limits with LimitRange

Open austinzhao-go opened this issue 3 years ago • 20 comments

Changes

This PR is to update limitrange logic to ensure container's requests and limits under the min and max range which is configured by limitrange.

/kind bug

Submitter Checklist

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

  • [x] Has Docs included if any changes are user facing
  • [x] Has Tests included if any functionality added or changed
  • [x] Follows the commit message standard
  • [x] Meets the Tekton contributor standards (including functionality, content, code)
  • [x] 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
  • [x] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • [x] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Fixed Existing Requests and Limits with LimitRange

austinzhao-go avatar Aug 03 '22 19:08 austinzhao-go

/hold

till https://github.com/tektoncd/pipeline/pull/5082 is merged

austinzhao-go avatar Aug 03 '22 19:08 austinzhao-go

The following is the coverage report on the affected files. Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/internal/computeresources/tasklevel/tasklevel.go Do not exist 100.0%
pkg/internal/computeresources/transformer.go 91.9% 92.5% 0.6
pkg/pod/pod.go 88.8% 88.2% -0.6

tekton-robot avatar Aug 03 '22 19:08 tekton-robot

/release-note-none

austinzhao-go avatar Aug 05 '22 14:08 austinzhao-go

/kind feature

austinzhao-go avatar Aug 05 '22 14:08 austinzhao-go

The following is the coverage report on the affected files. Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/internal/computeresources/tasklevel/tasklevel.go Do not exist 100.0%
pkg/internal/computeresources/transformer.go 91.9% 92.3% 0.4
pkg/pod/pod.go 88.8% 88.2% -0.6

tekton-robot avatar Aug 05 '22 14:08 tekton-robot

The following is the coverage report on the affected files. Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/internal/computeresources/tasklevel/tasklevel.go Do not exist 100.0%
pkg/internal/computeresources/transformer.go 91.9% 92.3% 0.4
pkg/pod/pod.go 88.8% 88.2% -0.6

tekton-robot avatar Aug 05 '22 16:08 tekton-robot

/unhold

austinzhao-go avatar Aug 05 '22 16:08 austinzhao-go

The following is the coverage report on the affected files. Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/internal/computeresources/transformer.go 91.9% 92.3% 0.4

tekton-robot avatar Aug 05 '22 16:08 tekton-robot

/hold

till https://github.com/tektoncd/pipeline/pull/5279 got merged

austinzhao-go avatar Aug 05 '22 20:08 austinzhao-go

Could you please remove the TEP title from the commit message + PR description? since this is an unrelated bug fix.

lbernick avatar Aug 08 '22 14:08 lbernick

Fixes #5278 Please also add a release note!

lbernick avatar Aug 08 '22 15:08 lbernick

The following is the coverage report on the affected files. Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/internal/computeresources/transformer.go 91.9% 92.3% 0.4

tekton-robot avatar Aug 09 '22 14:08 tekton-robot

/retest

austinzhao-go avatar Aug 09 '22 14:08 austinzhao-go

/hold cancel

lbernick avatar Aug 09 '22 19:08 lbernick

The following is the coverage report on the affected files. Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/internal/computeresources/transformer.go 91.9% 93.0% 1.1

tekton-robot avatar Aug 09 '22 19:08 tekton-robot

/approve

abayer avatar Aug 10 '22 14:08 abayer

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abayer

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 avatar Aug 10 '22 14:08 tekton-robot

thanks @abayer for the review!

pushed an update to ensure requests got "capped" by limits finally

austinzhao-go avatar Aug 10 '22 18:08 austinzhao-go

The following is the coverage report on the affected files. Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/internal/computeresources/transformer.go 91.9% 93.5% 1.6

tekton-robot avatar Aug 10 '22 18:08 tekton-robot

/retest

austinzhao-go avatar Aug 11 '22 13:08 austinzhao-go

/hold

till collecting further feedback from community

austinzhao-go avatar Aug 12 '22 15:08 austinzhao-go

The following is the coverage report on the affected files. Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/internal/computeresources/transformer.go 91.9% 94.1% 2.2

tekton-robot avatar Aug 16 '22 14:08 tekton-robot

@austinzhao-go: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-tekton-pipeline-integration-tests 580012bef9150fa8816e4edb1c98cc2ce1c57be5 link true /test pull-tekton-pipeline-integration-tests

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

tekton-robot avatar Aug 16 '22 14:08 tekton-robot

closed the PR for this moment after a check with @lbernick

the expected fix will be updated in another PR.

austinzhao-go avatar Aug 19 '22 19:08 austinzhao-go