Skip to content

update Go module to contain /v2 - #1928

Merged
erhancagirici merged 2 commits into
crossplane-contrib:mainfrom
erhancagirici:v2-module
Dec 1, 2025
Merged

update Go module to contain /v2#1928
erhancagirici merged 2 commits into
crossplane-contrib:mainfrom
erhancagirici:v2-module

Conversation

@erhancagirici

@erhancagirici erhancagirici commented Nov 26, 2025

Copy link
Copy Markdown
Collaborator

Description of your changes

This PR allows importing the provider as a go module when requiring with v2.x.x semantic version tags.
This was only possible with workaround using go mod -replace and pseudo-versions.

require (
     github.com/upbound/provider-aws/v2 v2.x.y
     ...
)

or

go get github.com/upbound/provider-aws/v2@v2.x.y
  • Update Go module path declaration in go.mod to contain /v2
  • Update import paths in .go files with new module path reference
  • Update PROJECT_REPO to contain /v2 in Makefile, because it also sets the module path prefixes in make targets, used for package discovery for unit tests etc.

Fixes #1865

I have:

  • Read and followed Crossplane's contribution process.
  • Run make generate and committed the results (ideally in a separate commit).
  • Not made any manual changes to generated files, and verified this with make check-diff.

How has this code been tested

CI and Uptest
Uptest-examples/ec2/cluster/v1beta1/vpc.yaml
Uptest-examples/s3/cluster/v1beta2/bucket.yaml
Uptest-examples/ec2/namespaced/v1beta1/vpc.yaml

@erhancagirici erhancagirici changed the title V2 module update Go module to contain /v2 Nov 26, 2025
@erhancagirici

Copy link
Copy Markdown
Collaborator Author

/test-examples="examples/ec2/cluster/v1beta1/vpc.yaml"

@erhancagirici

Copy link
Copy Markdown
Collaborator Author

/test-examples="examples/s3/cluster/v1beta2/bucket.yaml"

@erhancagirici

Copy link
Copy Markdown
Collaborator Author

/test-examples="examples/ec2/namespaced/v1beta1/vpc.yaml"

@sergenyalcin sergenyalcin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @erhancagirici LGTM!

Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
@erhancagirici

Copy link
Copy Markdown
Collaborator Author

/test-examples="examples/ec2/cluster/v1beta1/vpc.yaml"

@erhancagirici

Copy link
Copy Markdown
Collaborator Author

/test-examples="examples/s3/cluster/v1beta2/bucket.yaml"

@erhancagirici

Copy link
Copy Markdown
Collaborator Author

Note: The local-deploy job is failing due to no space left on device error. It is passing locally, and all the uptest runs also passed (those cover the local-deploy test), along with other CI jobs.

@erhancagirici
erhancagirici merged commit ccfffa5 into crossplane-contrib:main Dec 1, 2025
21 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Module for v2 should include v2

2 participants