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

Migrate current sources to legacy #2336

Merged
merged 1 commit into from
Dec 20, 2019

Conversation

n3wscott
Copy link
Contributor

@n3wscott n3wscott commented Dec 19, 2019

Relates to #1500

Making space for sources.knative.dev. Step 1, move existing sources out of the way.

Proposed Changes

  • Move API for ApiServerSource, CronJobSource, ContainerSource, and SinkBinding to a new legacy client.
  • rename {name} reconcilers to legacy{name} reconcilers.

Release Note

No change to the Kubernetes API.
Generated Client has moved from pkg/client to pkg/legacyclient for ApiServerSource, CronJobSource, ContainerSource, and SinkBinding.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Dec 19, 2019
@knative-prow-robot knative-prow-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/test-and-release Test infrastructure, tests or release approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 19, 2019
@n3wscott
Copy link
Contributor Author

/assign @vaikas

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/legacysources/v1alpha1/apiserver_defaults.go Do not exist 100.0%
pkg/apis/legacysources/v1alpha1/apiserver_lifecycle.go Do not exist 55.0%
pkg/apis/legacysources/v1alpha1/apiserver_types.go Do not exist 0.0%
pkg/apis/legacysources/v1alpha1/apiserver_validation.go Do not exist 81.8%
pkg/apis/legacysources/v1alpha1/containersource_defaults.go Do not exist 100.0%
pkg/apis/legacysources/v1alpha1/containersource_lifecycle.go Do not exist 75.0%
pkg/apis/legacysources/v1alpha1/containersource_types.go Do not exist 0.0%
pkg/apis/legacysources/v1alpha1/containersource_validation.go Do not exist 75.0%
pkg/apis/legacysources/v1alpha1/cron_job_defaults.go Do not exist 100.0%
pkg/apis/legacysources/v1alpha1/cron_job_lifecycle.go Do not exist 68.2%
pkg/apis/legacysources/v1alpha1/cron_job_types.go Do not exist 66.7%
pkg/apis/legacysources/v1alpha1/cron_job_validation.go Do not exist 81.8%
pkg/apis/legacysources/v1alpha1/register.go Do not exist 100.0%
pkg/apis/legacysources/v1alpha1/sinkbinding_context.go Do not exist 100.0%
pkg/apis/legacysources/v1alpha1/sinkbinding_defaults.go Do not exist 100.0%
pkg/apis/legacysources/v1alpha1/sinkbinding_lifecycle.go Do not exist 100.0%
pkg/apis/legacysources/v1alpha1/sinkbinding_validation.go Do not exist 100.0%
pkg/reconciler/legacyapiserversource/apiserversource.go Do not exist 78.5%
pkg/reconciler/legacyapiserversource/cfg_host.go Do not exist 83.3%
pkg/reconciler/legacyapiserversource/controller.go Do not exist 94.1%
pkg/reconciler/legacyapiserversource/resources/eventtype.go Do not exist 0.0%
pkg/reconciler/legacyapiserversource/resources/labels.go Do not exist 0.0%
pkg/reconciler/legacyapiserversource/resources/receive_adapter.go Do not exist 100.0%
pkg/reconciler/legacycontainersource/containersource.go Do not exist 82.5%
pkg/reconciler/legacycontainersource/controller.go Do not exist 100.0%
pkg/reconciler/legacycontainersource/resources/deployment.go Do not exist 100.0%
pkg/reconciler/legacycronjobsource/controller.go Do not exist 100.0%
pkg/reconciler/legacycronjobsource/cronjobsource.go Do not exist 71.5%
pkg/reconciler/legacycronjobsource/resources/eventtype.go Do not exist 0.0%
pkg/reconciler/legacycronjobsource/resources/labels.go Do not exist 0.0%
pkg/reconciler/legacycronjobsource/resources/receive_adapter.go Do not exist 100.0%
pkg/reconciler/reconciler.go 4.5% 8.7% 4.2

@knative-prow-robot
Copy link
Contributor

@n3wscott: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-knative-eventing-go-coverage eb73e4e link /test pull-knative-eventing-go-coverage

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Copy link
Contributor

@antoineco antoineco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By far the easiest 100+ changed files PR I ever reviewed 🙂

@@ -30,12 +30,15 @@ import (
"k8s.io/client-go/tools/record"
clientset "knative.dev/eventing/pkg/client/clientset/versioned"
eventingScheme "knative.dev/eventing/pkg/client/clientset/versioned/scheme"
legacyclientset "knative.dev/eventing/pkg/legacyclient/clientset/versioned"
legacyScheme "knative.dev/eventing/pkg/legacyclient/clientset/versioned/scheme"
"knative.dev/pkg/configmap"
"knative.dev/pkg/controller"
"knative.dev/pkg/logging"
"knative.dev/pkg/logging/logkey"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the separation here? I assume it was to separate eventing imports from pkg imports but that drifted a little bit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There will be a name collision when I add back a sources.knative.dev group.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was only talking about the blank line, just trying to make sense about the way imports are grouped in this file.

@antoineco
Copy link
Contributor

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 20, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: antoineco, n3wscott

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-robot knative-prow-robot merged commit d4433cd into knative:master Dec 20, 2019
@vaikas
Copy link
Contributor

vaikas commented Dec 20, 2019

I might have missed but should we mark these as deprecated and set the status as such. In the other ones (sequence, etc.) we set the Status condition as Deprecated, instructing users to use the new resources.

@n3wscott
Copy link
Contributor Author

I might have missed but should we mark these as deprecated and set the status as such. In the other ones (sequence, etc.) we set the Status condition as Deprecated, instructing users to use the new resources.

I will in the next PR when I start adding their replacements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release Test infrastructure, tests or release cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants