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 CLI script for listing untested conformance behaviors #89393

Merged
merged 2 commits into from Mar 26, 2020

Conversation

Jefftree
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add CLI script for listing conformance behaviors that have not been covered by tests.

Usage: go run test/conformance/kubetestlink/kubetestlink.go

Since we don't have the full list of behaviors yet I'm still not sure about all the features we want to include with this CLI utility.

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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. 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/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 Mar 24, 2020
@Jefftree Jefftree marked this pull request as ready for review March 24, 2020 00:57
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 24, 2020
@Jefftree
Copy link
Member Author

/assign @johnbelamaric

@@ -63,23 +65,6 @@ type frame struct {
Line int
}

type conformanceData struct {
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 moved this to a separate library to avoid duplication

@johnbelamaric
Copy link
Member

Thanks @Jefftree. A couple thoughts come to mind:

  1. Rather than another CLI utility, let's rework kubetestgen to be a tool for managing the conformance tests and behaviors. So, combine this and kubetestgen into something like kubeconform. Let's give some thought to the different functions we might need there and perhaps update the behaviors KEP to define the new functions.

  2. If we base this on reading conformance.yaml, then we need to keep generating that file. It is a source of conflicts, as we have discussed before. Is it possible to instead use the same code that generates conformance.yaml to navigate the tests directly and get the lists of behaviors?

Along these lines, we need to update the KEP to reflect our desired end state better. That is, we want tooling that eliminates the need for conformance.yaml, and that measures conformance by whether the behaviors have been tested successfully. We want that ideally to come out of the active tests logs, so that it is clear from those logs that that the tests that hit a behavior have run, and have run successfully. This will provide the basis for the profiles work.

@Jefftree
Copy link
Member Author

  1. Rather than another CLI utility, let's rework kubetestgen to be a tool for managing the conformance tests and behaviors. So, combine this and kubetestgen into something like kubeconform. Let's give some thought to the different functions we might need there and perhaps update the behaviors KEP to define the new functions.

Sure, will make the change. I'd prefer committing smaller pieces and adding more functionality as we need them, so updating the KEP is definitely helpful.

  1. If we base this on reading conformance.yaml, then we need to keep generating that file. It is a source of conflicts, as we have discussed before. Is it possible to instead use the same code that generates conformance.yaml to navigate the tests directly and get the lists of behaviors?

conformance.yaml is a snapshot of the state of conformance behaviors at a point in time. This generating list of behaviors <> test linkage is not committed, I'm not sure how we'd be in a state of conflict? In addition, we have a blocking CI job to ensure that the YAML file is up to date.
I agree that the long term goal is to eventually remove conformance.yaml but at the moment it's a fairly crucial file. I'm open to using the tooling to generate conformance.yaml in kubeconform as we progress, but in the current state I feel that using the YAML file is simpler, quicker to run, and less error prone.

@johnbelamaric
Copy link
Member

I am ok with using conformance.yaml for now.

@johnbelamaric
Copy link
Member

Oh, and I meant that in general it's a single file everyone has to regenerate when they promote tests, so it creates conflicts in PRs, not that it conflicts with this code.

@Jefftree Jefftree force-pushed the bdd-linkage branch 4 times, most recently from 892fed9 to 0230c25 Compare March 25, 2020 21:36
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 25, 2020
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 25, 2020
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 25, 2020
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Mar 25, 2020

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

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce-csi-serial 0230c25fee9bb84567f94443c2dadae2653c8368 link /test pull-kubernetes-e2e-gce-csi-serial
pull-kubernetes-e2e-gce-storage-slow 0230c25fee9bb84567f94443c2dadae2653c8368 link /test pull-kubernetes-e2e-gce-storage-slow
pull-kubernetes-e2e-azure-disk-vmss 0230c25fee9bb84567f94443c2dadae2653c8368 link /test pull-kubernetes-e2e-azure-disk-vmss
pull-kubernetes-e2e-azure-file-windows 0230c25fee9bb84567f94443c2dadae2653c8368 link /test pull-kubernetes-e2e-azure-file-windows
pull-kubernetes-e2e-azure-file 0230c25fee9bb84567f94443c2dadae2653c8368 link /test pull-kubernetes-e2e-azure-file
pull-kubernetes-e2e-gce-storage-snapshot 0230c25fee9bb84567f94443c2dadae2653c8368 link /test pull-kubernetes-e2e-gce-storage-snapshot
pull-kubernetes-e2e-azure-disk 0230c25fee9bb84567f94443c2dadae2653c8368 link /test pull-kubernetes-e2e-azure-disk
pull-kubernetes-e2e-aks-engine-azure 0230c25fee9bb84567f94443c2dadae2653c8368 link /test pull-kubernetes-e2e-aks-engine-azure
pull-kubernetes-e2e-azure-disk-windows 0230c25fee9bb84567f94443c2dadae2653c8368 link /test pull-kubernetes-e2e-azure-disk-windows

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.

@Jefftree
Copy link
Member Author

/retest

@johnbelamaric
Copy link
Member

Awesome, thanks. As we define the full set of commands for kubeconform we'll probably want to move this to use the same flag processing and other structure of existing kube CLI tools.

/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 Mar 26, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Mar 26, 2020
@k8s-ci-robot k8s-ci-robot merged commit 0dd3753 into kubernetes:master Mar 26, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Mar 26, 2020
@Jefftree Jefftree deleted the bdd-linkage 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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. 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/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants