From a7ac1c8382555fdf15e902cf3f0eaf3a845e86da Mon Sep 17 00:00:00 2001 From: Joe Evans Date: Tue, 21 Dec 2021 07:14:26 -0800 Subject: [PATCH] Port #20786 from v1.9.x (#20787) * Update website for v1.9.x branch. * Update redirect to default to new 1.9.0 version of website docs. * Retry getting test data to prevent CI tests from failing - increase connect timeout from 10 to 60sec, increase retry delay from 0 (setting duplicated) to 30, increase retry attempts to 5. --- cpp-package/example/get_data.sh | 7 +++---- docs/static_site/src/.htaccess | 4 ++-- docs/static_site/src/_config.yml | 1 + docs/static_site/src/_config_beta.yml | 1 + docs/static_site/src/_config_prod.yml | 1 + .../src/_includes/get_started/get_started.html | 7 ++++--- .../src/_includes/get_started/linux/python/cpu/pip.md | 11 +++++++++-- .../src/_includes/get_started/linux/python/gpu/pip.md | 9 ++++++++- .../src/_includes/get_started/pip_snippet.md | 2 +- docs/static_site/src/pages/get_started/download.md | 3 ++- tools/dependencies/make_shared_dependencies.sh | 7 +++---- 11 files changed, 35 insertions(+), 18 deletions(-) diff --git a/cpp-package/example/get_data.sh b/cpp-package/example/get_data.sh index fda69ce2f087..ae427565ec55 100755 --- a/cpp-package/example/get_data.sh +++ b/cpp-package/example/get_data.sh @@ -33,11 +33,10 @@ download () { fi echo "Downloading ${URL} ..." - local CURL_OPTIONS="--connect-timeout 10 \ + local CURL_OPTIONS="--connect-timeout 60 \ --max-time 300 \ - --retry-delay 10 \ - --retry 3 \ - --retry-delay 0 \ + --retry-delay 30 \ + --retry 5 \ --location \ --silent" curl ${CURL_OPTIONS} ${URL} -o ${GZ_FILE_NAME} diff --git a/docs/static_site/src/.htaccess b/docs/static_site/src/.htaccess index 7e914349b3a5..ec84f5362100 100644 --- a/docs/static_site/src/.htaccess +++ b/docs/static_site/src/.htaccess @@ -39,12 +39,12 @@ RewriteOptions AllowNoSlash -# Set default website version to old stable (v1.8.0) +# Set default website version to old stable (v1.9.0) RewriteCond %{REQUEST_URI} !^/versions/ RewriteCond %{HTTP_REFERER} !mxnet.apache.org RewriteCond %{HTTP_REFERER} !mxnet.incubator.apache.org RewriteCond %{HTTP_REFERER} !mxnet.cdn.apache.org -RewriteRule ^(.*)$ /versions/1.8.0/$1 [r=307,L] +RewriteRule ^(.*)$ /versions/1.9.0/$1 [r=307,L] # Redirect Chinese visitors to Chinese CDN, temporary solution for slow site speed in China RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CN$ diff --git a/docs/static_site/src/_config.yml b/docs/static_site/src/_config.yml index 464eda16c959..74bb9e7b1808 100644 --- a/docs/static_site/src/_config.yml +++ b/docs/static_site/src/_config.yml @@ -40,6 +40,7 @@ youtube_username: apachemxnet baseurl: /versions/master versions: - master + - 1.9.0 - 1.8.0 - 1.7.0 - 1.6.0 diff --git a/docs/static_site/src/_config_beta.yml b/docs/static_site/src/_config_beta.yml index 283bd97e743c..b984e4dcd4a2 100644 --- a/docs/static_site/src/_config_beta.yml +++ b/docs/static_site/src/_config_beta.yml @@ -42,6 +42,7 @@ youtube_username: apachemxnet baseurl: /versions/master versions: - master + - 1.9.0 - 1.8.0 - 1.7.0 - 1.6.0 diff --git a/docs/static_site/src/_config_prod.yml b/docs/static_site/src/_config_prod.yml index 0139f9e385d2..081a4090f5d1 100644 --- a/docs/static_site/src/_config_prod.yml +++ b/docs/static_site/src/_config_prod.yml @@ -42,6 +42,7 @@ google_analytics: UA-96378503-1 baseurl: /versions/master versions: - master + - 1.9.0 - 1.8.0 - 1.7.0 - 1.6.0 diff --git a/docs/static_site/src/_includes/get_started/get_started.html b/docs/static_site/src/_includes/get_started/get_started.html index e4a0a625997e..933c9ce0c4cd 100644 --- a/docs/static_site/src/_includes/get_started/get_started.html +++ b/docs/static_site/src/_includes/get_started/get_started.html @@ -1,7 +1,7 @@