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

Remove legacy code #532

Merged
merged 7 commits into from
Nov 6, 2018
Merged

Conversation

scothis
Copy link
Contributor

@scothis scothis commented Oct 19, 2018

Proposed Changes

remove API groups:

  • channels.knative.dev
  • feeds.knative.dev
  • flows.knative.dev

Remove code and dependencies that depended directly on those API groups.
This includes all Buses and EventSources.

Where practical references to Channel and Subscription in
channels.knative.dev have been updated to eventing.knative.dev.

The e2e suite has been decimated and will need to be reestabilished.

Removed vendor dependencies for Samara (Kafka) and Cloud Pub/Sub.

Updated release script. Now publishes three artifacts:

  • eventing.yaml - core of eventing
  • in-memory-channel.yaml - in memory channel provisioner
  • release.yaml - eventing core + in memory provisioner

Release Note

All existing EventSources and Buses are no longer supported.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Oct 19, 2018
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: scothis

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 19, 2018
@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 19, 2018
@scothis
Copy link
Contributor Author

scothis commented Oct 19, 2018

/hold

I wanted to see what the repo would look like if we removed all legacy code. I'm not sure if it is a good idea to merge this PR or not.

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 19, 2018
@scothis
Copy link
Contributor Author

scothis commented Oct 22, 2018

/assign @vaikas-google

I want to allow plenty of time for people to yell if they think we should persevere the old and new worlds side-by-side. I'm currently leaning towards a clean slate.

As a bonus, it should help our coverage stats.

@n3wscott
Copy link
Contributor

we need to keep all of this around until the samples can be rewritten in knative/docs

@evankanderson
Copy link
Member

evankanderson commented Oct 22, 2018 via email

@scothis
Copy link
Contributor Author

scothis commented Oct 23, 2018

Each of the samples in knative/docs uses a source, which has moved to knative/eventing-sources. I can submit a PR that removes all of the eventing samples since they will each need to be significantly updated to the point where it's essentially a new sample.

Another option is to cut a 0.1 release with what's in the repo today, pin the current samples against that and then focus all of our effort on 0.2. There would be zero backwards compatibility between 0.1 and 0.2.

@evankanderson
Copy link
Member

evankanderson commented Oct 23, 2018 via email

@vaikas
Copy link
Contributor

vaikas commented Oct 24, 2018

+1 I'd like to get to a state where our existing samples (or an agreed upon subset of them) actually work end-to-end with the new stuff and our docs refer to them. I'm very supportive of this PR but want to make sure we have some sort of continuity when moving towards the new object model.

@vaikas
Copy link
Contributor

vaikas commented Nov 6, 2018

Fixes #582

remove API groups:
- channels.knative.dev
- feeds.knative.dev
- flows.knative.dev

Remove code and dependencies that depended directly on those API groups.
This includes all Buses and EventSources.

Where practical references to Channel and Subscription in
channels.knative.dev have been updated to eventing.knative.dev.

The e2e suite has been decimated and will need to be reestabilished.
@@ -23,8 +23,8 @@ import (
"fmt"
"time"

eventingV1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
eventingtyped "github.com/knative/eventing/pkg/client/clientset/versioned/typed/eventing/v1alpha1"
flowsV1alpha1 "github.com/knative/eventing/pkg/apis/flows/v1alpha1"
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems wrong?

# The dispatcher used by the ClusterBus to dispatch messages between channels and subscriptions
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems to need to go away?

test/states.go Outdated
@@ -16,7 +16,7 @@ limitations under the License.
package test

import (
eventingV1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
flowsV1alpha1 "github.com/knative/eventing/pkg/apis/flows/v1alpha1"
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems wrong?

@knative-metrics-robot
Copy link

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

File Old Coverage New Coverage Delta
cmd/controller/main.go 3.3% 4.9% 1.6

Copy link
Contributor

@grantr grantr left a comment

Choose a reason for hiding this comment

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

🎉 Thanks for working through all this @scothis!

(I only reviewed hack/release.sh)

@@ -23,23 +23,15 @@ readonly EVENTING_RELEASE_GCS
readonly EVENTING_RELEASE_GCR

# Yaml files to generate, and the source config dir for them.
declare -A COMPONENTS
COMPONENTS["eventing.yaml"]="config"
COMPONENTS["in-memory-channel.yaml"]="config/provisioners/in-memory-channel"
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this duplicate the config that's already in eventing.yaml, since that file contains this directory also? Then the release yaml will have two copies of the in-memory-channel objects.

Copy link
Contributor Author

@scothis scothis Nov 6, 2018

Choose a reason for hiding this comment

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

@grantr There will be three files produced for the release:

  • eventing.yaml only knative eventing
  • in-memory-channel.yaml only the in-memory provisioner
  • release.yaml eventing.yaml + in-memory-channel.yaml

When you give a directory to ko, it will only build config files that are in that exact directory.

I ran this script with my own creds when I originally put up the PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Thanks, TIL. Apparently there's a --recursive flag to kubectl that selects the behavior I was expecting.

Minor preference for core.yaml or eventing-core.yaml over eventing.yaml, but this is fine for now.

/hold cancel

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the patten that serving uses, but it's easy enough to change.

@vaikas
Copy link
Contributor

vaikas commented Nov 6, 2018

Good with everything except the release script, letting @grantr unhold once release is right, everything else is lgtm.
/lgtm
/hold

@knative-prow-robot knative-prow-robot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Nov 6, 2018
@knative-prow-robot knative-prow-robot merged commit 111089f into knative:master Nov 6, 2018
@scothis scothis deleted the bring-out-your-dead branch November 6, 2018 22:19
echo "# ${component}" >> ${yaml}
cat ${component} >> ${yaml}
done
all_yamls+=(${yaml})
Copy link
Contributor

Choose a reason for hiding this comment

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

You missed tagging the images here (line 79 in the original code). This is a bug. :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@adrcunha is it necessary to run tag_images_in_yaml again? This step is only concatenating yamls generated above which were tagged here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. In line 62 you were tagging the component yamls. Now you're tagging the release yamls. Because on line 88 you're publishing all yamls (components and releases).

Copy link
Contributor

Choose a reason for hiding this comment

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

(sorry, this fell off my radar)

pierDipi pushed a commit to pierDipi/eventing that referenced this pull request Feb 26, 2024
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. 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.

None yet

9 participants