-
Notifications
You must be signed in to change notification settings - Fork 149
Update guide on how to write a composition function in Go after v2 updates #1045
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
Conversation
✅ Deploy Preview for crossplane ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Jonasz Łasut-Balcerzak <jonasz.lasut@gmail.com>
c956fdf to
51b9796
Compare
jbw976
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this @jonasz-lasut!! it will be great to have this guide working again since moving to v2 😇
| "k8s.io/utils/ptr" | ||
|
|
||
| "github.com/crossplane-contrib/provider-upjet-aws/apis/s3/v1beta1" | ||
| "github.com/upbound/provider-aws/v2/apis/namespaced/s3/v1beta1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah interesting, i was hoping that we'd still be able to use the github repo path (github.com/crossplane-contrib/provider-upjet-aws, not the module path (github.com/upbound/provider-aws), but that doesn't appear to be possible:
❯ go get github.com/crossplane-contrib/provider-upjet-aws/v2@v2.3.0
go: downloading github.com/crossplane-contrib/provider-upjet-aws/v2 v2.3.0
go: github.com/crossplane-contrib/provider-upjet-aws/v2@v2.3.0 requires go >= 1.24.10; switching to go1.24.12
go: github.com/crossplane-contrib/provider-upjet-aws/v2@v2.3.0 requires github.com/crossplane-contrib/provider-upjet-aws/v2@v2.3.0: parsing go.mod:
module declares its path as: github.com/upbound/provider-aws/v2
but was required as: github.com/crossplane-contrib/provider-upjet-aws/v2
probably the same error you hit 😂
OK if we need to use the go module path, then that is reasonable!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly the same error 😅 We could handle that with go mod -replace ... but I didn't think it's worth to introduce that as it makes the guide less clear only for sake of keeping the crossplane-contrib in the module name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep agreed! and API groups / module names are permitted to stay as their original source before donation to crossplane-contrib as per governance, so all good!
https://github.com/crossplane/crossplane/blob/main/GOVERNANCE.md#policies-for-community-extension-projects

Fixes #1003
Updated go get instruction for AWS Provider Go module and fixed import paths that were leading to function not compiling and not passing tests.
github.com/upbound/provider-aws/v2 import has to use at least version
v2.3.0as it's the first version with the correct module path