This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 1f4d75984f7 Restore downloads and archived PDFs from the public OSS
bucket (#4710)
1f4d75984f7 is described below
commit 1f4d75984f7a263a755b8b90570cb588da801ab5
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Wed Nov 25 00:48:34 2026 +0800
Restore downloads and archived PDFs from the public OSS bucket (#4710)
The download page currently disables binary packages while the temporary
recovery catalogue is empty. Restore core, ecosystem and archived
release downloads from the public-read `apache-doris-downloads` bucket,
preserving the original object keys and using its OSS
transfer-acceleration endpoint.
The explicit public availability mode enables configured download and
sidecar links without manufacturing per-file verification receipts.
Documentation links and commands use the same mirror; external Apache
source and Maven URLs keep their existing destinations. Staged verified
recovery remains supported.
Move the six archived documentation PDFs to
`doris-website/docs/archived/` in the same bucket. Keep the existing PDF
generation/upload workflow, update its uploader and delivery checks for
the public destination, and preserve the independent PDF base URL when
rewriting legacy archive links. Update the release validator and
publishing instructions accordingly. No archived source snapshots are
changed.
Validation:
- Related Node suites: 457 passed, one opt-in test skipped; updated
archive/download renderer tests: 14 passed.
- GitHub helper Python suite: 51 passed, including public PDF delivery,
range validation, source coverage and checksum rejection cases.
- Five-language representative production build and `verify-ci-sample`:
20 documents per language, without a full documentation build.
- Chromium: download/source/architecture/signature/tool/archive
interactions in all five languages and 80 theme/viewport layouts passed.
- The 557 known repository-referenced original release files return
anonymous HTTP 200 from the new endpoint with matching lengths. All six
PDFs were uploaded (350,355,424 bytes) and passed metadata, encryption,
CORS, accelerated/regional anonymous reads and original range-byte
checks. The PDF role has write permission only for archive prefixes; the
website role is unchanged.
- `git diff --check` and actionlint for the retained PDF workflow
passed.
The legacy `src/components/download-form/download-form-tools.test.js`
has four pre-existing failures on both this branch and unmodified
master: it expects untranslated JSX strings and older Operator version
lists. The browser checks above exercise those actual user flows. The
locally installed actionlint also rejects existing `concurrency.queue`
fields in three unrelated translation workflows; the PDF workflow passes
unchanged.
The object audit covers the known website references. It does not claim
a complete inventory comparison of the old account's bucket or
re-verification of all release GPG signatures.
Co-authored-by: morningman <[email protected]>
---
.github/scripts/test_upload_archived_pdfs.py | 38 +++++++++-
.github/scripts/upload_archived_pdfs.py | 24 +++---
config/archived-docs.json | 2 +-
config/download-recovery.json | 3 +-
.../add-release/scripts/validate-release.mjs | 2 +-
.../add-release/scripts/validate-release.test.mjs | 8 +-
scripts/docs-pdf/README.md | 16 ++--
.../__tests__/download-recovery-remark.test.cjs | 16 +++-
scripts/i18n/__tests__/download-recovery.test.cjs | 33 +++++++--
scripts/publish/README.md | 6 +-
scripts/publish/download-recovery.md | 86 ++++++++++++----------
src/constant/download.data.ts | 2 +-
src/utils/download-recovery.js | 7 +-
13 files changed, 161 insertions(+), 82 deletions(-)
diff --git a/.github/scripts/test_upload_archived_pdfs.py
b/.github/scripts/test_upload_archived_pdfs.py
index 6774c24c204..cc3a345b515 100644
--- a/.github/scripts/test_upload_archived_pdfs.py
+++ b/.github/scripts/test_upload_archived_pdfs.py
@@ -3,6 +3,7 @@ import json
from pathlib import Path
import tempfile
import unittest
+from unittest.mock import patch
spec = importlib.util.spec_from_file_location('archived_pdf_upload',
Path(__file__).with_name('upload_archived_pdfs.py'))
pdf = importlib.util.module_from_spec(spec)
@@ -34,11 +35,46 @@ class ArchiveUploadTests(unittest.TestCase):
return {'Header': {'Content-Length':
[str(entry['bytes'])], 'Content-Type': ['application/pdf'],
'X-Oss-Meta-Sha256': [entry['sha256']],
'X-Oss-Server-Side-Encryption': ['AES256']}}
records = pdf.upload(root, SHA, run=run)
- self.assertEqual(records[0]['key'], 'downloads/archived-docs/' +
file.name)
+ self.assertEqual(records[0]['key'], 'doris-website/docs/archived/'
+ file.name)
self.assertEqual(commands[0][2], 'oss://' + pdf.BUCKET + '/' +
records[0]['key'])
self.assertNotIn('--delete', commands[0])
self.assertNotIn('--object-acl', commands[0])
+ def test_public_pdf_endpoint_matches_the_website_configuration(self):
+ config = Path(__file__).resolve().parents[2] /
'config/archived-docs.json'
+ self.assertEqual(pdf.BASE, json.loads(config.read_text())['baseUrl'])
+
+ def
test_public_delivery_checks_accelerated_and_regional_reads_and_pdf_bytes(self):
+ with tempfile.TemporaryDirectory() as temporary:
+ root = Path(temporary)
+ file, _, entry = self.artifact(root)
+ key = pdf.PREFIX + file.name
+ record = {'key': key, 'bytes': entry['bytes']}
+ class Response:
+ def __init__(self, status, body=b''):
+ self.status = status
+ self.headers = {'Content-Type': 'application/pdf',
'Content-Length': str(entry['bytes']),
+ 'Access-Control-Allow-Origin':
'https://doris.apache.org'}
+ self.body = body
+ def __enter__(self):
+ return self
+ def __exit__(self, *args):
+ pass
+ def read(self, size):
+ return self.body[:size]
+ requests = []
+ def read(request, timeout):
+ requests.append(request)
+ return Response(206, file.read_bytes()) if
request.has_header('Range') else Response(200)
+ with patch.object(pdf, 'urlopen', side_effect=read):
+ pdf.verify_delivery([record], {key: file})
+ self.assertEqual(requests[0].full_url, pdf.BASE + file.name)
+ self.assertEqual(requests[1].get_header('Range'), 'bytes=0-1023')
+ self.assertEqual(requests[2].full_url, 'https://' + pdf.BUCKET +
'.oss-cn-beijing.aliyuncs.com/' + key)
+ with patch.object(pdf, 'urlopen', side_effect=[Response(200),
Response(206, b'wrong bytes')]):
+ with self.assertRaisesRegex(RuntimeError, 'range
verification'):
+ pdf.verify_delivery([record], {key: file})
+
def
test_incomplete_or_mismatched_exports_are_rejected_before_cloud_operations(self):
changes = [{'sample': True}, {'imageWarnings': ['unavailable image']},
{'sha256': '0' * 64},
{'documents': 2}, {'version': '2.0'}, {'locale': 'zh-CN'},
{'filename': '../secret.pdf'}]
diff --git a/.github/scripts/upload_archived_pdfs.py
b/.github/scripts/upload_archived_pdfs.py
index 0befedf6149..19f1d9546c3 100644
--- a/.github/scripts/upload_archived_pdfs.py
+++ b/.github/scripts/upload_archived_pdfs.py
@@ -6,12 +6,11 @@ import os
from pathlib import Path
import re
import subprocess
-from urllib.error import HTTPError
from urllib.request import Request, urlopen
-BUCKET = 'doris-website-assets-prod-bj'
-PREFIX = 'downloads/archived-docs/'
-BASE = 'https://assets-cdn.selectdb.com/' + PREFIX
+BUCKET = 'apache-doris-downloads'
+PREFIX = 'doris-website/docs/archived/'
+BASE = 'https://' + BUCKET + '.oss-accelerate.aliyuncs.com/' + PREFIX
def digest(file):
@@ -87,7 +86,7 @@ def upload(directory, source_sha, run=oss):
or headers.get('x-oss-server-side-encryption') != 'AES256'):
raise RuntimeError('Uploaded PDF metadata or encryption
verification failed')
records.append({'key': key, 'bytes': entry['bytes'], 'sha256':
entry['sha256']})
- print('Verified private PDF upload: ' + file.name, flush=True)
+ print('Verified archived PDF upload: ' + file.name, flush=True)
return records
@@ -100,19 +99,16 @@ def verify_delivery(records, files):
if (response.status != 200 or response.headers.get('Content-Type')
!= 'application/pdf'
or int(response.headers.get('Content-Length', -1)) !=
record['bytes']
or response.headers.get('Access-Control-Allow-Origin') !=
'https://doris.apache.org'):
- raise RuntimeError('CDN PDF delivery verification failed')
+ raise RuntimeError('Public PDF delivery verification failed')
with files[record['key']].open('rb') as stream:
expected = stream.read(1024)
with urlopen(Request(url, headers={'Range': 'bytes=0-1023'}),
timeout=30) as response:
if response.status != 206 or response.read(1024) != expected:
- raise RuntimeError('CDN PDF range verification failed')
- private = 'https://' + BUCKET + '.oss-cn-beijing.aliyuncs.com/' +
record['key']
- try:
- with urlopen(Request(private, method='HEAD'), timeout=30):
- raise RuntimeError('Anonymous OSS PDF read unexpectedly
succeeded')
- except HTTPError as error:
- if error.code != 403:
- raise RuntimeError('Expected anonymous OSS PDF access to be
denied') from None
+ raise RuntimeError('Public PDF range verification failed')
+ regional = 'https://' + BUCKET + '.oss-cn-beijing.aliyuncs.com/' +
record['key']
+ with urlopen(Request(regional, method='HEAD'), timeout=30) as response:
+ if response.status != 200 or
int(response.headers.get('Content-Length', -1)) != record['bytes']:
+ raise RuntimeError('Anonymous OSS PDF delivery verification
failed')
def main():
diff --git a/config/archived-docs.json b/config/archived-docs.json
index c4327cc3721..58134ff9786 100644
--- a/config/archived-docs.json
+++ b/config/archived-docs.json
@@ -1,5 +1,5 @@
{
- "baseUrl": "https://assets-cdn.selectdb.com/downloads/archived-docs/",
+ "baseUrl":
"https://apache-doris-downloads.oss-accelerate.aliyuncs.com/doris-website/docs/archived/",
"versions": ["2.1", "2.0", "1.2"],
"locales": ["en", "zh-CN"]
}
diff --git a/config/download-recovery.json b/config/download-recovery.json
index d9e742a7269..7a5c098b74d 100644
--- a/config/download-recovery.json
+++ b/config/download-recovery.json
@@ -1,5 +1,6 @@
{
"schemaVersion": 1,
- "baseUrl": "https://assets-cdn.selectdb.com/downloads/releases/",
+ "baseUrl": "https://apache-doris-downloads.oss-accelerate.aliyuncs.com/",
+ "availability": "public",
"objects": {}
}
diff --git a/doc-tools/skills/add-release/scripts/validate-release.mjs
b/doc-tools/skills/add-release/scripts/validate-release.mjs
index b37f0c7a511..b3aaa8bd498 100644
--- a/doc-tools/skills/add-release/scripts/validate-release.mjs
+++ b/doc-tools/skills/add-release/scripts/validate-release.mjs
@@ -435,7 +435,7 @@ export async function validateCoreRelease(options) {
const sourceDir =
options.sourceDir ||
'https://dist.apache.org/repos/dist/release/doris/' + series + '/' +
version + '/';
- const binaryOrigin = options.binaryOrigin ||
'https://assets-cdn.selectdb.com/downloads/releases/';
+ const binaryOrigin = options.binaryOrigin ||
'https://apache-doris-downloads.oss-accelerate.aliyuncs.com/';
const checkLinks = options.checkLinks !== false;
const checkGitRouting = options.checkGitRouting !== false;
const checks = [];
diff --git a/doc-tools/skills/add-release/scripts/validate-release.test.mjs
b/doc-tools/skills/add-release/scripts/validate-release.test.mjs
index fabb3a505b6..a92729f7a5b 100644
--- a/doc-tools/skills/add-release/scripts/validate-release.test.mjs
+++ b/doc-tools/skills/add-release/scripts/validate-release.test.mjs
@@ -18,9 +18,9 @@ function packageRows(version, sourceVersion) {
return ['x64', 'x64-noavx2', 'arm64']
.map(
arch => `{
- gz:
'https://assets-cdn.selectdb.com/downloads/releases/apache-doris-${version}-bin-${arch}.tar.gz',
- asc:
'https://assets-cdn.selectdb.com/downloads/releases/apache-doris-${version}-bin-${arch}.tar.gz.asc',
- sha512:
'https://assets-cdn.selectdb.com/downloads/releases/apache-doris-${version}-bin-${arch}.tar.gz.sha512',
+ gz:
'https://apache-doris-downloads.oss-accelerate.aliyuncs.com/apache-doris-${version}-bin-${arch}.tar.gz',
+ asc:
'https://apache-doris-downloads.oss-accelerate.aliyuncs.com/apache-doris-${version}-bin-${arch}.tar.gz.asc',
+ sha512:
'https://apache-doris-downloads.oss-accelerate.aliyuncs.com/apache-doris-${version}-bin-${arch}.tar.gz.sha512',
source:
'https://dist.apache.org/repos/dist/release/doris/${version
.split('.')
.slice(0, 2)
@@ -78,7 +78,7 @@ function createFixture({
write(
root,
'src/constant/download.data.ts',
- `export const ORIGIN =
'https://assets-cdn.selectdb.com/downloads/releases/';
+ `export const ORIGIN =
'https://apache-doris-downloads.oss-accelerate.aliyuncs.com/';
// A doc comment that names ALL_VERSIONS must not confuse the array extractor.
export const ACTIVE_CORE_BRANCHES: string[] = [${branchList}];
diff --git a/scripts/docs-pdf/README.md b/scripts/docs-pdf/README.md
index 27ebe0deee4..9e0c927e5d2 100644
--- a/scripts/docs-pdf/README.md
+++ b/scripts/docs-pdf/README.md
@@ -174,7 +174,7 @@ Set these repository Actions variables before enabling
uploads:
| Variable | Value |
| --- | --- |
| `ALIYUN_OIDC_PROVIDER_ARN` | The Alibaba Cloud GitHub OIDC provider ARN. |
-| `ALIYUN_WEBSITE_PDF_ROLE_ARN` | A separate role restricted to
`downloads/archived-docs/` in `doris-website-assets-prod-bj`. Trust only
`repo:apache/doris-website:ref:refs/heads/master` and audience
`sts.aliyuncs.com`. |
+| `ALIYUN_WEBSITE_PDF_ROLE_ARN` | A separate role restricted to
`doris-website/docs/archived/` in `apache-doris-downloads`. Trust only
`repo:apache/doris-website:ref:refs/heads/master` and audience
`sts.aliyuncs.com`. |
| `WEBSITE_PDF_UPLOAD_ENABLED` | `true` to upload verified PDFs; `false` to
generate artifacts only. |
The PDF role needs bucket location, listing restricted to the PDF prefix, and
@@ -184,14 +184,16 @@ action and short-lived OIDC credentials. It does not
require an Environment or
an AK/SK secret. The website upload role keeps its existing `site/`
permissions.
The uploader rejects samples, missing images, checksum mismatches and source
-commit mismatches. Successful uploads retain private OSS ACLs and AES256
-encryption. The public URLs use the base in `config/archived-docs.json`.
+commit mismatches. Successful uploads inherit the bucket's public-read ACL and
+use its default AES256 encryption. Anonymous writes remain prohibited. Enable
+OSS transfer acceleration and GET/HEAD CORS for `https://doris.apache.org` on
+this bucket. The public URLs use the base in `config/archived-docs.json`.
Website and PDF uploads share a concurrency group. A deploy-only retry selects
the successful build's artifact ID, including when the run attempt changes.
-Existing PDF URLs can remain cached for up to an hour after replacement. If
-the CDN byte check sees an older copy, have a CDN administrator refresh the
-affected URLs, or wait for cache expiry and retry the deployment job. The PDF
-role cannot change CDN configuration or refresh unrelated resources.
+Existing PDF URLs can remain cached in browsers for up to an hour after
+replacement. Delivery checks verify anonymous reads from both the accelerated
+and regional OSS endpoints, plus the first PDF byte range. The PDF role cannot
+change bucket ACLs or CDN configuration.
`config/restored-assets.json` maps recovered original images and datasets to
their new CDN paths during PDF rendering. Archived source snapshots stay
diff --git a/scripts/i18n/__tests__/download-recovery-remark.test.cjs
b/scripts/i18n/__tests__/download-recovery-remark.test.cjs
index fe73e030ee6..3c5fd111f43 100644
--- a/scripts/i18n/__tests__/download-recovery-remark.test.cjs
+++ b/scripts/i18n/__tests__/download-recovery-remark.test.cjs
@@ -3,7 +3,9 @@ const assert = require('node:assert/strict');
const React = require('react');
const {renderToStaticMarkup} = require('react-dom/server');
const jsx = require('react/jsx-runtime');
-const recovery = require('../../../config/download-recovery.json');
+const production = require('../../../config/download-recovery.json');
+const recovery = {...production, baseUrl:
'https://assets-cdn.selectdb.com/downloads/releases/',
+ availability: 'verified', objects: {}};
const plugin = require('../download-recovery-remark.cjs');
const key = 'apache-doris-4.1.5-bin-x64.tar.gz';
const old = 'https://apache-doris-releases.oss-accelerate.aliyuncs.com/' + key;
@@ -36,6 +38,18 @@ test('verified files remain real links and do not produce a
missing-file notice'
assert(!html.includes('aria-disabled'));
});
+test('public mirror links, sidecars and commands render without unavailable
notices', async () => {
+ const html = await
render(`[Binary](${old})\n\n[ASC](${old}.asc)\n\n[SHA-512](${old}.sha512)\n\n`
+ + `<a href="${old}">Download</a>\n\n\`\`\`sh\nwget ${old}\n\`\`\``,
{catalog: production});
+ for (const suffix of ['', '.asc', '.sha512']) {
+ assert(html.includes(`href="${production.baseUrl + key + suffix}"`));
+ }
+ assert(html.includes('wget ' + production.baseUrl + key));
+
assert(!html.includes('apache-doris-releases.oss-accelerate.aliyuncs.com'));
+ assert(!html.includes('role="note"'));
+ assert(!html.includes('aria-disabled'));
+});
+
test('native MDX anchors with static download attributes cannot keep broken
active links', async () => {
for (const href of [`"${old}"`, `{'${old}'}`]) {
const html = await render(`<a href=${href}>Binary</a>`, {locale: 'ja',
label: '利用不可'});
diff --git a/scripts/i18n/__tests__/download-recovery.test.cjs
b/scripts/i18n/__tests__/download-recovery.test.cjs
index 9e713fdc33f..d80a12ca225 100644
--- a/scripts/i18n/__tests__/download-recovery.test.cjs
+++ b/scripts/i18n/__tests__/download-recovery.test.cjs
@@ -5,25 +5,44 @@ const path = require('node:path');
const {isDownloadAvailable, migrateDownloadUrls, missingDownloads} =
require('../../../src/utils/download-recovery');
const recovery = require('../../../config/download-recovery.json');
const key = 'apache-doris-4.1.5-bin-x64.tar.gz';
+const staged = {...recovery, baseUrl:
'https://assets-cdn.selectdb.com/downloads/releases/',
+ availability: 'verified', objects: {}};
test('unrestored distributions remain unavailable until their exact file is
verified', () => {
- assert.equal(isDownloadAvailable(recovery.baseUrl + key), false);
+ assert.equal(isDownloadAvailable(staged.baseUrl + key, staged), false);
const valid = {bytes: 123, sha256: 'a'.repeat(64), verified: true};
- const catalog = {...recovery, objects: {[key]: valid}};
- assert.equal(isDownloadAvailable(recovery.baseUrl + key, catalog), true);
- assert.equal(isDownloadAvailable(recovery.baseUrl + key + '.asc',
catalog), false);
+ const catalog = {...staged, objects: {[key]: valid}};
+ assert.equal(isDownloadAvailable(staged.baseUrl + key, catalog), true);
+ assert.equal(isDownloadAvailable(staged.baseUrl + key + '.asc', catalog),
false);
for (const change of [{verified: false}, {verified: 'true'}, {bytes: 0},
{bytes: -1}, {sha256: 'unknown'}]) {
- assert.equal(isDownloadAvailable(recovery.baseUrl + key,
+ assert.equal(isDownloadAvailable(staged.baseUrl + key,
{...catalog, objects: {[key]: {...valid, ...change}}}), false);
}
});
+test('the public release mirror restores package, signature, checksum and tool
links without per-file receipts', () => {
+ assert.equal(recovery.baseUrl,
'https://apache-doris-downloads.oss-accelerate.aliyuncs.com/');
+ assert.equal(recovery.availability, 'public');
+ for (const file of [key, key + '.asc', key + '.sha512',
'extension/logstash-output-doris-1.2.0.gem']) {
+ assert.equal(isDownloadAvailable(recovery.baseUrl + file), true, file);
+ }
+ assert.deepEqual(missingDownloads('wget
https://apache-doris-releases.oss-accelerate.aliyuncs.com/' + key), []);
+});
+
test('retired storage and unexpected managed URLs cannot become active
download links', () => {
for (const url of [undefined, '', 'not a URL', 'javascript:alert(1)',
'https://apache-doris-releases.oss-accelerate.aliyuncs.com/' + key,
'http://apache-doris-releases.oss-cn-hangzhou.aliyuncs.com/' + key,
- recovery.baseUrl.replace('https:', 'http:') + key,
+ staged.baseUrl.replace('https:', 'http:') + key,
'https://assets-cdn.selectdb.com/wrong/' + key,
+ staged.baseUrl + key + '?token=unused', staged.baseUrl + key +
'#fragment']) {
+ assert.equal(isDownloadAvailable(url, staged), false, String(url));
+ }
+});
+
+test('public mirror links still reject empty paths, directory listings and
unexpected URL components', () => {
+ for (const url of [undefined, '', recovery.baseUrl, recovery.baseUrl +
'extension/',
+ recovery.baseUrl.replace('https:', 'http:') + key,
recovery.baseUrl + key + '?token=unused', recovery.baseUrl + key +
'#fragment']) {
assert.equal(isDownloadAvailable(url), false, String(url));
}
@@ -44,6 +63,6 @@ test('the catalogue and recovery receipts use the same
distribution base URL', (
test('archive PDFs retain their independent prefix rather than becoming
release-package links', () => {
const old =
'https://apache-doris-releases.oss-accelerate.aliyuncs.com/archived-docs/apache-doris-2.1-en.pdf';
const current = migrateDownloadUrls(old);
- assert.equal(current,
'https://assets-cdn.selectdb.com/downloads/archived-docs/apache-doris-2.1-en.pdf');
+ assert.equal(current,
'https://apache-doris-downloads.oss-accelerate.aliyuncs.com/doris-website/docs/archived/apache-doris-2.1-en.pdf');
assert.deepEqual(missingDownloads(current), []);
});
diff --git a/scripts/publish/README.md b/scripts/publish/README.md
index fc619fb583b..cd9ac7cbedb 100644
--- a/scripts/publish/README.md
+++ b/scripts/publish/README.md
@@ -130,8 +130,8 @@ deployment does not look for a new artifact under the
retry's run-attempt name.
This behavior applies to runs created with the artifact-ID workflow changes.
The archived PDF workflow exports repository snapshots and uses a separate
-role restricted to `downloads/archived-docs/`; see
+role restricted to `apache-doris-downloads/doris-website/docs/archived/`; see
[`scripts/docs-pdf/README.md`](../docs-pdf/README.md). Distribution packages
-remain unavailable until their original files and signatures have been
-recovered and verified. The catalog and recovery procedure are documented in
+use the public-read release mirror. Complete and check the bucket replication
+before deploying the endpoint change. The catalog and recovery procedure are
documented in
[`download-recovery.md`](download-recovery.md).
diff --git a/scripts/publish/download-recovery.md
b/scripts/publish/download-recovery.md
index fc4d57f69cf..d3ebf0c3229 100644
--- a/scripts/publish/download-recovery.md
+++ b/scripts/publish/download-recovery.md
@@ -1,39 +1,47 @@
-# Restore distribution downloads
-
-The retired release bucket cannot serve as the source for the new CDN.
-Website builds regenerate static site assets. They cannot reproduce an
-official binary release and its original signature.
-
-`config/download-recovery.json` records restored distribution objects beneath
-`https://assets-cdn.selectdb.com/downloads/releases/`. An empty `objects` map
-means none of those objects have passed recovery verification. The download
-forms disable unavailable files and their signatures. Existing Apache source,
-Maven and other publisher links keep their current behavior.
-
-The documentation renderer migrates old distribution URLs and marks missing
-download links unavailable. Download commands remain visible with a notice.
-This transformation applies during rendering, so documentation sources and
-archived snapshots keep their existing history.
-
-To restore a release file:
-
-1. Obtain the original package, signature and checksum from an independent
- trusted backup or the release publisher. Verify the signature and checksum.
-2. Upload each original file to `downloads/releases/<relative-key>` using a
- separate recovery identity. Keep the bucket private, block public access,
- and retain encryption. The website CI role cannot write this prefix.
-3. Check the CDN response size and bytes, and verify that anonymous direct OSS
- access returns 403. Verify every sidecar file separately.
-4. Add the exact relative key to `objects`, with `verified: true`, the positive
- file size in `bytes`, and its 64-character SHA-256 in `sha256`. Submit that
- catalog change with the release metadata and rebuild the website.
-
-Do not add a catalog entry before verification. Never substitute a source
-archive for a link labelled Binary, regenerate an original release signature,
-or mark every file available merely because the bucket exists. New releases
-using this storage also need verified catalog entries before their download
-buttons become available.
-
-Archived documentation PDFs use `downloads/archived-docs/` and are regenerated
-from repository snapshots. Their separate workflow and role are documented in
-[`scripts/docs-pdf/README.md`](../docs-pdf/README.md).
+# Distribution downloads
+
+Doris package, signature and checksum links use the public-read release mirror:
+
+```text
+https://apache-doris-downloads.oss-accelerate.aliyuncs.com/<relative-key>
+```
+
+The original object keys are preserved at the bucket root. Configure OSS
+transfer acceleration for this bucket and keep writes restricted to the owner
+and explicitly authorized publishing or replication identities.
+
+`config/download-recovery.json` declares this base URL and sets
+`availability` to `public`. Download forms enable the configured package and
+sidecar links without requiring a manually maintained receipt for every object.
+This setting controls link availability; it does not assert that a particular
+file has passed signature verification. Complete and check the bucket migration
+before deploying the endpoint change. An absent signature or checksum URL in
+release metadata still leaves that particular action disabled.
+
+The release catalogue in `src/constant/download.data.ts` and the add-release
+validator use the same endpoint. Apache source, Maven, GitHub and other
+publisher URLs retain their existing behavior.
+
+The documentation renderer rewrites retired distribution URLs to this mirror
+without changing documentation sources or archived snapshots. In public mode,
+these links and commands no longer receive the temporary unavailable notice.
+Archived documentation PDFs keep the independent base URL in
+`config/archived-docs.json`; changing the distribution bucket does not move
them.
+
+## Verified recovery mode
+
+For a staged recovery, set `availability` to `verified` (or omit it) and record
+each recovered relative key in `objects`, with `verified: true`, a positive
+file size in `bytes`, and its 64-character SHA-256 in `sha256`. Missing or
+incomplete receipts keep that file and its corresponding action unavailable.
+Each package, signature and checksum is checked separately.
+
+Obtain original release files from the publisher or a trusted backup. Verify
+published checksums and signatures before publishing or restoring them. Website
+builds cannot reproduce an official release binary and its original signature.
+Keep recovery and publisher write permissions separate from website publishing:
+the website CI role can upload only the website assets prefix, not release
+files. The website link configuration does not grant OSS write permissions.
+
+Never substitute a source archive for a link labelled Binary, or reuse an
+original signature for a different rebuilt package.
diff --git a/src/constant/download.data.ts b/src/constant/download.data.ts
index 3f7447f40d7..5620033fb74 100644
--- a/src/constant/download.data.ts
+++ b/src/constant/download.data.ts
@@ -69,7 +69,7 @@ export function isActiveToolVersion(tool: ToolsEnum, version:
string): boolean {
return (ACTIVE_TOOL_LINES[tool] || []).some(line => version === line ||
version.split('.')[0] === line);
}
-export const ORIGIN = 'https://assets-cdn.selectdb.com/downloads/releases/';
+export const ORIGIN =
'https://apache-doris-downloads.oss-accelerate.aliyuncs.com/';
export enum DownloadTypeEnum {
Binary = 'Binary',
Source = 'Source',
diff --git a/src/utils/download-recovery.js b/src/utils/download-recovery.js
index 0ffd6ea5887..ae50cf833da 100644
--- a/src/utils/download-recovery.js
+++ b/src/utils/download-recovery.js
@@ -1,9 +1,10 @@
const recovery = require('../../config/download-recovery.json');
+const archive = require('../../config/archived-docs.json');
const retiredHost =
/https?:\/\/apache-doris-releases\.oss[^.\s/]*\.aliyuncs\.com(?=\/|[\s"'`]|$)/g;
const retiredArchive =
/https?:\/\/apache-doris-releases\.oss[^.\s/]*\.aliyuncs\.com\/archived-docs(?=\/|[\s"'`]|$)/g;
function migrateDownloadUrls(value, catalog = recovery) {
- return value.replace(retiredArchive, new URL(catalog.baseUrl).origin +
'/downloads/archived-docs')
+ return value.replace(retiredArchive, archive.baseUrl.replace(/\/$/, ''))
.replace(retiredHost, catalog.baseUrl.replace(/\/$/, ''));
}
@@ -13,7 +14,7 @@ function missingDownloads(value, catalog = recovery) {
return urls.map(url => url.replace(/[.,;:]+$/, '')).filter(url =>
!isDownloadAvailable(url, catalog));
}
-// Gate only our migrated distribution storage. Other publishers' source,
+// Apply the configured availability policy only to our distribution storage.
Other publishers' source,
// Maven and GitHub URLs retain their existing behavior.
function isDownloadAvailable(value, catalog = recovery) {
if (!value || typeof value !== 'string') return false;
@@ -24,6 +25,8 @@ function isDownloadAvailable(value, catalog = recovery) {
if (url.hostname !== base.hostname) return true;
if (url.origin !== base.origin || !value.startsWith(catalog.baseUrl) ||
url.search || url.hash) return false;
const key = value.slice(catalog.baseUrl.length);
+ if (!key || key.endsWith('/')) return false;
+ if (catalog.availability === 'public') return true;
if (!catalog.objects ||
!Object.prototype.hasOwnProperty.call(catalog.objects, key)) return false;
const object = catalog.objects[key];
return object?.verified === true && Number.isSafeInteger(object.bytes) &&
object.bytes > 0
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]