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

[TEP-0135] Validate multiple PVC-based Workspaces in TaskRuns #6984

Conversation

QuanZhang-William
Copy link
Member

Prior to this commit, we only validate that 1 PVC is allowed to be binded to a TaskRun in AffinityAssistantPerWorkspace coschedule mode. The validation was skipped when there is no affinity assistant presents in the TaskRun (i.e. in standalone TaskRun or in AffinityAssistantDisabled coschedule mode). This commit adds the missing validation.

This commit also updates workspace related documentation.

/kind bug

Changes

Submitter Checklist

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

  • 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
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/bug Categorizes issue or PR as related to a bug. labels Jul 27, 2023
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign imjasonh after the PR has been reviewed.
You can assign the PR to them by writing /assign @imjasonh in a comment when ready.

The full list of commands accepted by this bot can be found 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 27, 2023
@QuanZhang-William QuanZhang-William changed the title Validate multiple PVC-based Workspaces in TaskRuns [TEP-0135] Validate multiple PVC-based Workspaces in TaskRuns Jul 27, 2023
Prior to this commit, we only validate that 1 `PVC` is allowed to be binded to a `TaskRun`
in `AffinityAssistantPerWorkspace` coschedule mode. The validation was skipped when there is no affinity assistant
presents in the `TaskRun` (i.e. in standalone `TaskRun` or in `AffinityAssistantDisabled` coschedule mode). This commit
adds the missing validation.

This commit also updates workspace related documentation.

/kind bug
@QuanZhang-William QuanZhang-William force-pushed the dont-allow-multiple-pvcs-in-taskrun branch from 8f2e7bd to f863aaf Compare July 27, 2023 15:22
@QuanZhang-William
Copy link
Member Author

/test pull-tekton-pipeline-beta-integration-tests
/test pull-tekton-pipeline-integration-tests

due to timeout

@lbernick lbernick self-assigned this Jul 27, 2023
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.

Previously, with affinity assistant disabled, we let taskrun pods get scheduled by the kube scheduler, and they could non deterministically fail if a taskrun was bound to multiple pvcs, depending on how the pods ended up being scheduled. It sounds like this commit is preventing this from happening at all by rejecting these taskruns when the affinity assistant is disabled? Is this what you intended? I think a validation failure may be the better choice here, although this isn't backwards compatible; curious what others think

@QuanZhang-William
Copy link
Member Author

Previously, with affinity assistant disabled, we let taskrun pods get scheduled by the kube scheduler, and they could non deterministically fail if a taskrun was bound to multiple pvcs, depending on how the pods ended up being scheduled. It sounds like this commit is preventing this from happening at all by rejecting these taskruns when the affinity assistant is disabled? Is this what you intended? I think a validation failure may be the better choice here, although this isn't backwards compatible; curious what others think

Yeah, you are right. I think ideally the validation should fail a standalone TaskRun with multiple PVCs due to potential AZ conflict.

And I missed that prior to TEP-0135, we do allow standalone TaskRun with multiple PVC here, so this change is backward incompatible. Making this change probably needs some discussion across OSS.

I would suggest that we do not merge this PR for now and leave it open to discussion. I will create a separate one just to adding documentation. WDYT?

@QuanZhang-William
Copy link
Member Author

/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 27, 2023
@lbernick
Copy link
Member

I would suggest that we do not merge this PR for now and leave it open to discussion. I will create a separate one just to adding documentation. WDYT?

SGTM!

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2023
@tekton-robot
Copy link
Collaborator

@QuanZhang-William: PR needs rebase.

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.

@jerop
Copy link
Member

jerop commented Sep 20, 2023

@QuanZhang-William are you still working on this?

(cleaning up old pull requests)

@QuanZhang-William
Copy link
Member Author

@jerop. Thanks for the reminder. This PR introduces backward incompatible changes; and we don't have user request to add validation for >1 PVCs binded to a TaskRun. We can close this PR for now.

/close

@tekton-robot
Copy link
Collaborator

@QuanZhang-William: Closed this PR.

In response to this:

@jerop. Thanks for the reminder. This PR introduces backward incompatible changes; and we don't have user request to add validation for >1 PVCs binded to a TaskRun. We can close this PR for now.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/bug Categorizes issue or PR as related to a bug. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesnt merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants