api icon indicating copy to clipboard operation
api copied to clipboard

tools makefile version checks output git errors when vendored in another repo

Open abutcher opened this issue 2 years ago • 9 comments

The tools Makefile version checks output git errors when vendored / ran from another repository via make -C as described in the codegen README for inclusion in other repositories. openshift/api vendor, go.mod, go.sum files in the check aren't there when vendored into a different project. The check ultimately works but outputs git errors when ran.

Example output from including in the cloud credential operator repo:

➜  cloud-credential-operator ✗ make -C vendor/github.com/openshift/api/tools run-codegen BASE_DIR="${PWD}/pkg/apis" API_GROUP_VERSIONS="cloudcredential.openshift.io/v1" OPENSHIFT_REQUIRED_FEATURESETS="Default"
make: Entering directory '/home/abutcher/go/src/github.com/openshift/cloud-credential-operator/vendor/github.com/openshift/api/tools'
fatal: ambiguous argument 'vendor': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'vendor': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'vendor': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: vendor: no such path in the working tree.
Use 'git <command> -- <path>...' to specify paths that do not exist locally.
fatal: vendor: no such path in the working tree.
Use 'git <command> -- <path>...' to specify paths that do not exist locally.
fatal: vendor: no such path in the working tree.
Use 'git <command> -- <path>...' to specify paths that do not exist locally.
Building codegen version 0f37397c68ee97ff55ba80aba040fc84d4a65653-dirty
/home/abutcher/go/src/github.com/openshift/cloud-credential-operator/vendor/github.com/openshift/api/tools/_output/bin/linux/amd64/codegen --base-dir /home/abutcher/go/src/github.com/openshift/cloud-credential-operator/pkg/apis --api-group-versions cloudcredential.openshift.io/v1 --required-feature-sets Default
I0228 10:37:37.514558  613509 root.go:80] Running generators for cloudcredential.openshift.io
...

abutcher avatar Feb 28 '23 15:02 abutcher

I did try to test this when I did this before, but a lot has changed to do with the version checks over the past few months, which has made it work well here, but clearly broken it elsewhere, will take a look into this /assign

JoelSpeed avatar Mar 01 '23 16:03 JoelSpeed

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar May 31 '23 01:05 openshift-bot

/remove-lifecycle stale

JoelSpeed avatar May 31 '23 08:05 JoelSpeed

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Aug 29 '23 09:08 openshift-bot

/remove-lifecycle stale

JoelSpeed avatar Aug 29 '23 10:08 JoelSpeed

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Nov 28 '23 01:11 openshift-bot

/remove-lifecycle stale

JoelSpeed avatar Dec 08 '23 15:12 JoelSpeed

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Mar 08 '24 01:03 openshift-bot

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot avatar Apr 07 '24 08:04 openshift-bot

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-bot avatar May 08 '24 00:05 openshift-bot

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

openshift-ci[bot] avatar May 08 '24 00:05 openshift-ci[bot]