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

Add behavior <-> conformance test linkage example for pods #89716

Merged
merged 2 commits into from May 27, 2020

Conversation

Jefftree
Copy link
Member

@Jefftree Jefftree commented Apr 1, 2020

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Link two conformance tests to corresponding pod spec behaviors.

There are more conformance tests in the e2e/common/pods.go file, but I don't think they belong in the pod spec section.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 1, 2020
@k8s-ci-robot k8s-ci-robot added area/conformance Issues or PRs related to kubernetes conformance tests area/test sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 1, 2020
@spiffxp
Copy link
Member

spiffxp commented Apr 1, 2020

/cc

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Apr 1, 2020
@Jefftree
Copy link
Member Author

Jefftree commented Apr 1, 2020

/assign @johnbelamaric
/assign @spiffxp

@spiffxp
Copy link
Member

spiffxp commented Apr 8, 2020

/override pull-kubernetes-node-e2e-containerd
ref: #89847

@k8s-ci-robot
Copy link
Contributor

@spiffxp: Overrode contexts on behalf of spiffxp: pull-kubernetes-node-e2e-containerd

In response to this:

/override pull-kubernetes-node-e2e-containerd
ref: #89847

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.

description: When hostIPC is set to false, the Pod MUST NOT use the host's inter-process
communication namespace.
- id: pod/spec/basic-update
decription: Create a Pod with a unique label. Query for the Pod with the label as selector MUST be successful. Update the pod to change the value of the Label. Query for the Pod with the new value for the label MUST be successful.
Copy link
Member

Choose a reason for hiding this comment

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

This isn't a useful behavior description. It should be much smaller in scope. In fact this is represents several behaviors: creating a pod with a label, querying by label, and changing a label. Those all fall into "basic machinery" of the API server. As I recall we need to have a discussion with sig api-machinery about a way to generically test these behaviors across all resources. This would apply to anything utilizing only metadata.

For this particular test, which already exists, we can add those few behaviors. Something like:

  • When creating a Pod you MUST be able to set a label, and querying using Pods using a namespace and label selector for that label MUST return all Pods with that label in that namespace and no other Pods. [ yes this is in fact multiple behaviors but so tightly bound I am ok with it being one ]
  • A patch request MUST be able to update a label on a Pod. Querying for the Pod with the new label in that namespace and no other Pods.

I do not think a "basic-update" is a useful behavior, at least not for podspec which has very few mutable fields. Instead, we should identify the specific fields that are mutable within a podspec, and create behaviors describing what happens when you mutate those fields. So, for example, tolerations on a pod are mutable. We should have behaviors describing how taints & tolerations work - there are some conformance tests around that already. The behaviors should capture the expression of the change, not just that it happened in the API. That is, it should capture the data plane changes.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure on patch vs put here. Are they both possible? do they both behave the same way?

Copy link
Member

Choose a reason for hiding this comment

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

I don't have an opinion on patch vs put.

For the initial load of behaviours, I'd like to get a list through that we can start soon rather that wait for every.

Copy link
Member Author

Choose a reason for hiding this comment

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

I do agree that the basic update behavior isn't useful since it applies to the "basic machinery". For now though, I'd like to avoid changing the tests when we're in the process of just porting over the behaviors to the new linkage machinery.

I divided this into two behaviors, but I agree this test will need to be revisited in the future.

- id: pod/spec/basic-update
decription: Create a Pod with a unique label. Query for the Pod with the label as selector MUST be successful. Update the pod to change the value of the Label. Query for the Pod with the new value for the label MUST be successful.
- id: pod/spec/container/resources
description: Create a Pod with CPU and Memory request and limits. Pod status MUST have QOSClass set to PodQOSGuaranteed.
Copy link
Member

Choose a reason for hiding this comment

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

Ok, but does the test cover any of the specific logic around scheduling, eviction, etc. for guaranteed pods? If so we need behaviors for all of those. If not that's OK I suppose; those will show up later in sig-scheduling behaviors.

Copy link
Member Author

Choose a reason for hiding this comment

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

This only checks for the corresponding status tags. I think the logic you mentioned should be deferred to sig-scheduling.

@johnbelamaric
Copy link
Member

/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 8, 2020
@hh
Copy link
Member

hh commented May 5, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 5, 2020
@derekwaynecarr
Copy link
Member

@johnbelamaric do you still desire edits?

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 19, 2020
@johnbelamaric
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 21, 2020
@spiffxp
Copy link
Member

spiffxp commented May 26, 2020

/approve

@spiffxp
Copy link
Member

spiffxp commented May 26, 2020

/test pull-kubernetes-e2e-gce

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jefftree, johnbelamaric, spiffxp

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2020
@Jefftree
Copy link
Member Author

/retest

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented May 27, 2020

@Jefftree: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-node-e2e-containerd c4bd15b2c0f33ffb36e0513b65eb27a23f4ece1c link /test pull-kubernetes-node-e2e-containerd

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit 65c0a1e into kubernetes:master May 27, 2020
conformance-definition automation moved this from PRs Needing Review to Done May 27, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone May 27, 2020
@Jefftree Jefftree deleted the bdd-initial-link branch December 7, 2021 17:25
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. area/conformance Issues or PRs related to kubernetes conformance tests area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

7 participants