-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Test if auth host is reachable #11409
Conversation
a517436
to
872521a
Compare
/werft run 👍 started the job as gitpod-build-at-auth-host-reachable.2 |
872521a
to
ce93a51
Compare
return this.config.hostUrl.with({ pathname }).toString(); | ||
}; | ||
|
||
async isHostReachable(host: string) { | ||
return await isReachable(host, { timeout: 2000 }); |
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.
💯
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.
Approving the code to unblock. 🚀
/hold so we can test against actual self-hosted SCMs
BTW I tagged it I tested and verified that it's not possible to use github.com:433, gitlab.com:433 ✅ cc. @geropl |
Nice - this is a helpful improvement. Thanks @AlexTugarev. |
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.
I've done a few tests on it and it's working as expected - good work.
I created a GitLab instance on http://20.0.96.8:81/ and https://gitlab..com and was able to verify the connection ok. NB the IP address wasn't able to login as we require HTTPS, but the domain one worked fine.
/unhold I see no risk in just trying this out. |
👋 This is awesome and was a very quick turnaround! One question: Did we add something to the docs to indicate that this is now possible - for example in this section? |
Description
This PR removes a conservative host name validation using a plain regex. Instead we test and report if the host (optionally with port) is reachable.
Related Issue(s)
Improves the situation around #5305
How to test
Try configuring and using a Git Provider which is listening on a port other than the default 443, thus requires to specify a port.
Release Notes
Documentation
Werft options: