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

Don't rely on the existence of vendor dir at root level #1345

Open
cardil opened this issue Jul 19, 2024 · 4 comments
Open

Don't rely on the existence of vendor dir at root level #1345

cardil opened this issue Jul 19, 2024 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@cardil
Copy link

cardil commented Jul 19, 2024

source "$(git rev-parse --show-toplevel)/vendor/knative.dev/hack/library.sh"

This breaks knative/client#1953 integration test: https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative_client/1953/integration-tests_client_main/1814032077515919360#1:build-log.txt%3A6886

Instead, use hack script embedding:

# shellcheck disable=SC1090
source "$(go run knative.dev/hack/cmd/script library.sh)"

/kind bug

@knative-prow knative-prow bot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 19, 2024
cardil added a commit to cardil/knative-client that referenced this issue Jul 19, 2024
cardil added a commit to cardil/knative-client that referenced this issue Jul 19, 2024
cardil added a commit to cardil/knative-client that referenced this issue Jul 19, 2024
cardil added a commit to cardil/knative-client that referenced this issue Jul 19, 2024
@skonto
Copy link
Contributor

skonto commented Jul 24, 2024

I think this is the current convention in Knative see for example: https://github.com/knative-extensions/sample-controller/blob/main/hack/tools.go#L25. By trying to move to a vendorless setup and by using the knative.dev/hack/cmd/script in that client PR it is kind of expected things to break. So I feel this is part of the work that needs to be done because of the migration process: https://github.com/knative/hack/tree/main/cmd/script#migration-to-a-vendorless-project. Is this kind of a strict requirement for all knative repos (lacking context here)? cc @dprotaso
I am trying to understand if we just need to fix this part because client uses it in e2e (client is becoming vendorless) or we should be moving this repo (others too).

@cardil
Copy link
Author

cardil commented Jul 24, 2024

Moving to vendorless setup isn't mandatory, but it's recommended going forward. For reasons of that effort, please see
knative/infra#134 description.

knative-prow bot pushed a commit to knative/client that referenced this issue Sep 3, 2024
* Move to the hack' script inflator

* Skip kn subpackage

* Move the lib/ to public pkg/ packages

* Introduce pkg submodule, remove the vendor dir

* Remove vendor references

* Use latest version of knative.dev/hack

* Publish dependent images properly

* Walkaround for knative-extensions/net-istio#1345

* Remove GOTOOLCHAIN in go.work

* Verify codegen use common funcs

* Import code from knative.dev/client-pkg

* Restore the default unit test runner

* Try knative/actions#223

* Restore the workflows

* Nit: simplify config package import
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 23, 2024
@skonto
Copy link
Contributor

skonto commented Oct 23, 2024

/remove-lifecycle stale

@knative-prow knative-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants