Skip to content

Instantly share code, notes, and snippets.

@rezamt
Created November 5, 2023 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rezamt/2d260d9b71fffe743208196f4b3758c5 to your computer and use it in GitHub Desktop.
Save rezamt/2d260d9b71fffe743208196f4b3758c5 to your computer and use it in GitHub Desktop.
provider-github

Issue 01 - make generate

The make genreate is failing for go get github.com/crossplane/upjet/pkg/config

01:55:17 [ .. ] go generate linux_amd64
../config/branch/config.go:3:8: no required module provides package github.com/crossplane/upjet/pkg/config; to add it:
	go get github.com/crossplane/upjet/pkg/config
apis/generate.go:25: running "go": exit status 1
generate: open /home/reza/provider-github/apis/v1alpha1/zz_generated.deepcopy.go: no such file or directory
01:55:19 [FAIL]
make[1]: *** [build/makelib/golang.mk:240: go.generate] Error 1
make: *** [build/makelib/common.mk:434: generate] Error 2

which I tried to change the files:

/config/repository/config.go /config/branch/config.go

// import "github.com/crossplane/upjet/pkg/config"
import "github.com/upbound/upjet/pkg/config"

Issue 2 - make generate

go version 1.19 - go.mod

02:10:11 [ .. ] go mod tidy
go: go.mod file indicates go 1.19, but maximum version supported by tidy is 1.18
02:10:11 [FAIL]
make[1]: *** [build/makelib/golang.mk:243: go.generate] Error 1
make: *** [build/makelib/common.mk:434: generate] Error 2

which I had to change it:

go 1.18 to pass the error.

Issue 3 - Creating CRQ Repository and Branch fails

❯ kubectl apply -f examples/repository/repository.yaml
error: resource mapping not found for name: "hello-crossplane" namespace: "" from "examples/repository/repository.yaml": no matches for kind "Repository" in version "repository.github.upbound.io/v1alpha1"
ensure CRDs are installed first
❯ kubectl apply -f examples/branch/branch.yaml
error: resource mapping not found for name: "hello-upjet" namespace: "" from "examples/branch/branch.yaml": no matches for kind "Branch" in version "branch.github.upbound.io/v1alpha1"
ensure CRDs are installed first

@rezamt
Copy link
Author

rezamt commented Nov 5, 2023

# go veriosn
go version go1.18.1 linux/amd64

# uname -a
Linux ubuntu-d3 6.2.0-33-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep  7 10:33:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

# go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go-1.18"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.18/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/reza/provider-github/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2388757982=/tmp/go-build -gno-record-gcc-switches"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment