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

Create fuzz testing for kubectl apply #26234

Closed
bgrant0607 opened this issue May 25, 2016 · 13 comments
Closed

Create fuzz testing for kubectl apply #26234

bgrant0607 opened this issue May 25, 2016 · 13 comments
Labels
area/app-lifecycle area/declarative-configuration area/kubectl area/test lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/cli Categorizes an issue or PR as relevant to SIG CLI.

Comments

@bgrant0607
Copy link
Member

We discover bugs in kubectl apply on a field-by-field basis: #26229, #23551.

We don't have rigorous testing of the diff and patch code, nor of the API spec itself. There are many known problems, such as lack of ability to distinguish unset fields from Go default values for non-pointer primitive fields.

We should develop a random fuzz tester for kubectl apply.

cc @ghodss @kubernetes/kubectl

@dshulyak
Copy link
Contributor

I would like to help with this bug.

@adohe-zz
Copy link

@dshulyak that would be great. Thanks :)

@dshulyak
Copy link
Contributor

dshulyak commented Jun 7, 2016

@adohe @bgrant0607 Am i right that the goal is to validate k8s objects using schema after applying ThreeWayMergePatch?
If so fuzz tester should be able to:

  1. Generate k8s object (using existing helper)
  2. Generate 2nd version of this object
  3. Create and apply three way merge patch
  4. Validate resulted object using schema, plus additional tests

@bgrant0607
Copy link
Member Author

@dshulyak I think the main challenge is how to determine correctness of the result. That needs more thought before this will be worth doing.

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label May 31, 2017
@0xmichalis
Copy link
Contributor

/sig cli

@k8s-ci-robot k8s-ci-robot added the sig/cli Categorizes an issue or PR as relevant to SIG CLI. label Jun 21, 2017
@k8s-github-robot k8s-github-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jun 21, 2017
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 29, 2017
@bgrant0607
Copy link
Member Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 23, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 14, 2018
@bgrant0607 bgrant0607 added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 14, 2018
@bgrant0607
Copy link
Member Author

cc @apelisse

@apelisse
Copy link
Member

We don't have rigorous testing of the diff and patch code, nor of the API spec itself.
...
We should develop a random fuzz tester for kubectl apply.

I don't necessarily agree that the first statement should lead to the second. I'll keep in mind that we want solid unit-testing for diff/patch. I think "determining correctness" would indeed be an unnecessary challenge.

@sftim
Copy link
Contributor

sftim commented Nov 9, 2023

We have server-side apply now. Is this issue description still right?

@apelisse
Copy link
Member

It's hard to tell for sure. We haven't really created fuzzing, I think we have a much stronger test suite now. We're also not bug-free (obviously), but I think this issue is somewhat irrelevant, let's close it.
/close

@k8s-ci-robot
Copy link
Contributor

@apelisse: Closing this issue.

In response to this:

It's hard to tell for sure. We haven't really created fuzzing, I think we have a much stronger test suite now. We're also not bug-free (obviously), but I think this issue is somewhat irrelevant, let's close it.
/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
area/app-lifecycle area/declarative-configuration area/kubectl area/test lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/cli Categorizes an issue or PR as relevant to SIG CLI.
Projects
Archived in project
Development

No branches or pull requests

10 participants