-
Notifications
You must be signed in to change notification settings - Fork 612
Used Port 0 to fix issue #7393 #7607
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
Conversation
Welcome @satyampsoni! It looks like this is your first PR to knative/eventing 🎉 |
Hi @satyampsoni. 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. |
/ok-to-test |
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 for working on this.
I left a comment.
Can you later also change it for the other tests using a hard coded port?
destination := duckv1.Addressable{ | ||
URL: apis.HTTPS("localhost:8334"), | ||
URL: apis.HTTPS(fmt.Sprintf("localhost:%d", destinationCA.Port())), |
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.
@satyampsoni destinationCA
is a string value (containing the CA cert of the server) and does not have a Port()
method.
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.
Hi @creydr
Thank you for your feedback on the code review. I noticed the issue with using Port()
on destinationCA
. To address this, I'm planning to use a separate variable, let's call it destinationPort
, to hold the dynamically assigned port.
Before proceeding, I wanted to confirm the availability of the destinationPort
variable. Could you please let me know if such a variable is already present in the codebase or if there is a recommended method for obtaining the dynamically assigned port?
Your clarification on this matter will help me ensure that I'm addressing the issue correctly.
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.
Before proceeding, I wanted to confirm the availability of the destinationPort variable. Could you please let me know if such a variable is already present in the codebase ...
Not sure, what you're trying to achieve 🤔 Can you give a bit more context 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.
sure
In my PR there is an issue with using Port()
on destinationCA
, and I'm working to address this by dynamically obtaining the assigned port. I plan to introduce a variable, destinationPort
, to hold this information when constructing the URL.
I'm interested in confirming if there is an existing variable similar to destinationPort
that is commonly used for holding dynamically assigned ports in our tests. Additionally, if there are any recommended patterns or best practices for obtaining the port dynamically, I would like to align with those.
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.
Ah ok I think I understand you now. I am not aware of a similar var to destinationPort
. Anyhow I would rather update the StartServer()
to return the port too.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: satyampsoni The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
/retest-required |
/retest |
@satyampsoni: The following test failed, say
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. |
@satyampsoni any updates on this? Do you need help with this? |
@creydr yep, |
This seems to be, as you simply return the given port to |
Thanks for the help. Have looked into it. I'll correct it once my exams are over after 12 Feb. |
Hi @satyampsoni any updates? Can I help here? |
@satyampsoni are you still working on this one? |
Closing this PR for now |
Fixes #7393