client icon indicating copy to clipboard operation
client copied to clipboard

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

Open cardil opened this issue 1 year ago • 6 comments

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

  • :broom: This PR merges code from the knative.dev/client-pkg, that is missing in this repo, onto the knative.dev/client/pkg
  • :broom: Publicize the code in lib/ dir onto pkg/
  • :broom: Remove the extra kn sub-package
  • :broom: Makes pkg/ as a Go submodule and introduces Go's workspace.

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.

cardil avatar Jun 20 '24 17:06 cardil

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

knative-prow[bot] avatar Jun 20 '24 17:06 knative-prow[bot]

/test all

dsimansk avatar Jun 25 '24 08:06 dsimansk

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
@@            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.

codecov[bot] avatar Jun 25 '24 08:06 codecov[bot]

/test all

cardil avatar Jul 02 '24 15:07 cardil

/test all

cardil avatar Jul 09 '24 17:07 cardil

/test build-tests

cardil avatar Jul 10 '24 12:07 cardil

/test unit-tests

cardil avatar Jul 10 '24 13:07 cardil

/test all

cardil avatar Jul 18 '24 19:07 cardil

/test all

cardil avatar Jul 18 '24 20:07 cardil

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

cardil avatar Jul 19 '24 10:07 cardil

/test all

cardil avatar Jul 19 '24 10:07 cardil

/test all

cardil avatar Jul 19 '24 11:07 cardil

/test all

cardil avatar Jul 19 '24 11:07 cardil

/test all

cardil avatar Jul 19 '24 12:07 cardil

/test all

cardil avatar Aug 27 '24 16:08 cardil

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

cardil avatar Aug 30 '24 22:08 cardil

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

dsimansk avatar Sep 02 '24 12:09 dsimansk

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

cardil avatar Sep 02 '24 18:09 cardil

/approve /lgtm

Thanks a lot @cardil!

dsimansk avatar Sep 03 '24 11:09 dsimansk

[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:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

knative-prow[bot] avatar Sep 03 '24 11:09 knative-prow[bot]

/unhold

dsimansk avatar Sep 03 '24 11:09 dsimansk

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

cardil avatar Sep 03 '24 11:09 cardil

/hold

dsimansk avatar Sep 03 '24 11:09 dsimansk

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

/hold cancel

cardil avatar Sep 03 '24 13:09 cardil