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

Update cluster-api e2e test package import in e2e tests #2467

Closed
sedefsavas opened this issue Jun 3, 2021 · 6 comments · Fixed by #2485
Closed

Update cluster-api e2e test package import in e2e tests #2467

sedefsavas opened this issue Jun 3, 2021 · 6 comments · Fixed by #2485
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor.
Milestone

Comments

@sedefsavas
Copy link
Contributor

sedefsavas commented Jun 3, 2021

Core cluster-api introduced a new module for test package. We should be importing that to use cluster-api e2e methods.

We should be updating cluster-api version to include this change: kubernetes-sigs/cluster-api#4713

⚠️ Go Module changes ⚠️

  • The test folder now ships with its own Go module sigs.k8s.io/cluster-api/test.
  • The module is going to be tagged and versioned as part of the release.
  • Folks importing the test e2e framework or the docker infrastructure provider need to import the new module.
    • When imported, the test module version should always match the Cluster API one.

/good-first-issue
/milestone v0.7.0
/help

@k8s-ci-robot
Copy link
Contributor

@sedefsavas:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

Core cluster-api introduced a new module for test package. We should be importing that to use cluster-api e2e methods.

We should be updating cluster-api version to include this change: kubernetes-sigs/cluster-api#4713

⚠️ Go Module changes ⚠️

  • The test folder now ships with its own Go module sigs.k8s.io/cluster-api/test.
  • The module is going to be tagged and versioned as part of the release.
  • Folks importing the test e2e framework or the docker infrastructure provider need to import the new module.
  • When imported, the test module version should always match the Cluster API one.

/good-first-issue
/milestone v0.7.0
/help

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 this to the v0.7.0 milestone Jun 3, 2021
@k8s-ci-robot k8s-ci-robot added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Jun 3, 2021
@CecileRobertMichon
Copy link

@sedefsavas FYI I'm running into issues doing this in CAPZ

I have

	sigs.k8s.io/cluster-api v0.0.0-20210607195256-55f064d1b9fc
	sigs.k8s.io/cluster-api/test v0.0.0-20210607195256-55f064d1b9fc

getting

go mod tidy
go: sigs.k8s.io/cluster-api/[email protected] requires
	sigs.k8s.io/[email protected]: invalid version: unknown revision 000000000000
make: *** [modules] Error 1

@CecileRobertMichon
Copy link

Adding

replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v0.0.0-20210607195256-55f064d1b9fc

(replace it with your own version of capi) in CAPZ/CAPA go.mod

fixes the issue, which was that the replace was only happening locally https://github.com/kubernetes-sigs/cluster-api/blob/55f064d1b9fcf3f0a7b1a32e43559bdff4d3c2cb/test/go.mod#L5

@shysank
Copy link
Contributor

shysank commented Jun 8, 2021

I was also doing this and tried by removing sigs.k8s.io/cluster-api and only adding sigs.k8s.io/cluster-api/test. . Then,go mod tidy automatically added sigs.k8s.io/cluster-api v0.0.0-00010101000000-000000000000. As @CecileRobertMichon suggested, then had to add the replace block. Looked something like this:

        sigs.k8s.io/cluster-api v0.0.0-00010101000000-000000000000
	sigs.k8s.io/cluster-api/test v0.0.0-20210607195256-55f064d1b9fc
	sigs.k8s.io/controller-runtime v0.9.0-beta.6
	sigs.k8s.io/kind v0.11.1
)

replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v0.0.0-20210607195256-55f064d1b9fc

@CecileRobertMichon
Copy link

@randomvariable
Copy link
Member

/lifecycle active
/assign

@k8s-ci-robot k8s-ci-robot added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants