Comments (33)
@mikebollandajw thanks for reporting.
This was caused due to a recent change where we started consuming upbound build utilities as a submodule. I'll update the guide accordingly.
In the meantime, you can workaround by running the following once after cloning the repository to your local:
make submodules
from provider-jet-template.
oh good point let me try updating that
from provider-jet-template.
yeah of course! thanks for getting this working for us we are hoping to migrate some of our old terraform over to helm with crossplane so this provider converter to use azuread is a big help
from provider-jet-template.
Raised, thanks! crossplane/terrajet#243
from provider-jet-template.
make submodules
Submodule 'build' (https://github.com/upbound/build) registered for path 'build'
Cloning into '/mnt/c/dev/git/provider-jet-azuread/build'...
Submodule path 'build': checked out 'bd63a4167ae20a71788537217b022fced8f2f854'
make generate
13:47:57 [ .. ] verify dependencies have expected content
go: unknown subcommand "mod"
Run 'go help' for usage.
13:47:57 [FAIL]
build/makelib/golang.mk:217: recipe for target 'go.vendor.lite' failed
make[1]: *** [go.vendor.lite] Error 1
build/makelib/common.mk:418: recipe for target 'generate' failed
make: *** [generate] Error 2
from provider-jet-template.
What do you see with:
go mod tidy
What is your go version?
Please see: https://stackoverflow.com/questions/60410729/unknown-subcommand-mod-error-while-running-go-mod-init
from provider-jet-template.
I would also suggest to get latest template from main, just merged a big change bumping Terrajet to v0.4.0!
from provider-jet-template.
my go version is 1.10.4 from ubuntu 18.04 which is the required version for this?
from provider-jet-template.
We need go 1.17 here
from provider-jet-template.
go mod tidy is using 'crossplane-contrib/*' as its domain path for my provider despite me changing it in the template guide steps
go: finding module for package github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1
github.com/crossplane-contrib/provider-jet-azuread/apis imports
github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1: cannot find module providing package github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1: module github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1: git ls-remote -q origin in /home/mikebolland/go/pkg/mod/cache/vcs/9d596c92663b390be4f17e07a299aec94dbc59b1689b685c82c49c74ac240577: exit status 128:
from provider-jet-template.
i started from scratch with the new template and go 1.17 but it is still the above issues @turkenh
from provider-jet-template.
make submodules
Synchronizing submodule url for 'build'
make generate
17:22:02 [ .. ] verify dependencies have expected content
all modules verified
17:22:10 [ OK ] go modules dependencies verified
17:22:10 [ .. ] installing terraform linux-x86_64
Archive: /mnt/c/dev/git/provider-jet-azuread/.cache/tools/linux_x86_64/tmp-terraform/terraform.zip
inflating: /mnt/c/dev/git/provider-jet-azuread/.cache/tools/linux_x86_64/tmp-terraform/terraform
17:22:14 [ OK ] installing terraform linux-x86_64
17:22:14 [ .. ] generating provider schema for hashicorp/terraform-provider-azuread 2.18.0
Makefile:87: recipe for target 'config/schema.json' failed
make[1]: *** [config/schema.json] Error 1
build/makelib/common.mk:418: recipe for target 'generate' failed
make: *** [generate] Error 2
go mod tidy
go: downloading github.com/crossplane/crossplane-runtime v0.15.1-0.20220106140106-428b7c390375
go: downloading github.com/crossplane/terrajet v0.4.0
go: downloading k8s.io/apimachinery v0.23.0
go: downloading sigs.k8s.io/controller-runtime v0.11.0
go: downloading k8s.io/client-go v0.23.0
go: downloading sigs.k8s.io/controller-tools v0.8.0
go: downloading github.com/evanphx/json-patch v4.12.0+incompatible
go: downloading github.com/onsi/ginkgo v1.16.5
go: downloading github.com/onsi/gomega v1.17.0
go: downloading k8s.io/api v0.23.0
go: downloading k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
go: downloading github.com/go-logr/logr v1.2.0
go: downloading github.com/spf13/afero v1.8.0
go: downloading github.com/go-logr/zapr v1.2.0
go: downloading go.uber.org/zap v1.19.1
go: downloading golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff
go: downloading k8s.io/klog/v2 v2.30.0
go: downloading sigs.k8s.io/structured-merge-diff/v4 v4.2.0
go: downloading sigs.k8s.io/yaml v1.3.0
go: downloading sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6
go: downloading k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65
go: downloading golang.org/x/net v0.0.0-20210825183410-e898025ed96a
go: downloading k8s.io/apiextensions-apiserver v0.23.0
go: downloading go.uber.org/goleak v1.1.12
go: downloading k8s.io/component-base v0.23.0
go: downloading golang.org/x/text v0.3.7
go: downloading github.com/json-iterator/go v1.1.12
go: downloading golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b
go: downloading golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
go: downloading golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8
go: downloading google.golang.org/protobuf v1.27.1
go: downloading github.com/prometheus/common v0.28.0
go: downloading github.com/modern-go/reflect2 v1.0.2
go: downloading github.com/fsnotify/fsnotify v1.5.1
go: finding module for package github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1
github.com/crossplane-contrib/provider-jet-azuread/apis imports
github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1: cannot find module providing package github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1: module github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1: git ls-remote -q origin in /home/mikebolland/go/pkg/mod/cache/vcs/9d596c92663b390be4f17e07a299aec94dbc59b1689b685c82c49c74ac240577: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
from provider-jet-template.
can you reopen this since i still cant build from the template guide
thanks!
from provider-jet-template.
from provider-jet-template.
actually, nm, looks like the terraform provider argument i used was not correct
from provider-jet-template.
actually, nm, looks like the terraform provider argument i used was not correct
@mikebollandajw does this mean you're good to go and we don't need to reopen ticket?
from provider-jet-template.
generate is stuck on
go: finding module for package github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1
github.com/crossplane-contrib/provider-jet-azuread/apis imports
github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1: cannot find module providing package github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1: module github.com/crossplane-contrib/provider-jet-azuread/apis/null/v1alpha1: git ls-remote -q origin in /mnt/c/dev/git/provider-jet-azuread/.work/pkg/pkg/mod/cache/vcs/9d596c92663b390be4f17e07a299aec94dbc59b1689b685c82c49c74ac240577: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
07:57:17 [FAIL]
build/makelib/golang.mk:270: recipe for target 'go.generate' failed
make[1]: *** [go.generate] Error 1
build/makelib/common.mk:418: recipe for target 'generate' failed
make: *** [generate] Error 2
from provider-jet-template.
Did you change module name here: https://github.com/crossplane-contrib/provider-jet-template/blob/main/go.mod#L1 ?
This would require all import paths to be updated.
from provider-jet-template.
no sir i just followed the guide, i guess some script is doing that?
from provider-jet-template.
I can check if you could share your code/repo.
from provider-jet-template.
https://github.com/ajwgroup/provider-jet-azuread
from provider-jet-template.
# We need to be careful while replacing "template" keyword in go.mod as it could tamper
# some imported packages under require section.
sed -i.bak "s/provider-jet-template/provider-jet-${ProviderNameLower}/g" go.mod
thi sis in the hack/prepare.sh
from provider-jet-template.
make generate
succeded on my side 🤔
make generate
12:45:48 [ .. ] installing terraform darwin-x86_64
Archive: /Users/hasanturken/Workspace/tmp/provider-jet-azuread/.cache/tools/darwin_x86_64/tmp-terraform/terraform.zip
inflating: /Users/hasanturken/Workspace/tmp/provider-jet-azuread/.cache/tools/darwin_x86_64/tmp-terraform/terraform
12:45:52 [ OK ] installing terraform darwin-x86_64
12:45:52 [ .. ] generating provider schema for hashicorp/null 3.1.0
12:46:00 [ OK ] generating provider schema for hashicorp/null 3.1.0
12:46:00 [ .. ] verify dependencies have expected content
all modules verified
12:46:01 [ OK ] go modules dependencies verified
12:46:01 [ .. ] go generate darwin_amd64
go: downloading github.com/crossplane/crossplane-tools v0.0.0-20210916125540-071de511ae8e
go: downloading sigs.k8s.io/controller-tools v0.8.0
go: downloading github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7
go: downloading golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff
go: downloading github.com/dave/jennifer v1.4.1
go: downloading github.com/spf13/cobra v1.2.1
go: downloading github.com/fatih/color v1.12.0
go: downloading github.com/gobuffalo/flect v0.2.3
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading golang.org/x/mod v0.4.2
Generated 1 resources!
12:46:22 [ OK ] go generate darwin_amd64
12:46:22 [ .. ] go mod tidy
go: downloading github.com/onsi/gomega v1.17.0
go: downloading github.com/golang/mock v1.6.0
go: downloading github.com/stretchr/testify v1.7.0
go: downloading github.com/onsi/ginkgo v1.16.5
go: downloading go.uber.org/goleak v1.1.12
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/benbjohnson/clock v1.1.0
go: downloading github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0
go: downloading github.com/go-test/deep v1.0.3
go: downloading github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce
go: downloading gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
go: downloading google.golang.org/appengine v1.6.7
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading github.com/kr/pretty v0.2.1
go: downloading github.com/kylelemons/godebug v1.1.0
go: downloading github.com/nxadm/tail v1.4.8
go: downloading github.com/kr/text v0.2.0
go: downloading gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
go: downloading github.com/hashicorp/terraform-plugin-sdk v1.17.2
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/apparentlymart/go-textseg v1.0.0
go: downloading github.com/cespare/xxhash v1.1.0
12:46:26 [ OK ] go mod tidy
12:46:26 [ .. ] cleaning generated CRDs
12:46:26 [ OK ] cleaned generated CRDs
from provider-jet-template.
no sir i just followed the guide, i guess some script is doing that?
yeah, I was asking for manual changes other than that.
from provider-jet-template.
This does not look like your final state btw:
https://github.com/ajwgroup/provider-jet-azuread/blob/main/Makefile#L4
from provider-jet-template.
oh i havent commited sorry one sec
from provider-jet-template.
deployed
from provider-jet-template.
Run the guide on my side and generation was successful: https://github.com/turkenh/provider-jet-azuread
Comparing our codes, I found the following diff which seems to be the culprit:
diff provider-jet-azuread/Makefile try/provider-jet-azuread/Makefile
5c5
< PROJECT_REPO := github.com/ajwgroup/$(PROJECT_NAME)
---
> PROJECT_REPO := github.com/crossplane-contrib/$(PROJECT_NAME)
I would suggest you replace all occurrences of that string inside the repository if you want to change it.
from provider-jet-template.
Oh but people wanting to contribute cannot deploy to crossplane-contrib so it is a little confusing
Are you saiyng we shouldnt change the PROJECT_REPO variable? Can the guide be updated to reflect this? Thanks!
from provider-jet-template.
You can still host it on your github org without changing that variable. It would simply work.
It causes problems when it is changed for some occurrences but not all.
But I totally agree that is confusing and we should clarify in the guide. May be a step which finds and replaces all crossplane-contrib
s to <your-org>
. Would you mind creating a ticket for that in Terrajet?
from provider-jet-template.
should the script also be supplying goimports?
13:33:18 [ .. ] go generate linux_amd64
panic: cannot run goimports for apis folder: bash: goimports: command not found
: exit status 127
goroutine 1 [running]:
github.com/crossplane/terrajet/pkg/pipeline.Run(0xc0000ff380, {0xc00098e3f0, 0x23})
/mnt/c/dev/git/provider-jet-azuread/.work/pkg/pkg/mod/github.com/crossplane/[email protected]/pkg/pipeline/run.go:109 +0xa79
main.main()
/mnt/c/dev/git/provider-jet-azuread/cmd/generator/main.go:39 +0x68
exit status 2
apis/generate.go:33: running "go": exit status 1
13:34:55 [FAIL]
from provider-jet-template.
that appeared to be the final issue to finish generate :-) thanks again!
from provider-jet-template.
actually just this: https://github.com/ajwgroup/provider-jet-azuread/runs/5320293508?check_suite_focus=true#step:9:36
from provider-jet-template.
Related Issues (13)
- Remove crds.clean target
- Where is this name field coming from? HOT 3
- README needs to be updated - Makefile image and push targets does not exist HOT 6
- Custom provider source repo
- bug in file cluster/images/provider-jet-github-controller/Dockerfile HOT 2
- bug in file cluster/images/provider-jet-github-controller/Dockerfile
- add support for golang 1.18 and 1.19 HOT 2
- Include .github CI/CD configuration HOT 2
- unable to initialize provider connection
- Update terrajet version to v0.4.2
- Update documentation and provider-jet-template repo to cover creating a crossplane provider from a CUSTOM Terraform provider
- Upgrade terrajet version to 0.4.2 in provider-jet-template
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from provider-jet-template.