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

Handle host headers in dataplane for identification of channel instances #1990

Conversation

aliok
Copy link
Member

@aliok aliok commented Mar 9, 2022

Fixes #

Proposed Changes

  • Handle host headers in dataplane for identification of channel instances
  • Needed to change the proto definition, but it is backwards compatible. See https://github.com/aliok/proto-experiments?
  • Logic is like this:
    • If path is defined for the ingress, use that as the identification information and ignore the hostname
    • If hostname is defined for the ingress, use that as the identification information unless there's a path defined

Release Note

- :gift: Handle host headers in dataplane for identification of channel instances

Docs

@knative-prow-robot knative-prow-robot added area/control-plane size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/data-plane labels Mar 9, 2022
@aliok
Copy link
Member Author

aliok commented Mar 9, 2022

Created instead of #1985

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 9, 2022
@aliok
Copy link
Member Author

aliok commented Mar 9, 2022

cc @pierDipi

@aliok
Copy link
Member Author

aliok commented Mar 9, 2022

/retest

Creating cluster e2e-cls-qoxagyct in us-east1...
{"component":"entrypoint","file":"k8s.io/test-infra/prow/entrypoint/run.go:169","func":"k8s.io/test-infra/prow/entrypoint.Options.ExecuteProcess","level":"error","msg":"Entrypoint received interrupt: terminated","severity":"error","time":"2022-03-09T21:33:26Z"}

@codecov
Copy link

codecov bot commented Mar 9, 2022

Codecov Report

Merging #1990 (7ab4849) into main (efa696c) will increase coverage by 7.01%.
The diff coverage is 65.62%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1990      +/-   ##
============================================
+ Coverage     60.25%   67.27%   +7.01%     
- Complexity        0      639     +639     
============================================
  Files            69      141      +72     
  Lines          4547     6692    +2145     
  Branches          0      186     +186     
============================================
+ Hits           2740     4502    +1762     
- Misses         1531     1816     +285     
- Partials        276      374      +98     
Flag Coverage Δ
java-unittests 81.90% <70.83%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
control-plane/pkg/contract/contract.pb.go 8.48% <0.00%> (-0.19%) ⬇️
control-plane/pkg/contract/log_marshaller.go 0.00% <0.00%> (ø)
...eceiver/impl/IngressProducerReconcilableStore.java 83.67% <68.18%> (ø)
control-plane/pkg/reconciler/broker/broker.go 70.04% <100.00%> (-0.27%) ⬇️
control-plane/pkg/reconciler/channel/channel.go 71.08% <100.00%> (-0.21%) ⬇️
...ntrol-plane/pkg/reconciler/channel/v2/channelv2.go 71.77% <100.00%> (-0.18%) ⬇️
control-plane/pkg/reconciler/sink/kafka_sink.go 72.78% <100.00%> (ø)
.../core/reconciler/impl/ResourcesReconcilerImpl.java 90.27% <100.00%> (ø)
...g/kafka/broker/receiver/impl/ReceiverVerticle.java 97.72% <100.00%> (ø)
...lane/pkg/reconciler/consumergroup/consumergroup.go 76.85% <0.00%> (ø)
... and 72 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efa696c...7ab4849. Read the comment docs.

@devguyio
Copy link
Contributor

devguyio commented Mar 9, 2022

I am gonna take the liberty of holding this until #1922 goes in, there's a possibility of a conflict here because of contract changes and we've been working for a while to have #1922 in. It's ready and got approved and LGTMED, lgtm removed due to a rebase though. Should be merged early tomorrow 🤞🏽

/hold

@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 Mar 9, 2022
@aliok aliok force-pushed the 2022-03-09-dataplane-use-hostname branch from 2f404f0 to 7ab4849 Compare March 10, 2022 08:44
@aliok
Copy link
Member Author

aliok commented Mar 10, 2022

/unhold

#1922 is merged

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 10, 2022
Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thanks!

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 10, 2022
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 506f2b2 into knative-extensions:main Mar 10, 2022
@aliok aliok deleted the 2022-03-09-dataplane-use-hostname branch March 10, 2022 11:16
@pierDipi
Copy link
Member

/cherry-pick release-1.3

@knative-prow-robot
Copy link
Contributor

@pierDipi: new pull request created: #2036

In response to this:

/cherry-pick release-1.3

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.

@pierDipi
Copy link
Member

/cherry-pick release-1.2

@knative-prow-robot
Copy link
Contributor

@pierDipi: #1990 failed to apply on top of branch "release-1.2":

Applying: Handle host headers in dataplane for identification of channel instances
.git/rebase-apply/patch:2386: trailing whitespace.
  
.git/rebase-apply/patch:2400: trailing whitespace.
        
.git/rebase-apply/patch:2412: trailing whitespace.
        
.git/rebase-apply/patch:2485: trailing whitespace.
  
.git/rebase-apply/patch:2499: trailing whitespace.
        
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	control-plane/pkg/contract/contract.pb.go
M	control-plane/pkg/reconciler/broker/broker.go
M	control-plane/pkg/reconciler/broker/broker_test.go
M	control-plane/pkg/reconciler/channel/channel.go
M	control-plane/pkg/reconciler/channel/channel_test.go
A	control-plane/pkg/reconciler/channel/v2/channelv2.go
A	control-plane/pkg/reconciler/channel/v2/channelv2_test.go
M	control-plane/pkg/reconciler/sink/kafka_sink.go
M	control-plane/pkg/reconciler/sink/kafka_sink_test.go
M	control-plane/pkg/reconciler/trigger/trigger_test.go
M	data-plane/contract/src/main/java/dev/knative/eventing/kafka/broker/contract/DataPlaneContract.java
M	data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/reconciler/impl/ResourcesReconcilerImpl.java
M	proto/contract.proto
Falling back to patching base and 3-way merge...
Auto-merging proto/contract.proto
Auto-merging data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/reconciler/impl/ResourcesReconcilerImpl.java
CONFLICT (content): Merge conflict in data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/reconciler/impl/ResourcesReconcilerImpl.java
Auto-merging data-plane/contract/src/main/java/dev/knative/eventing/kafka/broker/contract/DataPlaneContract.java
CONFLICT (content): Merge conflict in data-plane/contract/src/main/java/dev/knative/eventing/kafka/broker/contract/DataPlaneContract.java
Auto-merging control-plane/pkg/reconciler/trigger/trigger_test.go
Auto-merging control-plane/pkg/reconciler/sink/kafka_sink_test.go
Auto-merging control-plane/pkg/reconciler/sink/kafka_sink.go
CONFLICT (modify/delete): control-plane/pkg/reconciler/channel/v2/channelv2_test.go deleted in HEAD and modified in Handle host headers in dataplane for identification of channel instances. Version Handle host headers in dataplane for identification of channel instances of control-plane/pkg/reconciler/channel/v2/channelv2_test.go left in tree.
CONFLICT (modify/delete): control-plane/pkg/reconciler/channel/v2/channelv2.go deleted in HEAD and modified in Handle host headers in dataplane for identification of channel instances. Version Handle host headers in dataplane for identification of channel instances of control-plane/pkg/reconciler/channel/v2/channelv2.go left in tree.
Auto-merging control-plane/pkg/reconciler/channel/channel_test.go
Auto-merging control-plane/pkg/reconciler/channel/channel.go
Auto-merging control-plane/pkg/reconciler/broker/broker_test.go
Auto-merging control-plane/pkg/reconciler/broker/broker.go
Auto-merging control-plane/pkg/contract/contract.pb.go
CONFLICT (content): Merge conflict in control-plane/pkg/contract/contract.pb.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Handle host headers in dataplane for identification of channel instances
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.2

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.

pierDipi pushed a commit to pierDipi/eventing-kafka-broker that referenced this pull request May 12, 2022
knative-prow bot pushed a commit that referenced this pull request May 12, 2022
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/control-plane area/data-plane 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

4 participants