From 1f3103e6baffbee378d994268cdaa5afd9e9a3ab Mon Sep 17 00:00:00 2001 From: daveoconnor Date: Mon, 4 Aug 2025 09:44:00 -0700 Subject: [PATCH] 404 redirects updates (#1860) --- kube/boost/templates/configmap-nginx.yaml | 75 ++++++++++++++--------- kube/boost/values-cppal-dev-gke.yaml | 1 + kube/boost/values-production-gke.yaml | 1 + kube/boost/values-stage-gke.yaml | 1 + kube/boost/values.yaml | 1 + 5 files changed, 51 insertions(+), 28 deletions(-) diff --git a/kube/boost/templates/configmap-nginx.yaml b/kube/boost/templates/configmap-nginx.yaml index 62adf7f6..fb8512f3 100644 --- a/kube/boost/templates/configmap-nginx.yaml +++ b/kube/boost/templates/configmap-nginx.yaml @@ -136,39 +136,58 @@ data: location = /build/ { return 301 /tools/build/; } location = /more/lib_guide.htm { return 301 /doc/contributor-guide/index.html; } + # Generalized rules for simple libs patterns, + # TODO: needs matching development if combining is to be worked back into redirect generation branch or + # adding to the exclusion list if kept here as an unreplaced block + location ~ ^/doc/libs/(\\d+)_(\\d+)_(\\d+)/libs/([^/]+)/(example|src|test)$ { return 301 https://github.com/boostorg/$4/tree/boost-$1.$2.$3/$5; } + location ~ ^/doc/libs/([^/]+)/libs/([^/]+)/(example|src|test)$ { return 301 https://github.com/boostorg/$2/tree/{{.Values.boostLatestRelease}}/$3; } + # the following block of locations are from the nginx redirect configuration script and # should be replaced with the newly generated block as a whole + # TODO: the version/unversioned pairing needs matching development if worked back into redirect generation branch location = /doc/libs/1.33.0/libs/spirit/example { return 301 https://github.com/boostorg/spirit/tree/boost-1.33.0/example; } location = /doc/libs/1.69.0/libs/beast/example/cppcon2018 { return 301 https://github.com/boostorg/beast/tree/boost-1.69.0/example/cppcon2018; } - location ~ ^/doc/libs/([^/]+)/boost/archive/detail$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1/include/boost/archive/detail; } - location ~ ^/doc/libs/([^/]+)/boost/archive/impl$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1/include/boost/archive/impl; } - location ~ ^/doc/libs/([^/]+)/boost/archive/iterators$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1/include/boost/archive/iterators; } - location ~ ^/doc/libs/([^/]+)/boost/compatibility/cpp_c_headers$ { return 301 https://github.com/boostorg/compatibility/tree/boost-$1/include/boost/compatibility/cpp_c_headers; } - location ~ ^/doc/libs/([^/]+)/libs/beast/example$ { return 301 https://github.com/boostorg/beast/tree/boost-$1/example; } - location ~ ^/doc/libs/([^/]+)/libs/beast/example/websocket/server/chat-multi$ { return 301 https://github.com/boostorg/beast/tree/boost-$1/example/websocket/server/chat-multi; } - location ~ ^/doc/libs/([^/]+)/libs/bimap/example$ { return 301 https://github.com/boostorg/bimap/tree/boost-$1/example; } - location ~ ^/doc/libs/([^/]+)/libs/filesystem/doc/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/doc/src; } - location ~ ^/doc/libs/([^/]+)/libs/filesystem/example$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/example; } - location ~ ^/doc/libs/([^/]+)/libs/filesystem/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/src; } - location ~ ^/doc/libs/([^/]+)/libs/filesystem/v2/example$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/v2/example; } - location ~ ^/doc/libs/([^/]+)/libs/filesystem/v2/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/v2/src; } - location ~ ^/doc/libs/([^/]+)/libs/filesystem/v3/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/v3/src; } - location ~ ^/doc/libs/([^/]+)/libs/iostreams/build$ { return 301 https://github.com/boostorg/iostreams/tree/boost-$1/build; } - location ~ ^/doc/libs/([^/]+)/libs/python/build/VisualStudio$ { return 301 https://github.com/boostorg/python/tree/boost-$1/build/VisualStudio; } - location ~ ^/doc/libs/([^/]+)/libs/python/example$ { return 301 https://github.com/boostorg/python/tree/boost-$1/example; } - location ~ ^/doc/libs/([^/]+)/libs/python/test$ { return 301 https://github.com/boostorg/python/tree/boost-$1/test; } - location ~ ^/doc/libs/([^/]+)/libs/regex/test/captures$ { return 301 https://github.com/boostorg/regex/tree/boost-$1/test/captures; } - location ~ ^/doc/libs/([^/]+)/libs/regex/test/concepts$ { return 301 https://github.com/boostorg/regex/tree/boost-$1/test/concepts; } - location ~ ^/doc/libs/([^/]+)/libs/regex/test/pathology$ { return 301 https://github.com/boostorg/regex/tree/boost-$1/test/pathology; } - location ~ ^/doc/libs/([^/]+)/libs/regex/test/regress$ { return 301 https://github.com/boostorg/regex/tree/boost-$1/test/regress; } - location ~ ^/doc/libs/([^/]+)/libs/serialization/src$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1/src; } - location ~ ^/doc/libs/([^/]+)/libs/sort/example$ { return 301 https://github.com/boostorg/sort/tree/boost-$1/example; } - location ~ ^/doc/libs/([^/]+)/libs/spirit/example/qi/mini_xml_samples$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1/example/qi/mini_xml_samples; } - location ~ ^/doc/libs/([^/]+)/libs/spirit/example/support/utree$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1/example/support/utree; } - location ~ ^/doc/libs/([^/]+)/libs/spirit/example/x3/rexpr/rexpr_full$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1/example/x3/rexpr/rexpr_full; } - location ~ ^/doc/libs/([^/]+)/tools/boostbook$ { return 301 https://github.com/boostorg/boostbook/tree/boost-$1; } - location ~ ^/doc/libs/([^/]+)/tools/build/v2/example/customization$ { return 301 https://github.com/boostorg/build/tree/boost-$1/v2/example/customization; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/boost/archive/detail$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1.$2.$3/include/boost/archive/detail; } + location ~ ^/doc/libs/([^/]+)/boost/archive/detail$ { return 301 https://github.com/boostorg/serialization/tree/{{.Values.boostLatestRelease}}/include/boost/archive/detail; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/boost/archive/impl$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1.$2.$3/include/boost/archive/impl; } + location ~ ^/doc/libs/([^/]+)/boost/archive/impl$ { return 301 https://github.com/boostorg/serialization/tree/{{.Values.boostLatestRelease}}/include/boost/archive/impl; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/boost/archive/iterators$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1.$2.$3/include/boost/archive/iterators; } + location ~ ^/doc/libs/([^/]+)/boost/archive/iterators$ { return 301 https://github.com/boostorg/serialization/tree/{{.Values.boostLatestRelease}}/include/boost/archive/iterators; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/boost/compatibility/cpp_c_headers$ { return 301 https://github.com/boostorg/compatibility/tree/boost-$1.$2.$3/include/boost/compatibility/cpp_c_headers; } + location ~ ^/doc/libs/([^/]+)/boost/compatibility/cpp_c_headers$ { return 301 https://github.com/boostorg/compatibility/tree/{{.Values.boostLatestRelease}}/include/boost/compatibility/cpp_c_headers; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/beast/example/websocket/server/chat-multi$ { return 301 https://github.com/boostorg/beast/tree/boost-$1.$2.$3/example/websocket/server/chat-multi; } + location ~ ^/doc/libs/([^/]+)/libs/beast/example/websocket/server/chat-multi$ { return 301 https://github.com/boostorg/beast/tree/{{.Values.boostLatestRelease}}/example/websocket/server/chat-multi; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/filesystem/doc/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1.$2.$3/doc/src; } + location ~ ^/doc/libs/([^/]+)/libs/filesystem/doc/src$ { return 301 https://github.com/boostorg/filesystem/tree/{{.Values.boostLatestRelease}}/doc/src; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/filesystem/v2/example$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1.$2.$3/v2/example; } + location ~ ^/doc/libs/([^/]+)/libs/filesystem/v2/example$ { return 301 https://github.com/boostorg/filesystem/tree/{{.Values.boostLatestRelease}}/v2/example; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/filesystem/v2/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1.$2.$3/v2/src; } + location ~ ^/doc/libs/([^/]+)/libs/filesystem/v2/src$ { return 301 https://github.com/boostorg/filesystem/tree/{{.Values.boostLatestRelease}}/v2/src; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/filesystem/v3/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1.$2.$3/v3/src; } + location ~ ^/doc/libs/([^/]+)/libs/filesystem/v3/src$ { return 301 https://github.com/boostorg/filesystem/tree/{{.Values.boostLatestRelease}}/v3/src; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/iostreams/build$ { return 301 https://github.com/boostorg/iostreams/tree/boost-$1.$2.$3/build; } + location ~ ^/doc/libs/([^/]+)/libs/iostreams/build$ { return 301 https://github.com/boostorg/iostreams/tree/{{.Values.boostLatestRelease}}/build; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/python/build/VisualStudio$ { return 301 https://github.com/boostorg/python/tree/boost-$1.$2.$3/build/VisualStudio; } + location ~ ^/doc/libs/([^/]+)/libs/python/build/VisualStudio$ { return 301 https://github.com/boostorg/python/tree/{{.Values.boostLatestRelease}}/build/VisualStudio; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/regex/test/captures$ { return 301 https://github.com/boostorg/regex/tree/boost-$1.$2.$3/test/captures; } + location ~ ^/doc/libs/([^/]+)/libs/regex/test/captures$ { return 301 https://github.com/boostorg/regex/tree/{{.Values.boostLatestRelease}}/test/captures; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/regex/test/concepts$ { return 301 https://github.com/boostorg/regex/tree/boost-$1.$2.$3/test/concepts; } + location ~ ^/doc/libs/([^/]+)/libs/regex/test/concepts$ { return 301 https://github.com/boostorg/regex/tree/{{.Values.boostLatestRelease}}/test/concepts; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/regex/test/pathology$ { return 301 https://github.com/boostorg/regex/tree/boost-$1.$2.$3/test/pathology; } + location ~ ^/doc/libs/([^/]+)/libs/regex/test/pathology$ { return 301 https://github.com/boostorg/regex/tree/{{.Values.boostLatestRelease}}/test/pathology; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/regex/test/regress$ { return 301 https://github.com/boostorg/regex/tree/boost-$1.$2.$3/test/regress; } + location ~ ^/doc/libs/([^/]+)/libs/regex/test/regress$ { return 301 https://github.com/boostorg/regex/tree/{{.Values.boostLatestRelease}}/test/regress; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/spirit/example/qi/mini_xml_samples$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1.$2.$3/example/qi/mini_xml_samples; } + location ~ ^/doc/libs/([^/]+)/libs/spirit/example/qi/mini_xml_samples$ { return 301 https://github.com/boostorg/spirit/tree/{{.Values.boostLatestRelease}}/example/qi/mini_xml_samples; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/spirit/example/support/utree$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1.$2.$3/example/support/utree; } + location ~ ^/doc/libs/([^/]+)/libs/spirit/example/support/utree$ { return 301 https://github.com/boostorg/spirit/tree/{{.Values.boostLatestRelease}}/example/support/utree; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/spirit/example/x3/rexpr/rexpr_full$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1.$2.$3/example/x3/rexpr/rexpr_full; } + location ~ ^/doc/libs/([^/]+)/libs/spirit/example/x3/rexpr/rexpr_full$ { return 301 https://github.com/boostorg/spirit/tree/{{.Values.boostLatestRelease}}/example/x3/rexpr/rexpr_full; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/tools/boostbook$ { return 301 https://github.com/boostorg/boostbook/tree/boost-$1.$2.$3; } + location ~ ^/doc/libs/([^/]+)/tools/boostbook$ { return 301 https://github.com/boostorg/boostbook/tree/{{.Values.boostLatestRelease}}; } + location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/tools/build/v2/example/customization$ { return 301 https://github.com/boostorg/build/tree/boost-$1.$2.$3/v2/example/customization; } + location ~ ^/doc/libs/([^/]+)/tools/build/v2/example/customization$ { return 301 https://github.com/boostorg/build/tree/{{.Values.boostLatestRelease}}/v2/example/customization; } # block end diff --git a/kube/boost/values-cppal-dev-gke.yaml b/kube/boost/values-cppal-dev-gke.yaml index d75038a5..fe76069b 100644 --- a/kube/boost/values-cppal-dev-gke.yaml +++ b/kube/boost/values-cppal-dev-gke.yaml @@ -7,6 +7,7 @@ nginxImageTag: "1.21-alpine" deploymentEnvironment: &env dev clientMaxBodySize: 250m +boostLatestRelease: "boost-1.88.0" replicaCount: "2" diff --git a/kube/boost/values-production-gke.yaml b/kube/boost/values-production-gke.yaml index f1e262a6..863e6441 100644 --- a/kube/boost/values-production-gke.yaml +++ b/kube/boost/values-production-gke.yaml @@ -7,6 +7,7 @@ nginxImageTag: "1.21-alpine" deploymentEnvironment: &env production clientMaxBodySize: 250m +boostLatestRelease: "boost-1.88.0" replicaCount: "2" diff --git a/kube/boost/values-stage-gke.yaml b/kube/boost/values-stage-gke.yaml index f27b53bd..ca5f901c 100644 --- a/kube/boost/values-stage-gke.yaml +++ b/kube/boost/values-stage-gke.yaml @@ -7,6 +7,7 @@ nginxImageTag: "1.21-alpine" deploymentEnvironment: &env stage clientMaxBodySize: 250m +boostLatestRelease: "boost-1.88.0" replicaCount: "2" diff --git a/kube/boost/values.yaml b/kube/boost/values.yaml index cea4eed2..4e09a7ae 100644 --- a/kube/boost/values.yaml +++ b/kube/boost/values.yaml @@ -7,6 +7,7 @@ nginxImageTag: "1.21-alpine" deploymentEnvironment: &env dev clientMaxBodySize: 250m +boostLatestRelease: "boost-1.88.0" replicaCount: "2"