knative / client

Knative developer experience, docs, reference Knative CLI implementation
Apache License 2.0
353 stars 261 forks source link

Fold in knative.dev/client-pkg as a submodule #1953

Closed cardil closed 2 months ago

cardil commented 5 months ago

Description

This PR merges code from the knative.dev/client-pkg, that is missing in this repo, onto the knative.dev/client/pkg. TBD a PR to deprecate the whole of the knative.dev/client-pkg.

Changes

Reference

Fixes #1941 Closes #1935 Closes knative/client-pkg#177 Requires knative/hack#386

Release Note

The knative.dev/client-pkg package is now deprecated in favor of the knative.dev/client/pkg package.
knative-prow[bot] commented 5 months ago

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

dsimansk commented 5 months ago

/test all

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 50.75758% with 260 lines in your changes missing coverage. Please review.

Project coverage is 75.78%. Comparing base (bb1f899) to head (8ddab3c). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/output/tui/progress.go 0.00% 148 Missing :warning:
pkg/output/logging/context.go 82.95% 11 Missing and 4 partials :warning:
pkg/context/wrapper.go 0.00% 14 Missing :warning:
pkg/output/tui/choose.go 0.00% 14 Missing :warning:
pkg/output/printer.go 0.00% 12 Missing :warning:
pkg/output/logging/zap.go 0.00% 9 Missing :warning:
pkg/config/dir/local.go 76.92% 3 Missing and 3 partials :warning:
pkg/output/logging/logfile.go 80.00% 3 Missing and 3 partials :warning:
pkg/output/testing.go 78.57% 4 Missing and 2 partials :warning:
pkg/output/tui/spinner.go 86.66% 3 Missing and 3 partials :warning:
... and 9 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1953 +/- ## ========================================== - Coverage 76.82% 75.78% -1.05% ========================================== Files 207 228 +21 Lines 12892 13411 +519 ========================================== + Hits 9904 10163 +259 - Misses 2187 2425 +238 - Partials 801 823 +22 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cardil commented 4 months ago

/test all

cardil commented 4 months ago

/test all

cardil commented 4 months ago

/test build-tests

cardil commented 4 months ago

/test unit-tests

cardil commented 4 months ago

/test all

cardil commented 4 months ago

/test all

cardil commented 4 months ago

The integration test fails because of net-istio bug: https://github.com/knative-extensions/net-istio/issues/1345

cardil commented 4 months ago

/test all

cardil commented 4 months ago

/test all

cardil commented 4 months ago

/test all

cardil commented 4 months ago

/test all

cardil commented 2 months ago

/test all

cardil commented 2 months ago

Looks like both the github action and the prow tests run just for the main module, not for the pkg:

  1. https://github.com/knative/client/actions/runs/10639800469/job/29498455266?pr=1953
  2. https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative_client/1953/unit-tests_client_main/1829644085225328640
dsimansk commented 2 months ago

Looks like both the github action and the prow tests run just for the main module, not for the pkg:

  1. https://github.com/knative/client/actions/runs/10639800469/job/29498455266?pr=1953
  2. https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative_client/1953/unit-tests_client_main/1829644085225328640

Should we go we default implementation of unit tests parsing per go module? https://github.com/knative/client/blob/main/test/presubmit-tests.sh#L54-L57

cardil commented 2 months ago

Should we go we default implementation of unit tests parsing per go module? https://github.com/knative/client/blob/main/test/presubmit-tests.sh#L54-L57

Great catch @dsimansk!

Apart from the above, we need to fix the GitHub Action, as it is the one to publish coverage to Codecov:

https://github.com/knative/actions/blob/8d6af971ff477fdd929367f4c33c865ba0082b13/.github/workflows/reusable-go-test.yaml#L55-L56

dsimansk commented 2 months ago

/approve /lgtm

Thanks a lot @cardil!

knative-prow[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cardil, dsimansk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/knative/client/blob/main/OWNERS)~~ [dsimansk] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
dsimansk commented 2 months ago

/unhold

cardil commented 2 months ago

Maybe I'll do the last one test, before merging - to try using the PKG package in another repo.

dsimansk commented 2 months ago

/hold

cardil commented 2 months ago

The https://github.com/knative-extensions/kn-plugin-event/pull/366 looks to work with this structure without any hiccups.

/hold cancel