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

[java] Schema HTTPS in Distributor, SessionQueue, SessionMap #13413

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented Jan 9, 2024

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

[java] Schema HTTPS in Distributor, SessionQueue, SessionMap

Motivation and Context

Downstream created a feat to enable HTTPS for Grid SeleniumHQ/docker-selenium#2080
However, when testing with distributed components, Router could not up due to wait for /readyz gets ready. This check requires Distributor, SessionMap, SessionQueue /readyz however there are hardcoded http in the schema when constructing the URL of those components. Added a check to switch the schema properly

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fffd05c) 58.07% compared to head (cb3c1b7) 58.07%.
Report is 2 commits behind head on trunk.

❗ Current head cb3c1b7 differs from pull request most recent head 9aac3b0. Consider uploading reports for the commit 9aac3b0 to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #13413   +/-   ##
=======================================
  Coverage   58.07%   58.07%           
=======================================
  Files          88       88           
  Lines        5340     5340           
  Branches      224      224           
=======================================
  Hits         3101     3101           
  Misses       2015     2015           
  Partials      224      224           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pujagani
Copy link
Contributor

pujagani commented Jan 9, 2024

This LGTM. However, @diemol Can you help confirm? Thank you!

@VietND96
Copy link
Member Author

VietND96 commented Jan 9, 2024

@pujagani, thanks for your review! By the way, after this change /readyz already passed in K8s probe. However, when session request comes, it fails immediately for reason
Runtime org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 401. Message: Unauthorized access attempted to
I am sure that basicAuth is disable, Grid UI didn't ask any authen. Do you have any suggestion what need to be checked?

@VietND96
Copy link
Member Author

VietND96 commented Jan 9, 2024

Ah ok, I found it, I enabled the registration secret. The same secret I already set for for Distributor, Router and Node. Let me check further what can be wrong

@VietND96
Copy link
Member Author

VietND96 commented Jan 9, 2024

Above issue only problem when missing --registration-secret set in SessionQueue component while performing the test

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Thank you. I think we can refactor some code to reuse it better.

@VietND96 VietND96 force-pushed the https branch 2 times, most recently from cbebb7e to 10d83bb Compare January 9, 2024 11:30
Signed-off-by: Viet Nguyen Duc <[email protected]>
@VietND96
Copy link
Member Author

VietND96 commented Jan 9, 2024

Thank you. I think we can refactor some code to reuse it better.

@diemol, thank you. Before I faced issues with symbols not found etc. However, it is simple only with bazel deps import 👍 Have a chance to familiarize with bazel. Code looks clean now. Can you review one more round.

@VietND96 VietND96 requested a review from diemol January 9, 2024 11:37
Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Thank you, @VietND96!

@diemol diemol merged commit 111086d into SeleniumHQ:trunk Jan 9, 2024
39 of 41 checks passed
@VietND96 VietND96 deleted the https branch January 9, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants