From fb2fb06cf13383e07decad845da33ba4bc98cc7a Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Tue, 26 May 2026 11:04:44 +0200 Subject: [PATCH 1/3] fix: retry failed downloads --- lib/tasks/docs.thor | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/lib/tasks/docs.thor b/lib/tasks/docs.thor index 8dc32d85a9..aef72ed267 100644 --- a/lib/tasks/docs.thor +++ b/lib/tasks/docs.thor @@ -235,6 +235,7 @@ class DocsCLI < Thor puts 'Docs -- BEGIN' require 'open-uri' + require 'net/http' require 'thread' docs = Docs.all_versions @@ -250,15 +251,30 @@ class DocsCLI < Thor ['index.json', 'meta.json'].each do |filename| json = "https://documents.devdocs.io/#{doc.path}/#{filename}?#{time}" begin - URI.open(json, "Accept-Encoding" => "identity") do |file| - mutex.synchronize do - path = File.join(dir, filename) - File.write(path, file.read) + attempts = 0 + + begin + attempts += 1 + + URI.open(json, "Accept-Encoding" => "identity") do |file| + mutex.synchronize do + path = File.join(dir, filename) + File.write(path, file.read) + end end + rescue Net::OpenTimeout, Net::ReadTimeout => e + if attempts <= 3 + wait_seconds = 2**(attempts - 1) + puts "Docs -- Retrying #{json} in #{wait_seconds}s (#{e.class}: #{e.message})" + sleep(wait_seconds) + retry + end + + raise end rescue => e - puts "Docs -- Failed to download #{json}!" - throw e + puts "Docs -- Failed to download #{json} after #{attempts} attempts!" + raise end end From 83273c123a42cecce7a5493906e3b03c7b2ef734 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 26 May 2026 12:22:23 +0200 Subject: [PATCH 2/3] Update nginx documentation (1.31.1) --- lib/docs/scrapers/nginx.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/nginx.rb b/lib/docs/scrapers/nginx.rb index 323bc6d5de..d7bdf11131 100644 --- a/lib/docs/scrapers/nginx.rb +++ b/lib/docs/scrapers/nginx.rb @@ -2,7 +2,7 @@ module Docs class Nginx < UrlScraper self.name = 'nginx' self.type = 'nginx' - self.release = '1.30.0' + self.release = '1.31.1' self.base_url = 'https://nginx.org/en/docs/' self.links = { home: 'https://nginx.org/', From bdbbdb1b44ff1e1fada0abe3f1b0a15e38215810 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 26 May 2026 12:51:08 +0200 Subject: [PATCH 3/3] Update Node.js documentation (26.2.0) --- lib/docs/filters/node/clean_html.rb | 4 ++++ lib/docs/filters/node/entries.rb | 2 +- lib/docs/scrapers/node.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/docs/filters/node/clean_html.rb b/lib/docs/filters/node/clean_html.rb index 94ca39f666..3827fe0339 100644 --- a/lib/docs/filters/node/clean_html.rb +++ b/lib/docs/filters/node/clean_html.rb @@ -2,6 +2,10 @@ module Docs class Node class CleanHtmlFilter < Filter def call + unless at_css('h1') + at_css('h2').name = 'h1' + end + css('hr').remove css('pre').each do |node| diff --git a/lib/docs/filters/node/entries.rb b/lib/docs/filters/node/entries.rb index e5d508f7fc..45d581aae3 100644 --- a/lib/docs/filters/node/entries.rb +++ b/lib/docs/filters/node/entries.rb @@ -7,7 +7,7 @@ def get_name end def get_type - at_css('h2').content.strip + at_css('h1, h2').content.strip end def additional_entries diff --git a/lib/docs/scrapers/node.rb b/lib/docs/scrapers/node.rb index eeca5a5659..a0cea6a51a 100644 --- a/lib/docs/scrapers/node.rb +++ b/lib/docs/scrapers/node.rb @@ -24,7 +24,7 @@ class Node < UrlScraper HTML version do - self.release = '25.8.0' + self.release = '26.2.0' self.base_url = 'https://nodejs.org/api/' end