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

removing parse url from the get rabbitmqUrl function #1239

Merged

Conversation

gabo1208
Copy link
Contributor

Changes

  • 🎁 Now Brokers and Sources accept broader rabbitmq url usernames and passwords characters to connect to RabbitMQ instances

/kind bug

Fixes #1216

Release Note

Now Brokers and Sources accept broader rabbitmq url usernames and passwords characters to connect to RabbitMQ instances

… have special characters needed i.e when pulled from an active directory and the url does not fail to parse
@knative-prow knative-prow bot added kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 29, 2023
@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Merging #1239 (0ecb20d) into main (a58af36) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is 53.84%.

@@           Coverage Diff           @@
##             main    #1239   +/-   ##
=======================================
  Coverage   74.75%   74.75%           
=======================================
  Files          44       44           
  Lines        3430     3430           
=======================================
  Hits         2564     2564           
  Misses        765      765           
  Partials      101      101           
Files Coverage Δ
pkg/rabbit/exchange.go 100.00% <ø> (ø)
pkg/reconciler/broker/broker.go 86.26% <100.00%> (ø)
pkg/rabbit/service.go 29.25% <50.00%> (ø)

@gabo1208
Copy link
Contributor Author

@kvmware @dprotaso here I need to ignore the test coverage since it is not affecting anything reported by codecov

@dprotaso
Copy link
Contributor

dprotaso commented Oct 12, 2023

/override "codecov/patch"

@gabo1208 you should figure out how to configure the codecov so we don't need to override

I think the LGTM is what is missing here, you are right.

@knative-prow
Copy link

knative-prow bot commented Oct 12, 2023

@dprotaso: Overrode contexts on behalf of dprotaso: codecov/patch

In response to this:

/override "codecov/patch"

@gabo1208 you should figure out how to configure the codecov so we don't need to override

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.

@dprotaso
Copy link
Contributor

it also looks like it's not mandatory so you don't need to override it - so tide just needs an /lgtm

@gabo1208
Copy link
Contributor Author

/cherry-pick release-1.11

@knative-prow-robot
Copy link

@gabo1208: once the present PR merges, I will cherry-pick it on top of release-1.11 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.11

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.

@knative-extensions knative-extensions deleted a comment from knative-prow bot Oct 12, 2023
@dolfolife dolfolife assigned dolfolife and unassigned dolfolife Oct 17, 2023
Copy link

@dolfolife dolfolife left a comment

Choose a reason for hiding this comment

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

I wonder if doing url.QueryEscape on the username might be better than us not constructing (validating a URL)
For example https://go.dev/play/p/ol-loHQ3pRn

Copy link
Contributor

@ChunyiLyu ChunyiLyu left a comment

Choose a reason for hiding this comment

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

Just to check my understanding: the issue was user had a back slash in their credentials which is parsed as a special case by url.Parse and you’ve fixed it by removing url.Parse?

If you want to keep validating the URl as before, you could consider 1) adding username and password as separate fields to ExchangeArgs and keep RabbitMQURL as it is 2) construct the URL with url.URL first before converting it to string. I'm not sure if the URL is validated anywhere else. If it isn't, keeping the validation would be a safer option. You can take a look of messaging topology operator as a reference: https://github.com/rabbitmq/messaging-topology-operator/blob/main/rabbitmqclient/cluster_reference.go

It's been a while since I've looked at eventing. If the team is happy with the change please feel free to disregard my comment and go ahead 😀

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 18, 2023
@knative-prow
Copy link

knative-prow bot commented Oct 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ChunyiLyu, gabo1208

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 knative-prow bot merged commit 2314134 into knative-extensions:main Oct 18, 2023
23 of 24 checks passed
@knative-prow-robot
Copy link

@gabo1208: new pull request created: #1259

In response to this:

/cherry-pick release-1.11

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.

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. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not able to connect to RabbitMQ with a virtual host configured.
5 participants