Skip to content

fix(network): route fixture services through gateway - #9868

Open
pentreathm wants to merge 3 commits into
chore/e2e-infrafrom
fix/e2e-fixture-gateway-routes
Open

fix(network): route fixture services through gateway#9868
pentreathm wants to merge 3 commits into
chore/e2e-infrafrom
fix/e2e-fixture-gateway-routes

Conversation

@pentreathm

Copy link
Copy Markdown
Member

Summary

  • route Events and POI through the custom --gateway origin
  • route Worlds metadata, permissions, and comms through the same gateway
  • add coverage for all fixture-facing gateway paths

The fixture was serving these endpoints correctly, but Unity still resolved them to events.decentraland.org, dcl-lists.decentraland.org, and worlds-content-server.decentraland.org. This is stacked on #9822.

@pentreathm
pentreathm requested review from a team as code owners August 26, 2026 13:21
@github-actions
github-actions Bot requested a review from anicalbano August 26, 2026 13:22
@decentraland-bot decentraland-bot added the ext-contribution Identifies a contribution which was not initiated by a Unity Developer label Aug 26, 2026
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🚦 CI Status

Build

Windows and Mac build successful in Unity Cloud! You can find a link to the downloadable artifact below.

Name Link
Commit 32f6db6
Logs https://github.com/decentraland/unity-explorer/actions/runs/32981227301
Download Windows https://github.com/decentraland/unity-explorer/suites/89339826115/artifacts/9612852123
Download Windows S3 https://explorer-artifacts.decentraland.org/@dcl/unity-explorer/branch/fix/e2e-fixture-gateway-routes/pr-25530-32f6db6/Decentraland_windows64.zip
Download Mac https://github.com/decentraland/unity-explorer/suites/89339826115/artifacts/9612868955
Download Mac S3 https://explorer-artifacts.decentraland.org/@dcl/unity-explorer/branch/fix/e2e-fixture-gateway-routes/pr-25530-32f6db6/Decentraland_macos.zip
Built on 2026-08-26T15:21:25Z

Lint

Lint in progress, come back later!

Tests

Some Unity tests failed ❌

TESTS SUITE Result Passed Failed Skipped
EditMode ❌ 1 failed 25530 1 13
PlayMode ✅ Passed 243 0 37
Failed tests (1)
  • [editmode] DCL.Browser.DecentralandUrls.Tests.DecentralandUrlsSourceShould.RouteEventsPoiAndWorldServerThroughTheGatewayOrigin

@github-actions

Copy link
Copy Markdown
Contributor

Slack notification sent to #explorer-ext-contributions for external review.
To re-send, delete this comment and re-add the ext-contribution label.

@decentraland-bot decentraland-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: fix(network): route fixture services through gateway

PR: #9868
Author: pentreathm
Base: chore/e2e-infra (stacked on #9822)
Files changed: 2 (+20 −0)


STEP 2 — Root-cause check: ✅ PASS

The PR description states the fixture was serving Events, POI, and Worlds endpoints correctly, but Unity still resolved them to their production origins (events.decentraland.org, dcl-lists.decentraland.org, worlds-content-server.decentraland.org) instead of routing through the gateway. The fix adds these URLs to the SUPPORTED_URLS allowlist in GatewayUrlsSource, which is the single canonical gating mechanism that controls whether RawUrl() rewrites a URL through the gateway. This directly addresses the root cause — the URLs were simply missing from the set.

STEP 3 — Design & integration: ✅ PASS

No new long-lived units are introduced. The change is purely additive: 5 new DecentralandUrl enum entries are added to an existing static readonly HashSet<DecentralandUrl>. This is the intended extensibility mechanism for gateway routing — the SUPPORTED_URLS set is the single source of truth that RawUrl() checks before applying the gateway transform.

Placement: ApiEvents and POI are placed in the Places/API section alongside ApiPlaces, ApiWorlds, and ApiDestinations. WorldServer, WorldPermissions, WorldComms, and WorldCommsAdapter are grouped with the existing WorldContentServer in the Content Servers section. Both placements are logically coherent with the existing organization.

No lifecycle concerns, no new subscriptions, no teardown needed — this is static configuration data.

STEP 4 — Member audit: ✅ N/A

No new public properties, accessors, or methods are introduced.

STEP 5 — Line-level review: ✅ No issues found

Pass A (blocking issues): No bugs, no security vulnerabilities, no performance concerns, no missing error handling, no resource leaks, no nullability violations.

Pass B (design/encapsulation smells): No new types, no naming issues, no magic values, no encapsulation violations.

Test analysis: The new test RouteEventsPoiAndWorldServerThroughTheGatewayOrigin follows the exact same pattern as the adjacent RouteThroughTheGatewayOriginTheArgNames — it constructs a GatewayUrlsSource with a cliGatewayPrefix and asserts each new URL resolves through it. All 6 new URL entries are covered with explicit expected values. The test name accurately describes its scope.

Git conventions (ADR-6): Title fix(network): route fixture services through gateway follows semantic commit format. Branch fix/e2e-fixture-gateway-routes follows <type>/<summary>. ✅

Security review: ✅ No issues

  • No new input surfaces, authentication changes, or credential handling.
  • The change extends an internal URL allowlist — no external attack surface is introduced.
  • Gateway routing preserves the existing IsGatewayTransformable() safety checks (single-label subdomain, no port/userinfo, same base domain).
  • The reverse transform (GetOriginalUrl) is generic and handles all supported URLs uniformly.

Consumer impact: ✅ No breaking changes

No public API surface is modified. The Url(), TransformUrl(), and GetOriginalUrl() methods retain their signatures and contracts. The behavioral change (these URLs now route through the gateway) activates only when the use-gateway feature flag or a cliGatewayPrefix CLI argument is set — existing callers without gateway configuration see no difference.

CI status

⚠️ Lint — cancelled (not related to code changes)
⚠️ watchdog — failed (infrastructure)
⚠️ Tests (playmode/editmode) — pending; the failures visible in logs are CI infrastructure issues (fatal: not a git repository in the test-reporter action, missing artifact path) — not test failures caused by this PR

These CI issues appear to be pre-existing on the base branch.


REVIEW_RESULT: PASS ✅
COMPLEXITY: SIMPLE
COMPLEXITY_REASON: Adds entries to a static URL allowlist in the network-definitions layer plus a covering unit test; no systems, async, or architectural changes.
QA_REQUIRED: YES


Reviewed by Jarvis 🤖 · Requested by unknown (<@unknown>) via Slack

@decentraland-bot

Copy link
Copy Markdown
Contributor

PR #9868, run #32977810971

Overall: ✅ no significant changes

Builds: Windows change, Windows baseline, macOS change, macOS baseline

How to read this table
  • Each build is measured 3 times, interleaved with the other build (change, baseline, change, baseline, ...) in the same session, so both see the same world content and machine state. The values are the median, and (min–max) is the lowest and highest of those runs.
  • Δ is Change minus Baseline (a negative Δ means Change is faster).
  • 🟢 faster / 🔴 slower — a difference that passed every check: the runs are fully separated (every run of one build faster than every run of the other), and the median difference is at least 3% and at least 0.5 ms.
  • ⚪ within noise — the builds' runs overlap, or the difference is tiny; it cannot be told apart from random variation. Treat it as no change.
  • — informational — the 0.1% worst metrics average only the few worst frames of a run, so a single OS hiccup swings them by a lot; they are shown for context and never earn a verdict.
  • ⚠️ no verdict — the two builds' sessions were not comparable (very different sample counts, or too few usable runs), so no conclusion is drawn from them.
  • Exceptions per run — the average number of exceptions in a run's log, not counting teardown ones logged while the app quits. Flagged only on a difference of at least 2 per run and 1.5× the other build; exception kinds the baseline never threw are called out under the table. The Exception breakdown groups all of them by the explorer's report category and exception type (as totals across the runs).
  • A run that logged unusually many exceptions (at least 10 and 5× the median of its build's runs — e.g. a service was down during it) is excluded from all numbers and called out under the table.
  • The Overall line at the top only reacts to a metric that moved on two or more machines, or by 10% or more on one — a single modest 🟢/🔴 cell can still be a statistical fluke.

Intel Core i5

Metric Baseline Change Δ Result
Samples 2369 (×3) 2357 (×3)
CPU average 37.8 ms (37.1–38.0) 37.8 ms (37.6–38.0) 0.0 ms ⚪ within noise
CPU 1% worst 329.3 ms (310.0–346.6) 316.2 ms (294.9–341.1) -13.1 ms ⚪ within noise
CPU 0.1% worst 340.6 ms (326.0–369.2) 331.2 ms (327.9–359.4) -9.5 ms — informational
GPU average 23.9 ms (23.0–24.0) 23.4 ms (23.0–23.8) -0.6 ms ⚪ within noise
GPU 1% worst 336.8 ms (315.8–349.9) 321.7 ms (301.5–346.5) -15.1 ms ⚪ within noise
GPU 0.1% worst 347.2 ms (329.8–376.4) 337.7 ms (329.8–361.7) -9.5 ms — informational
Exceptions per run 0 0 0 ⚪ no significant change

Apple M1

Metric Baseline Change Δ Result
Samples 2741 (×3) 2742 (×3)
CPU average 32.6 ms (31.3–33.0) 32.5 ms (28.1–32.7) -0.1 ms ⚪ within noise
CPU 1% worst 234.7 ms (234.6–240.8) 242.9 ms (238.4–328.4) 8.2 ms ⚪ within noise
CPU 0.1% worst 246.8 ms (242.6–247.7) 245.7 ms (245.4–1011.4) -1.1 ms — informational
GPU average 24.6 ms (22.0–25.0) 21.7 ms (10.5–22.2) -2.9 ms ⚪ within noise
GPU 1% worst 46.2 ms (45.8–46.9) 45.6 ms (45.3–49.2) -0.5 ms ⚪ within noise
GPU 0.1% worst 47.3 ms (47.1–49.6) 48.0 ms (47.4–55.7) 0.7 ms — informational
Exceptions per run 0 0 0 ⚪ no significant change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-contribution Identifies a contribution which was not initiated by a Unity Developer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants