Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Bump KafkaChannel types to v1beta1 #1356

Merged
merged 2 commits into from
Jul 1, 2020

Conversation

aliok
Copy link
Member

@aliok aliok commented Jun 29, 2020

Fixes #1351

Proposed Changes

  • v1beta1 type bump for KafkaChannel

Release Note


Docs

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 29, 2020
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jun 29, 2020
@knative-prow-robot
Copy link
Contributor

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-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 29, 2020
Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -name '*.pb.go' -prune -o -type f -name '*.go' -print)
goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party | grep -v .pb.go | grep -v wire_gen.go)

@aliok aliok marked this pull request as ready for review June 29, 2020 13:48
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 29, 2020
Comment on lines +33 to +38
if c.Annotations == nil {
c.Annotations = make(map[string]string)
}
if _, ok := c.Annotations[messaging.SubscribableDuckVersionAnnotation]; !ok {
c.Annotations[messaging.SubscribableDuckVersionAnnotation] = "v1"
}
Copy link
Member Author

Choose a reason for hiding this comment

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

We need this to support duckv1, right?

Copy link
Member

Choose a reason for hiding this comment

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

yep

ReplicationFactor int16 `json:"replicationFactor"`

// KafkaChannel conforms to Duck type Subscribable.
Subscribable *eventingduck.Subscribable `json:"subscribable,omitempty"`
Copy link
Member Author

@aliok aliok Jun 29, 2020

Choose a reason for hiding this comment

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

Should I change this line with

eventingduckv1.ChannelableSpec `json:",inline"`

similar to InMemoryChannel v1?

We'd also have a Delivery *DeliverySpec in that case in KafkaChannelSpec

More context: https://knative.slack.com/archives/CR2141CGY/p1593428283210700

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea and also the Status

Copy link
Member

@matzew matzew Jun 30, 2020

Choose a reason for hiding this comment

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

@aliok something like:

// KafkaChannelSpec defines the specification for a KafkaChannel.
type KafkaChannelSpec struct {
    // NumPartitions is the number of partitions of a Kafka topic. By default, it is set to 1.
    NumPartitions int32 `json:"numPartitions"`

    // ReplicationFactor is the replication factor of a Kafka topic. By default, it is set to 1.
    ReplicationFactor int16 `json:"replicationFactor"`

    // Channel conforms to Duck type Channelable.
    eventingduck.ChannelableSpec `json:",inline"`
}

// KafkaChannelStatus represents the current state of a KafkaChannel.
type KafkaChannelStatus struct {
    // Channel conforms to Duck type Channelable.
    eventingduck.ChannelableStatus `json:",inline"`
}

@knative-metrics-robot
Copy link

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

File Old Coverage New Coverage Delta
kafka/channel/pkg/apis/messaging/v1beta1/kafka_channel_defaults.go Do not exist 100.0%
kafka/channel/pkg/apis/messaging/v1beta1/kafka_channel_lifecycle.go Do not exist 84.4%
kafka/channel/pkg/apis/messaging/v1beta1/kafka_channel_types.go Do not exist 100.0%
kafka/channel/pkg/apis/messaging/v1beta1/kafka_channel_validation.go Do not exist 100.0%
kafka/channel/pkg/apis/messaging/v1beta1/register.go Do not exist 0.0%

@knative-prow-robot
Copy link
Contributor

@aliok: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-knative-eventing-contrib-go-coverage 46b876d link /test pull-knative-eventing-contrib-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.

@aliok
Copy link
Member Author

aliok commented Jun 29, 2020

cc @lionelvillard @matzew
Please ignore the failing coverage

@matzew
Copy link
Member

matzew commented Jul 1, 2020

/lgtm
/approve

I will follow up w/ a PR for the types

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, matzew

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 Jul 1, 2020
@knative-prow-robot knative-prow-robot merged commit e81b71d into knative:master Jul 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-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.

KafkaChannel v1beta1 type bumps
7 participants