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

Move api/filesys to kyaml/filesys #3997

Merged
merged 5 commits into from
Jun 16, 2021

Conversation

campoy
Copy link
Contributor

@campoy campoy commented Jun 15, 2021

Updates #3873

This PR moves all of the code in api/filesys to kyaml/filesys and updates all known dependencies to use the new package.

Instead of simply removing api/filesys, I kept a deprecated package (not the Deprecated: comment) so users can migrate at their pace.

@k8s-ci-robot
Copy link
Contributor

@campoy: This PR has multiple commits, and the default merge method is: merge.
You can request commits to be squashed using the label: tide/merge-method-squash

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 15, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @campoy. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 15, 2021
@campoy campoy changed the title Filesys move Move api/filesys to kyaml/filesys Jun 15, 2021
@campoy
Copy link
Contributor Author

campoy commented Jun 15, 2021

I just moved code from one package to another so I am afraid the tests breaking were breaking previously too for Windows.

@natasha41575
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 15, 2021
@natasha41575
Copy link
Contributor

I just moved code from one package to another so I am afraid the tests breaking were breaking previously too for Windows.

As a workaround, can we add // +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris to the top of filesys_test.go and util_test.go (and any other test files that are failing the windows check)?

@natasha41575 natasha41575 added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jun 15, 2021
@campoy
Copy link
Contributor Author

campoy commented Jun 15, 2021

How about I just add something to skip windows?
So basically, // +build !windows?

@natasha41575
Copy link
Contributor

How about I just add something to skip windows?
So basically, // +build !windows?

Sounds good to me! Thanks

@KnVerey
Copy link
Contributor

KnVerey commented Jun 15, 2021

I just moved code from one package to another so I am afraid the tests breaking were breaking previously too for Windows.

I agree this should not cause any new failures, and this is really strange. But master wasn't failing before, so how is this possible? Any ideas @natasha41575 ? Is there some other exclusion mechanism being used to skip the tests in their previous location?

@natasha41575
Copy link
Contributor

natasha41575 commented Jun 15, 2021

I agree this should not cause any new failures, and this is really strange. But master wasn't failing before, so how is this possible? Any ideas @natasha41575 ? Is there some other exclusion mechanism being used to skip the tests in their previous location?

The windows check doesn't run all the tests for api, but does for kyaml. If you look at the check, it has jobs "Test kyaml" and "Test cmd/config", but no "Test api" which is odd. I'm not sure who set up these tests or if this is intentional.

@campoy
Copy link
Contributor Author

campoy commented Jun 16, 2021

I'm adding a test that will necessarily fail on api/filesys to see whether this was being tested at all.

@campoy
Copy link
Contributor Author

campoy commented Jun 16, 2021

This actually confirms that the "Go / Test Windows" precheck doesn't check 'api/filesys'

@natasha41575
Copy link
Contributor

/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 Jun 16, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: campoy, natasha41575

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 Jun 16, 2021
@k8s-ci-robot k8s-ci-robot merged commit 7fae7d1 into kubernetes-sigs:master Jun 16, 2021

// +build !windows

package filesys
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the change to not have a separate test package here and in a few other files?

Copy link
Contributor

Choose a reason for hiding this comment

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

I had the same question but (maybe incorrectly) assumed that it didn't matter. Was there a motivation for having them separate?

Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I'm aware, the main reason for separate test packages is to force the tests to be written against the public API, i.e. test from the perspective of the consumers of the package. I can't speak to whether that was the reason for the separate package in this case. Since this PR is just moving code from one place to another, I think it's fair to ask for an explanation of for any actual changes that were included. :)

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants