Mellanox / network-operator-docs

NVIDIA Network Operator documentation sources
https://mellanox.github.io/network-operator-docs/
Apache License 2.0
3 stars 14 forks source link

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

Closed rollandf closed 1 month ago

rollandf commented 2 months ago

May be related to upgrade to go 1.22 in Network-operator ( https://github.com/Mellanox/network-operator/pull/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
souleb commented 1 month ago

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 commented 1 month ago

Here an example of failure:

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

Could it be related to go version?

souleb commented 1 month ago

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 commented 1 month ago

New failed run:

https://github.com/Mellanox/network-operator-docs/actions/runs/11149712751/job/30989197306

Triggered from here: https://github.com/Mellanox/network-operator-docs/actions/workflows/docs-ci.yaml

with tag 24.10.0-beta.2

rollandf commented 1 month ago

Fixed by #114 Thanks @souleb !!