contour icon indicating copy to clipboard operation
contour copied to clipboard

Running make checkall fails in generating Gateway API CRDs

Open tsaarni opened this issue 1 year ago • 2 comments

After #4686 merge make checkall fails

$ make checkall
...
Generating Gateway API CRD YAML documents...
error: git cmd = '/usr/bin/git fetch --depth=1 origin v0.5.1-0.20220822185609-d05e07b14156': exit status 128
make: *** [Makefile:238: generate-gateway-yaml] Error 1

The reason is that v0.5.1-0.20220822185609-d05e07b14156 is not a git tag. It is go.mod pseudo-version.

This was worked around by #4686 by forcing version by setting environment variable prior to running make

https://github.com/projectcontour/contour/blob/a6036886fb5eceebe9b4dd5a0aa4b16919f6eb12/.github/workflows/prbuild.yaml#L71

so that Makefile will skip the grep here: https://github.com/projectcontour/contour/blob/a6036886fb5eceebe9b4dd5a0aa4b16919f6eb12/Makefile#L10

But when I run make checkall locally, I'm not likely setting the environment variable GATEWAY_API_VERSION=release-0.5 make checkall. If not working on Gateway API I might not even know about the current version.

Maybe Makefile should fetch the version from .github/workflows/prbuild.yaml instead, or maybe turn it around: have Makefile as the authorative source for the version info by just setting hardcoded version there, like it is now done in prbuild.yaml?

There is second grep for go.mod in https://github.com/projectcontour/contour/blob/main/test/scripts/run-gateway-conformance.sh which likely has the same problem.

tsaarni avatar Aug 28 '22 07:08 tsaarni

Ah yeah, we're going to switch this back to a release tag as soon as Gateway API v0.5.1 is out, so maybe the best bet is to just live with it for now and take note for the future if we ever want/need to make a go mod change like this again.

skriss avatar Aug 30 '22 15:08 skriss

xref #4737

skriss avatar Sep 21 '22 23:09 skriss