-
Notifications
You must be signed in to change notification settings - Fork 1k
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
action: Add action to check bridge connectivity #1147
action: Add action to check bridge connectivity #1147
Conversation
I added a few things to make it respond better to user input.
I'm currently thinking about adding one more status for bridges where the server redirects requests. Here are a few impressions |
I am good with this ! |
actions/ConnectivityAction.php
Outdated
<head> | ||
<link | ||
rel="stylesheet" | ||
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" |
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 am not sure about linking to bootstap's CDNs tbh. If needed I'll do a CSS in another PR
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.
Do you mean to include the CSS files in the repository, or to replace Bootstrap entirely?
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.
Maybe include the CSS for now
Thanks for your feedback @teromene
I agree that the border between real tests and this action is somewhat blurry, but there is an important difference. Real tests run on Travis, while this action can be used on any server without having to install any third-party software. This has become very helpful to me for detecting bridges that simply don't work on my server (although they seem to work for others). I could even use this action to filter inaccessible sites/bridges from my whitelist. That said, we clearly need to limit the amount of functionality to keep it maintainable. Let me know if you find anything that should rather be left out. |
Appart from the CSS thing, LGTM |
It is currently not simply possible to check if the remote server for a bridge is reachable or not, which means some of the bridges might no longer work because the server is no longer on the internet. In order to find those bridges we can either check each bridge individually (which takes a lot of effort), or use an automated script to do this for us. If a server is no longer reachable it could mean that it is temporarily unavailable, or shutdown permanently. The results of this script will at least help identifying such servers.
Connectivity checks take a long time to execute and can require a lot of bandwidth. Therefore, administrators should be able to determine when and who is able to utilize this action. The best way to prevent regular users from accessing this action is by making it available in debug mode only (public servers should never run in debug mode anyway).
Also adds titles to status icons (Successful, Redirected, Inactive, Failed)
* action: Add action to check bridge connectivity It is currently not simply possible to check if the remote server for a bridge is reachable or not, which means some of the bridges might no longer work because the server is no longer on the internet. In order to find those bridges we can either check each bridge individually (which takes a lot of effort), or use an automated script to do this for us. If a server is no longer reachable it could mean that it is temporarily unavailable, or shutdown permanently. The results of this script will at least help identifying such servers. * [Connectivity] Use Bootstrap container to properly display contents * [Connectivity] Limit connectivity checks to debug mode Connectivity checks take a long time to execute and can require a lot of bandwidth. Therefore, administrators should be able to determine when and who is able to utilize this action. The best way to prevent regular users from accessing this action is by making it available in debug mode only (public servers should never run in debug mode anyway). * [Connectivity] Split implemenation into multiple files * [Connectivity] Make web page responsive to user input * [Connectivity] Make status message sticky * [Connectivity] Add icon to the status message * [contents] Add the ability for getContents to return header information * [Connectivity] Add header information to the reply Json data * [Connectivity] Add new status (blue) for redirected sites Also adds titles to status icons (Successful, Redirected, Inactive, Failed) * [Connectivity] Fix show doesn't work for inactive bridges * [Connectivity] Fix typo * [Connectivity] Catch errors in promise chains * [Connectivity] Allow search by status and update dynamically * [Connectivity] Add a progress bar * [Connectivity] Use bridge factory * [Connectivity] Import Bootstrap v4.3.1 CSS
It is currently not simply possible to check if the remote server for a bridge is reachable or not, which means some of the bridges might no longer work because the server is no longer on the internet.
In order to find those bridges we can either check each bridge individually (which takes a lot of effort), or use an automated script to do this for us.
If a server is no longer reachable it could mean that it is temporarily unavailable, or shutdown permanently. The results of this script will at least help identifying such servers.
This PR adds a new action
connectivity
which returns a page that checks each bridge individually. It only checks bridges on the whitelist and uses JavaScript to make the page somewhat responsive.Note that I didn't use PHPUnit for the testing because it doesn't make sense to fail tests on bridges unrelated to fixes. There might also be some benefit for administrators if they want to check if a bridge works on their servers.
The implementation is still very rough (more like a proof of concept). This is what the process looks like (on my end at least).
Pressing
[Show]
opens a new tab to the bridge on our front page.Disclaimer
I'm no JS programmer, so don't get too irritated by the implementation.
What is your opinion on this?
Should this be part of the repository?
Let me know if you have a better idea of detecting inoperable bridges.