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

api-docs target fails when running on Network Operator master branch #102

Closed
rollandf opened this issue Sep 11, 2024 · 5 comments
Closed

Comments

@rollandf
Copy link
Member

May be related to upgrade to go 1.22 in Network-operator ( Mellanox/network-operator#1062 )

$ make api-docs 
curl -sL https://github.com/Mellanox/network-operator/archive/refs/heads/master.tar.gz \
| tar -xz -C /home/frolland/git/network-operator-docs/build/_output/crd
cd /home/frolland/git/network-operator-docs/build/_output/crd/network-operator-master/api/v1alpha1 && \
/home/frolland/git/network-operator-docs/hack/tools/bin/gen-crd-api-reference-docs-819de227e5fe85ee70022e71191d7838847e075a -api-dir=. -config=/home/frolland/git/network-operator-docs/hack/api-docs/config.json \
-template-dir=/home/frolland/git/network-operator-docs/hack/api-docs/templates -out-file=/home/frolland/git/network-operator-docs/build/_output/crds-api.html
I0911 12:04:35.498150    9328 main.go:144] parsing go packages in directory .
I0911 12:04:35.994661    9328 main.go:222] found 2 packages
F0911 12:04:59.923516    9328 main.go:150] no API packages found in .
make: *** [Makefile:105: gen-crd-api-docs] Error 255
rollandf added a commit to rollandf/network-operator-docs that referenced this issue Sep 20, 2024
Until Mellanox#102 is fixed

Signed-off-by: Fred Rolland <[email protected]>
@souleb
Copy link
Contributor

souleb commented Oct 2, 2024

I tried to replicate this without success.

GO Version

$:~/network-operator-docs# go version
go version go1.22.6 linux/amd64

build

$@cloud-dev-18:~/network-operator-docs# make api-docs
Creating directory /***/network-operator-docs/hack/tools/bin...
mkdir -p /***/network-operator-docs/hack/tools/bin
echo "Installing gen-crd-api-reference-docs-819de227e5fe85ee70022e71191d7838847e075a to /***/network-operator-docs/hack/tools/bin"
Installing gen-crd-api-reference-docs-819de227e5fe85ee70022e71191d7838847e075a to /***/network-operator-docs/hack/tools/bin
GOBIN=/***/network-operator-docs/hack/tools/bin go install github.com/ahmetb/gen-crd-api-reference-docs@819de227e5fe85ee70022e71191d7838847e075a
go: downloading github.com/ahmetb/gen-crd-api-reference-docs v0.3.1-0.20240727143455-819de227e5fe
go: downloading k8s.io/gengo/v2 v2.0.0-20240404160639-a0386bf69313
go: downloading github.com/russross/blackfriday/v2 v2.1.0
mv /***/network-operator-docs/hack/tools/bin/gen-crd-api-reference-docs /***/network-operator-docs/hack/tools/bin/gen-crd-api-reference-docs-819de227e5fe85ee70022e71191d7838847e075a
Creating directory /***/network-operator-docs/build/_output/crd...
mkdir -p /***/network-operator-docs/build/_output/crd
curl -sL https://github.com/Mellanox/network-operator/archive/refs/heads/master.tar.gz \
| tar -xz -C /***/network-operator-docs/build/_output/crd
cd /***/network-operator-docs/build/_output/crd/network-operator-master/api/v1alpha1 && \
/***/network-operator-docs/hack/tools/bin/gen-crd-api-reference-docs-819de227e5fe85ee70022e71191d7838847e075a -api-dir=. -config=/***/network-operator-docs/hack/api-docs/config.json \
-template-dir=/***/network-operator-docs/hack/api-docs/templates -out-file=/***/network-operator-docs/build/_output/crds-api.html
I1002 12:04:38.859703 1636773 main.go:144] parsing go packages in directory .
I1002 12:04:42.346155 1636773 main.go:222] found 2 packages
I1002 12:04:45.942294 1636773 main.go:249] using package=v1alpha1
I1002 12:04:45.959958 1636773 main.go:182] written to /***/network-operator-docs/build/_output/crds-api.html
docker run --rm --volume "`pwd`:/data:Z" pandoc/minimal -f html -t rst --lua-filter=/data/hack/ref_links.lua \
--columns 200 /data/build/_output/crds-api.html -o /data/docs/customizations/crds.rst
Unable to find image 'pandoc/minimal:latest' locally
latest: Pulling from pandoc/minimal
e46ec22e720e: Pull complete 
4b7ae14ee9dc: Pull complete 
996d491dcc7b: Pull complete 
Digest: sha256:29967988b3b40a9212cfea327651ea2e9dbbc226d67f2883fc9f038dec813300
Status: Downloaded newer image for pandoc/minimal:latest

@rollandf
Copy link
Member Author

rollandf commented Oct 2, 2024

Here an example of failure:

https://github.com/Mellanox/network-operator/actions/runs/10921479665/job/30363895261

Could it be related to go version?

@souleb
Copy link
Contributor

souleb commented Oct 2, 2024

I tried to build against master, v24.10.0-beta.1 and v24.7.2-rc.1 successfully. The only difference is the go version. The CI used go 1.22.7. Can you trigger a new build to test?

@rollandf
Copy link
Member Author

rollandf commented Oct 3, 2024

@rollandf
Copy link
Member Author

Fixed by #114
Thanks @souleb !!

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

No branches or pull requests

2 participants