Skip to content

envoy.base.utils: Fetch inventories from GCS docs archive with legacy fallback - #5361

Closed
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-inventory-sync-404-errors
Closed

phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-inventory-sync-404-errors

Conversation

Copilot AI commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Since envoyproxy/envoy#47932, release docs are synced to GCS (gs://<bucket>/envoy/docs/v{version}/) instead of envoyproxy/archive. Inventory sync was still fetching from the archive repo, so every new release 404'd and left docs/versions.yaml and docs/inventories/ stale.

Important

envoy-docs-archive is a placeholder bucket name. Before merge, check it against the GCS_DOCS_ARCHIVE_BUCKET repo variable in envoyproxy/envoy. It lives in a single constant, INVENTORY_BASE_URL_DEFAULT.

Changes (abstract/project/inventory.py)

  • New URL source: inventory_url now builds {base_url}/envoy/docs/v{version}/objects.inv.
    • base_url comes from the new inventory_base_url property: $ENVOY_DOCS_ARCHIVE_URL if set, otherwise INVENTORY_BASE_URL_DEFAULT. A trailing / is stripped.
  • Legacy fallback: the new legacy_inventory_url keeps the old envoyproxy/archive URL so older versions still resolve.
  • fetch: tries the primary URL, then the legacy one only on a 404, and returns None only if both 404. Any other status returns response.read(), as before.
  • Unchanged: the inventory paths, versions.yaml handling and the sync/write logic. IInventories is also unchanged, since URL helpers aren't declared on the interface.
INVENTORY_BASE_URL_DEFAULT = (
    "https://storage.googleapis.com/envoy-docs-archive")
INVENTORY_BASE_URL_ENV = "ENVOY_DOCS_ARCHIVE_URL"
INVENTORY_URL_FMT = "{base_url}/envoy/docs/v{version}/objects.inv"
INVENTORY_LEGACY_URL_FMT = (
    "https://github.com/envoyproxy/archive/raw/main/"
    "docs/envoy/v{version}/objects.inv")

Tests

  • Base URL: env var set and unset, including trailing-slash stripping.
  • Primary and legacy URL formatting, plus one check that builds both URLs from the real constants.
  • fetch: covers primary non-404 (legacy never called), primary 404 with legacy non-404, and both 404.

Release

  • VERSION isn't bumped here: it's already 0.6.11-dev, which the publish bot set after 0.6.10, and the release strips -dev.
  • Consumers (envoy main and every release branch that publishes) need to bump envoy.base.utils to pick this up.

@netlify

netlify Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for nifty-bassi-e26446 ready!

Name Link
🔨 Latest commit ab356f8
🔍 Latest deploy log https://app.netlify.com/projects/nifty-bassi-e26446/deploys/6abe60c0b9f5810007e057c2
😎 Deploy Preview https://deploy-preview-5361--nifty-bassi-e26446.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

… fallback

Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix inventory sync to avoid 404 errors on new releases envoy.base.utils: Fetch inventories from GCS docs archive with legacy fallback Oct 1, 2026
Copilot AI requested a review from phlax October 1, 2026 13:33
@phlax phlax closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants