From 48c3da685ed9e85390e79b891298d967d702d4b9 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Fri, 19 Dec 2025 14:41:29 +0100 Subject: [PATCH] chore: disable link validation in mdox Link validation is too flaky because most sites now implement rate-limiting. Signed-off-by: Simon Pasquier --- .mdox.validate.yaml | 43 ++----------------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/.mdox.validate.yaml b/.mdox.validate.yaml index 442e04b17..908875eb2 100644 --- a/.mdox.validate.yaml +++ b/.mdox.validate.yaml @@ -6,51 +6,12 @@ random_delay: 1s explicitLocalValidators: true validators: - # Skip localhost examples. - - regex: 'localhost' - type: "ignore" - # docs.github.com returns 403 if not in browser. Cannot curl as well. - - regex: 'docs\.github\.com' - type: "ignore" - # Cloudflare protection, so returns 503 if not in browser. Cannot curl as well. - - regex: 'wise\.com' - type: "ignore" - # Adopters example link. - - regex: "our-link" - type: "ignore" - # 301 errors even when curl-ed. - - regex: "envoyproxy" - type: "ignore" - # Ignore release links. - - regex: 'https:\/\/github\.com\/prometheus-operator\/prometheus-operator\/releases' - type: "ignore" - # Ignore GitHub container packages link as it returns 404 in curl, but works in browser - - regex: 'https://github.com/prometheus-operator/prometheus-operator/pkgs/container/prometheus-operator' + # Ignore all external URLs because of rate-limiting protections which make the tests very flaky. + - regex: '^http(s)?://.+' type: "ignore" # Ignore links to /img/ because the generated content will resolve them correctly. - regex: '/img/.+' type: ignore - # Twitter changed their policy and now returns 403 if not authenticated. We can guarantee this link since we own the account. - - regex: 'https:\/\/twitter.com\/PromOperator' - type: ignore # Ignore anchor links pointing to the API documentation which are HTML tags and not supported by mdox. - regex: 'api\.md#monitoring\.coreos\.com/v1\.(BasicAuth|PrometheusSpec|StorageSpec)$' type: ignore - # Ignore dead links from Ambassador (soon to be removed). - - regex: 'getambassador' - type: ignore - # Ignore all github.com URLs because of rate limiting. - # TODO: find an alternative way to check these URLs avoiding the rate limiting. - - regex: 'github.com' - type: ignore - # Ignore all istio.io URLs because of http request timeout. - - regex: 'istio.io' - type: ignore - # Medium rejects bot's requests. - - regex: 'medium.com' - type: ignore - # Use the githubPullsIssues validator to avoid rate-limiting. - - regex: '(^http[s]?:\/\/)(www\.)?(github\.com\/)prometheus-operator\/prometheus-operator(\/pull\/|\/issues\/)' - type: githubPullsIssues - # The GitHub actions running mdox configure the GITHUB_TOKEN environment variable. - token: '$(GITHUB_TOKEN)'