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

Allow external uri to be configurable for components that support server functionality - #12491 #12508

Merged
merged 11 commits into from
Nov 6, 2023

Conversation

utamas
Copy link
Contributor

@utamas utamas commented Aug 7, 2023

SE nodes might be behind some sort of proxy exposed to hub on a different hostname(/ip) and/or port than component would by default report themselves (e.g.: hub and nodes are in different k8s clusters
and services are exposed via node ports).

Fixes #12491

Relevant update to docs is at SeleniumHQ/seleniumhq.github.io#1448

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.

@utamas utamas force-pushed the issue/12491 branch 4 times, most recently from 0410099 to 9dde64c Compare August 10, 2023 17:16
@diemol
Copy link
Member

diemol commented Aug 10, 2023

I left a comment on the issue. Have you checked it?

@utamas
Copy link
Contributor Author

utamas commented Aug 11, 2023

@diemol yes (although, I haven't tagged you)

@utamas utamas force-pushed the issue/12491 branch 2 times, most recently from 7d0743f to 61051d7 Compare August 14, 2023 05:05
@utamas utamas force-pushed the issue/12491 branch 3 times, most recently from 040c4ab to 980ebca Compare August 15, 2023 22:32
@diemol diemol added this to the 4.13 milestone Aug 28, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1182189) 57.65% compared to head (268e6f7) 57.65%.
Report is 7 commits behind head on trunk.

❗ Current head 268e6f7 differs from pull request most recent head d1ef0f1. Consider uploading reports for the commit d1ef0f1 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   #12508   +/-   ##
=======================================
  Coverage   57.65%   57.65%           
=======================================
  Files          86       86           
  Lines        5281     5281           
  Branches      208      208           
=======================================
  Hits         3045     3045           
  Misses       2028     2028           
  Partials      208      208           

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

@utamas utamas force-pushed the issue/12491 branch 2 times, most recently from 6c38b9b to 8391d9f Compare September 14, 2023 09:33
Copy link
Member

@joerg1985 joerg1985 left a comment

Choose a reason for hiding this comment

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

I think the URI should be an URL, so external-url might be a better parameter. Currently i don't have access to a dev system for the next days, so i am not able to make a real review, sorry.

@utamas
Copy link
Contributor Author

utamas commented Sep 18, 2023

@joerg1985 I'll make changes later today/tomorrow

@titusfortner
Copy link
Member

@utamas thanks for your work on this code. I'm trying to figure out what all we want to get into 4.14, does this have much more work to do?

@utamas
Copy link
Contributor Author

utamas commented Oct 6, 2023

Hi @titusfortner I think a simple renaming is the only thing that needs to be done. I'm starting that now.

utamas added a commit to utamas/selenium that referenced this pull request Oct 6, 2023
utamas added a commit to utamas/selenium that referenced this pull request Oct 6, 2023
@utamas
Copy link
Contributor Author

utamas commented Oct 6, 2023

@joerg1985 as I'm making my changes I can now see why I picked external-uri. The property I needed
to make a slight adjustment is called: org.openqa.selenium.grid.server.BaseServerOptions#getExternalUri.

Despite this I think URL is a more accurate representation, hence made the changes.

utamas added a commit to utamas/selenium that referenced this pull request Oct 6, 2023
@utamas
Copy link
Contributor Author

utamas commented Oct 6, 2023

@titusfortner and @joerg1985 please let me know if anything else needs to get done.

@titusfortner
Copy link
Member

@utamas yeah, looks like we have some failures in our Remote Build Java tests:

Executing tests from //java/test/org/openqa/selenium/grid/server:BaseServerOptionsTest
-----------------------------------------------------------------------------
Failures: 1
1) externalUriFailsForNonUriStrings() (org.openqa.selenium.grid.server.BaseServerOptionsTest)
org.opentest4j.AssertionFailedError: [External URI must be parseable as URI.] 
expected: "Supplied external URI is invalid: Illegal character in path at index 3: not a uri"
 but was: "Supplied external URI is invalid: Illegal character in path at index 3: not a URL"

utamas added a commit to utamas/selenium that referenced this pull request Oct 6, 2023
@utamas
Copy link
Contributor Author

utamas commented Oct 6, 2023

@titusfortner my bad. Run the test after rebase but not after changing the name.

utamas added a commit to utamas/selenium that referenced this pull request Oct 10, 2023
@utamas
Copy link
Contributor Author

utamas commented Oct 10, 2023

@titusfortner how can I make sure this makes it into next release?

@titusfortner
Copy link
Member

@joerg1985 can you take a look at this one?

@joerg1985
Copy link
Member

it look good to me, but i never approved a PR. so i am not totally sure what i have to check in this case.

utamas and others added 3 commits October 27, 2023 08:58
…ver functionality.

SE nodes might be behind some sort of proxy exposed to hub on a
different hostname(/ip) and/or port than component would by default
report themselves (e.g.: hub and nodes are in different k8s clusters
 and services are exposed via node ports).

Fixes SeleniumHQ#12491
@diemol diemol merged commit 945e4f4 into SeleniumHQ:trunk Nov 6, 2023
3 checks passed
@utamas
Copy link
Contributor Author

utamas commented Nov 8, 2023

Thank you guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🚀 Feature]: Make external URI configurable
6 participants