Skip to content

Conversation

@svenvg93
Copy link
Contributor

@svenvg93 svenvg93 commented Sep 18, 2024

📃 Description

In some setups, backup connections may be metered, making speed tests on these connections potentially costly. To avoid running tests on these connections, users can specify an IP address or IP subnet in a Docker environment to skip the tests.

We will use the following lookup: icanhazip.com

If these values match any of the specified settings in the Docker environment, the test will be marked as skipped.

A test will be marked as skipped if:

  • The current public IP is listed.
  • The current public IP falls within a listed subnet.

To close #1111

🪵 Changelog

➕ Added

  • Environment variables SPEEDTEST_SKIP_IP
    • User can set an IP, IP Subnet . For example SPEEDTEST_SKIP_IP=192.168.1.1;10.0.0.0/24;172.16.0.0/16"
  • Add a Result status Skipped
  • Add an Skip message to the results pop up
  • Add the retrieved IP to the data field, so it will been shown in the results table.

📷 Screenshots

Results table:
368730074-6f376009-7963-4fab-8b07-224f395304c5

When an Single IP is Set:
Skip_IP

When an IP Subnet is set (Still called Error message, this was changed later):
Skip_IP_Subnet

@publi0
Copy link

publi0 commented Sep 24, 2024

Any updates on this PR? This feature would significantly streamline my workflow. I'm currently using a custom solution, but I've been eagerly awaiting this implementation for a long time! Thank you again for working on this.

@svenvg93
Copy link
Contributor Author

svenvg93 commented Sep 25, 2024

It will need to be reviewed and tested. Due to the lack of time there is no ETA on this.

Also converting to a draft, as i want to add a visual representation of the skipped tests in the graphs. THat will be done after the open PR for graphs changes is merged in.

@svenvg93 svenvg93 marked this pull request as draft September 25, 2024 06:12
@publi0
Copy link

publi0 commented Sep 25, 2024

@svenvg93 I don't have any experience with PHP, but I'd be happy to try and help with the implementation if you think my Go and Java skills could be useful. ;)

@svenvg93
Copy link
Contributor Author

svenvg93 commented Sep 26, 2024

@svenvg93 I don't have any experience with PHP, but I'd be happy to try and help with the implementation if you think my Go and Java skills could be useful. ;)

Appreciate the offer! I might do the graphical part in a seperate PR to make testing easier.

@svenvg93 svenvg93 marked this pull request as ready for review September 26, 2024 07:09
@alexjustesen alexjustesen added the feature New feature or request label Oct 9, 2024
@svenvg93 svenvg93 changed the title [Feature] Skip test when Public IP or ISP is in an list [Feature] Skip test when Public IP is in an list Oct 10, 2024
@publi0
Copy link

publi0 commented Oct 29, 2024

@alexjustesen Any news on this PR? This would help me so much 😀

@luckman212
Copy link

@publi0 Did your feature get merged? I am hoping this one makes it in too, would be so helpful!

@alexjustesen alexjustesen changed the base branch from main to 1111-skip-test-when-public-ip-address-in-list November 19, 2024 23:47
@alexjustesen alexjustesen merged commit f096c0a into alexjustesen:1111-skip-test-when-public-ip-address-in-list Nov 19, 2024
@luckman212
Copy link

👍

alexjustesen added a commit that referenced this pull request Nov 20, 2024
* [Feature] Skip test when Public IP is in an list (#1714)

* first commit

* Commit it

* lint

* update-all-charts

* push_local_git

* add-timepicker

* add-some-predefined-ranges

* remove whiteline

* Add_env_for_chart_start

* change-env-and_time-ranges

* change_average_to_orange

* Revert "Add failed and thresholds"

* first commit

* change_api

* update comments

* Simplify

* Seperate the IP check

* extracted get external ip address to reusable action

* moved ip in range to network helper

* made skip ips config plural

* refactored speedtest job to use actions and helpers

* always show data message

* removed dup code

* fixed capturing error message

---------

Co-authored-by: Sven van Ginkel <[email protected]>
@svenvg93 svenvg93 deleted the feat/skip-when-ip-is-in-list branch November 20, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Don't run tests when the public IP exists in a list

4 participants