-
Notifications
You must be signed in to change notification settings - Fork 588
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 deprecated httpclient msgsender #7018
Remove deprecated httpclient msgsender #7018
Conversation
Hi @g1rjeevan. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
cmd/heartbeats/main.go
Outdated
@@ -222,7 +222,10 @@ func main() { | |||
|
|||
// maybeQuitIstioProxy shuts down Istio's proxy when available. | |||
func maybeQuitIstioProxy() { | |||
_, err := http.DefaultClient.Get("http://localhost:15020/quitquitquit") | |||
req, _ := http.NewRequest(http.MethodPost, "http://localhost:15020/quitquitquit", nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we are switching from making a GET
request to making a POST
request here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, This is the code after taking merge from main, It must be already in the main branch since it mentioned as outdated. Can you confirm once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I was looking at an outdated diff - sorry for the confusion!
@@ -31,7 +31,10 @@ func main() { | |||
} | |||
|
|||
func maybeQuitIstioProxy() { | |||
_, err := http.DefaultClient.Get("http://localhost:15020/quitquitquit") | |||
req, _ := http.NewRequest(http.MethodPost, "http://localhost:15020/quitquitquit", nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, should this also be a GET
request still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here as the other one.
Thanks for the contribution @g1rjeevan! Welcome! 🎉 |
/ok-to-test |
Hey @g1rjeevan it looks like the ingress handler and some of the tests need to be updated to reflect removing the httpclient msgsender:
|
|
In order to change these tests cases, there are pre-tasks that need to be completed. |
Hey @g1rjeevan, eventing/pkg/inmemorychannel/message_dispatcher_test.go Lines 262 to 275 in a4f0c10
|
Sure. Will push the update. |
|
|
|
|
Removed message sender usage from message dispatcher test Removed message sender usage from message dispatcher test
2d23659
to
a2b7256
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the tests are now passing!
/lgtm
/cc @creydr
/assign @g1rjeevan |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #7018 +/- ##
==========================================
- Coverage 78.34% 78.21% -0.13%
==========================================
Files 250 248 -2
Lines 13320 13245 -75
==========================================
- Hits 10435 10360 -75
Misses 2355 2355
Partials 530 530
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides of the comments I have, I am wondering if we should wait with merging this for after the release cut (in a few days), just to make sure if any of the subprojects is using this, they have time with fixing it (IIRC rabbitmq-broker was using it).
Btw @g1rjeevan unless there are merge conflicts between this branch and the main branch, you don't need to worry about merging main into your branch - the Prow bot will take care of it when it goes to merge the PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@g1rjeevan Thanks for your work so far 👍
Could you fix the lint errors in pkg/kncloudevents/http_client_new_test.go
too? You can see the issues, when you're on the "Files changed" tab on your PR and then check on the annotations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your work @g1rjeevan and your patience!
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Cali0707, creydr, g1rjeevan 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 |
/retest |
@creydr @Cali0707 @lberk Thank you for your assistance in the contribution, and I am eager to engage further with Knative. |
That is great to hear @g1rjeevan 🎉 Most of our projects have issues labeled with |
## Proposed Changes Removed the legacy http client go, message sender go and respective test files, Since the functionality are handled in http client new and message sender new go Issue related : knative#6995 - 🗑️ Remove feature or internal logic - - - ### Pre-review Checklist - [x] **At least 80% unit test coverage** - [ ] **E2E tests** for any new behavior - [ ] **Docs PR** for any user-facing impact - [ ] **Spec PR** for any new API feature - [ ] **Conformance test** for any change to the spec **Release Note** ```release-note ``` **Docs** 📖 knative#6995 --------- Co-authored-by: Christoph Stäbler <[email protected]>
* Remove deprecated httpclient msgsender (knative#7018) ## Proposed Changes Removed the legacy http client go, message sender go and respective test files, Since the functionality are handled in http client new and message sender new go Issue related : knative#6995 - 🗑️ Remove feature or internal logic - - - ### Pre-review Checklist - [x] **At least 80% unit test coverage** - [ ] **E2E tests** for any new behavior - [ ] **Docs PR** for any user-facing impact - [ ] **Spec PR** for any new API feature - [ ] **Conformance test** for any change to the spec **Release Note** ```release-note ``` **Docs** 📖 knative#6995 --------- Co-authored-by: Christoph Stäbler <[email protected]> * Refactor kncloudevents and add `SendEvent` function (knative#7092) Adds a function (`SendEvent`) to the kncloudevents package to Send events. This function: * configures the client (e.g. for TLS) * has option to send replies * has option to send to a DLS * has option to add additional transformers This allows e.g. for use cases like the following: ``` kncloudevents.SendEvent(ctx, event, sub.Subscriber, kncloudevents.WithHeader(additionalHeaders), kncloudevents.WithReply(sub.Reply), kncloudevents.WithDeadLetterSink(sub.DeadLetter), kncloudevents.WithRetryConfig(sub.RetryConfig)) ``` The `SendMessage` function is provided to make integration with existing packages easier (e.g. in dependent projects). Also migrated the usages of kncloudevents.NewCloudEventRequest() to the new SendEvent() function (mt-broker-filter and mt-broker-ingress): * 74c1552 * 9728713 * 958722d * Remove deprecated kncloudevents.CloudEventsRequest (knative#7146) * Remove kncloudevents.CloudEventsRequest * Run hack/update-codegen.sh * Add unit tests for generateBackoffFn() * Fix event dispatcher library data race (knative#7280) Fix dispatcher data race Signed-off-by: Pierangelo Di Pilato <[email protected]> --------- Signed-off-by: Pierangelo Di Pilato <[email protected]> Co-authored-by: Jeevan <[email protected]> Co-authored-by: Christoph Stäbler <[email protected]>
Proposed Changes
Removed the legacy http client go, message sender go and respective test files, Since the functionality are handled in http client new and message sender new go
Issue related : #6995
🗑️ Remove feature or internal logic
Pre-review Checklist
Release Note
Docs
📖 #6995