Skip to content

Harden Docker mise install against transient upstream failures#9000

Draft
claude[bot] wants to merge 3 commits into
mainfrom
claude/docker-mise-install-hardening
Draft

Harden Docker mise install against transient upstream failures#9000
claude[bot] wants to merge 3 commits into
mainfrom
claude/docker-mise-install-hardening

Conversation

@claude

@claude claude Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Requested by Tim Diekmann, Bilal Mahmoud · Slack thread

🌟 What is the purpose of this PR?

Before: the service Dockerfiles run mise install <tools> and yarn install in a single layer after copying the turbo-pruned dependency manifests, so any JS dependency change invalidates the tool layer and every such build re-downloads node/java/protoc/… from upstream sources. The pinned mise (2026.4.22) performs zero HTTP retries by default (http_retries = 0 at that version), so a single transient 504 from an upstream tool source fails the whole image build. This failed two consecutive staging deploys in the "Build and push integration-worker (amd64)" job: run 29033102373 and run 29033986038. The images also installed biome — unpinned (resolving "latest" every build) and, since the repo-wide migration to oxfmt, never actually invoked by anything.

After: the tool-install layer is built before the dependency-manifest COPYs, so it stays cached in the GHCR buildx registry cache across JS dependency churn and most builds never contact upstream tool sources at all. When a build does hit upstream, mise ≥ 2026.4.24 retries transient failures — 5xx/408/429, network errors, mid-stream drops — with jittered backoff by default (jdx/mise#9414). A committed mise.lock (with lockfile = true, groundwork in this PR — see status below) removes the remaining resolution/API traffic so the whole failure class goes away. biome is removed everywhere — both Dockerfiles that installed it, both Vercel install scripts, and no mise pin — so it is no longer resolved or downloaded at all.

Which mitigation answers what:

  • Layer reorder → most builds never hit upstream at all (the durable fix).
  • mise bump 2026.4.22 → 2026.7.0 (Docker only) → transient errors are retried with backoff instead of failing on the first 504. This replaces a shell for-loop retry wrapper: mise's own retry landed in v2026.4.24, so bumping the pin is the non-bandaid version of the same protection.
  • mise.lock + strict locked installs → installs use pre-resolved URLs/checksums and skip GitHub/aqua API calls entirely (jdx/mise#8679, fixing #8677, in v2026.3.11; attestation-probe caching in v2026.5.6 via #9741).
  • biome removal → one fewer upstream artifact to download in the first place.
  • Token: verified rather than changed — every mise install RUN in all five Dockerfiles already receives GITHUB_TOKEN via --mount=type=secret,id=GITHUB_TOKEN,env=GITHUB_TOKEN, passed by .github/actions/docker-build-push from github.token. A token only raises API rate limits; it would not have helped with a 504.

🔗 Related links

🚫 Blocked by

  • mise.lock generation: the sandbox this PR was authored in cannot reach GitHub release/API endpoints for third-party repos, so the lockfile could not be generated here. One command on an unrestricted machine produces it: mise lock -p linux-x64,linux-arm64,macos-x64,macos-arm64 (then commit .config/mise/mise.lock). Until it lands, MISE_LOCKED=1 must NOT be added to the Dockerfiles (strict mode fails without lock URLs); everything else in this PR stands alone.

🔍 What does this change?

  • apps/{hash-api,hash-ai-worker-ts,hash-frontend,hash-graph,hash-integration-worker}/docker/Dockerfile: builder stage installs system packages + mise tools before the COPY --from=base /app/out/json … manifest copies; yarn install --immutable split into its own RUN after them. Tool versions come from /etc/mise/config.toml (copied in the first stage), so the install needs nothing from the pruned context. MISE_VERSION bumped 2026.4.222026.7.0.
  • biome removed from every place that installed itapps/hash-integration-worker/docker/Dockerfile, apps/hash-ai-worker-ts/docker/Dockerfile, apps/hash-frontend/vercel-install.sh, apps/petrinaut-website/vercel-install.sh — with no replacement. Evidence: no script in any package.json in the repo invokes biome, there is no biome.json, and no package depends on @biomejs/* — the oxfmt migration is complete. The only formatter invoked from the turbo buildcodegen graph at all is hash-api's codegen afterOneFileWrite: oxfmt hook, and hash-api is not in the dependency closure of the integration-worker, ai-worker-ts, frontend, or petrinaut-website builds (the api/frontend images already install oxfmt for their own use). The only remaining biome strings in the repo are two inert biome-ignore suppression comments in apps/hash-frontend/src/pages/supply-chain/.
  • .config/mise/config.toml:
    • lockfile = true — groundwork so the committed mise.lock stays maintained by mise install/mise use. Harmless until the lockfile exists (mise does not create one automatically; mise lock does).
    • min_version 2026.4.222026.6.13 — see below.
  • README.md: the two dev-facing mise version mentions updated to ≥ 2026.6.13.
  • No layer semantics other than ordering changed; cache mounts, secret mounts unaffected.

Why min_version = 2026.6.13 (and not the Docker pin 2026.7.0)

The Docker MISE_VERSION and the dev-facing min_version are separate knobs; the images can ride newer without churning every developer. The floor is the max of the hard requirements for working with the committed lockfile, all verified against the mise changelog:

  • lockfile-content stability for this repo's entries — anything older rewrites/drops fields on plain mise install and churns the committed lock: node source-lock outcomes (#10547, v2026.6.13), java lock identity (#9989, v2026.6.4), rust-toolchain.toml idiomatic-file locking (#10309/#10319, v2026.6.3)
  • mise lock fails loudly when active tools cannot resolve (#10586, v2026.6.13) — regenerating the lock on older versions can silently produce incomplete locks
  • everything earlier comes along for free: locked-mode support for npm/cargo/pipx backends (#7985, v2026.2.3), aqua locked-mode API skip (#8679, v2026.3.11), default HTTP retries (#9414, v2026.4.24 — nice-to-have for devs, not a hard floor, but subsumed by the 2026.6.13 floor anyway)

Lockfile mechanics (verified against mise 2026.7.0 source/docs)

  • For .config/mise/config.toml, the lockfile lives at .config/mise/mise.lock (lockfile_path_for_config uses the config's parent dir), so the existing COPY .config/mise /etc/mise carries it into the images with no Dockerfile change; system-config lockfiles are supported (mise lock -g covers "~/.config/mise/mise.lock and system config"). config.ci.toml tools get a separate mise.ci.lock scoped to CI.
  • mise lock -p linux-x64,linux-arm64,macos-x64,macos-arm64 pre-generates entries for both Docker arches and both dev macOS arches. Under strict locked mode, install fails for a platform with no lockfile URL (no silent fallback); without strict mode, an unlocked platform falls back to normal resolution.
  • npm:*/cargo:*/pipx:* tools are version-only in the lockfile (no pre-resolved URLs) and are explicitly exempt from the strict-mode URL check (supports_lockfile_url() == false); their downloads go to the npm registry/crates.io with those tools' own retry behaviour. The rust toolchain is likewise exempt (rustup manages it).
  • Once mise.lock is committed, the follow-through is MISE_LOCKED=1 (or locked = true) for the Docker install layers so image builds hard-require pre-resolved URLs.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change (the README version references are updated in this PR)

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

  • mise.lock is not yet committed (see Blocked by) — strict locked installs are therefore not yet enabled in the Dockerfiles.
  • The first build after this merges is a full cold build (the mise config change invalidates every stage once).

🐾 Next steps

  • Generate and commit .config/mise/mise.lock (all four platforms), then add MISE_LOCKED=1 to the Docker tool-install layers.
  • Optionally sweep the two leftover biome-ignore comments in apps/hash-frontend/src/pages/supply-chain/ (inert; cosmetic only).

🛡 What tests cover this?

  • No unit tests apply; the per-service Docker build validation jobs on this PR exercise all five modified Dockerfiles end-to-end (the integration-worker and ai-worker-ts builds passing proves biome was unused in their build paths).

❓ How to test this?

  1. Confirm the Docker build jobs on this PR pass for every service — builds passing without biome proves it was vestigial.
  2. Confirm the Vercel preview deployments (hash-frontend, petrinaut-website) build, proving the install scripts don't need biome either.
  3. Re-run a build after a JS-dependency-only change lands and confirm the mise install layer is a cache hit (no upstream downloads in the log).

Two consecutive staging deploys failed because the tool-install layer hit
an HTTP 504 from an upstream tool source during `mise install`.

- Move the `mise install` layer above the turbo-pruned dependency-manifest
  COPYs in all five service Dockerfiles so the tool layer stays cached in
  the registry build cache across JS dependency churn and most builds
  never contact upstream tool sources at all
- Bump the pinned mise from 2026.4.22 to 2026.7.0: since v2026.4.24
  (jdx/mise#9414) mise retries transient download failures (5xx/408/429,
  network errors, mid-stream drops) with jittered backoff by default,
  whereas 2026.4.22 defaulted to zero retries so a single 504 was fatal
- Pin `biome` to 2.5.2 so builds no longer resolve "latest" on every run

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EcBiQCfeizMQJubtqXkiMs
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Jul 10, 2026 7:35am
hashdotdesign-tokens Ready Ready Preview, Comment Jul 10, 2026 7:35am
petrinaut Ready Ready Preview, Comment Jul 10, 2026 7:35am

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.74%. Comparing base (232f15c) to head (e5a2a2c).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9000   +/-   ##
=======================================
  Coverage   59.74%   59.74%           
=======================================
  Files        1370     1370           
  Lines      135170   135170           
  Branches     6067     6067           
=======================================
+ Hits        80760    80761    +1     
+ Misses      53477    53476    -1     
  Partials      933      933           
Flag Coverage Δ
apps.hash-ai-worker-ts 1.39% <ø> (ø)
apps.hash-api 6.39% <ø> (ø)
blockprotocol.type-system 40.84% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.49% <ø> (ø)
local.hash-backend-utils 1.90% <ø> (ø)
local.hash-graph-sdk 10.02% <ø> (ø)
local.hash-isomorphic-utils 0.18% <ø> (ø)
rust.antsi 0.00% <ø> (ø)
rust.error-stack 90.89% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.26% <ø> (+0.01%) ⬆️
rust.harpc-tower 67.03% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-graph-api 7.41% <ø> (ø)
rust.hash-graph-authorization 62.59% <ø> (ø)
rust.hash-graph-embeddings 91.88% <ø> (ø)
rust.hash-graph-postgres-store 29.47% <ø> (ø)
rust.hash-graph-store 38.19% <ø> (ø)
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 84.71% <ø> (ø)
rust.hashql-ast 89.63% <ø> (ø)
rust.hashql-compiletest 28.39% <ø> (ø)
rust.hashql-core 78.95% <ø> (ø)
rust.hashql-diagnostics 72.51% <ø> (ø)
rust.hashql-eval 79.47% <ø> (ø)
rust.hashql-hir 89.09% <ø> (ø)
rust.hashql-mir 88.05% <ø> (ø)
rust.hashql-syntax-jexpr 94.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented Jul 9, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 15.38%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 2 regressed benchmarks
✅ 96 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
bit_matrix/dense/iter_row[64] 140.8 ns 170 ns -17.16%
bit_matrix/dense/iter_row[200] 185.8 ns 215 ns -13.57%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/docker-mise-install-hardening (e5a2a2c) with main (e765bd6)

Open in CodSpeed

…file, set evidence-based min_version

- Remove `biome` from the integration-worker `mise install` list: the repo
  migrated formatting to oxfmt, and nothing in the image's turbo build graph
  (build -> codegen tasks of the app and its workspace dependency closure)
  invokes biome or oxfmt, so no replacement is needed
- Enable `lockfile = true` so a committed `mise.lock` stays maintained by
  `mise install` once generated
- Set `min_version = "2026.6.13"` (instead of matching the Docker pin):
  the floor is driven by lockfile-content stability for this repo's tools
  (node source-lock outcomes in v2026.6.13, java lock identity in v2026.6.4,
  rust-toolchain.toml idiomatic locking in v2026.6.3) plus `mise lock`
  failing loudly on unresolvable tools (v2026.6.13); Docker images stay on
  MISE_VERSION=2026.7.0 which is above the floor

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EcBiQCfeizMQJubtqXkiMs
…pts, mise pin

The repo's migration to oxfmt left biome installed but never invoked: no
script in any package.json runs biome, there is no biome.json, and the
only build-path formatter (hash-api's codegen afterOneFileWrite oxfmt
hook) is outside the ai-worker-ts / frontend / petrinaut-website
dependency closures. Drop biome from the ai-worker-ts Dockerfile tool
list, both vercel-install.sh scripts, and the [tools] pin added earlier
in this branch, so nothing resolves or downloads it at all.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EcBiQCfeizMQJubtqXkiMs
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$26.0 \mathrm{ms} \pm 178 \mathrm{μs}\left({\color{gray}-3.260 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.47 \mathrm{ms} \pm 23.2 \mathrm{μs}\left({\color{gray}-3.966 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$12.4 \mathrm{ms} \pm 84.1 \mathrm{μs}\left({\color{lightgreen}-8.607 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$44.5 \mathrm{ms} \pm 414 \mathrm{μs}\left({\color{gray}0.422 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.2 \mathrm{ms} \pm 112 \mathrm{μs}\left({\color{gray}-2.952 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$25.0 \mathrm{ms} \pm 203 \mathrm{μs}\left({\color{gray}-3.060 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$27.5 \mathrm{ms} \pm 172 \mathrm{μs}\left({\color{gray}-2.052 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.80 \mathrm{ms} \pm 29.3 \mathrm{μs}\left({\color{lightgreen}-5.803 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.4 \mathrm{ms} \pm 84.2 \mathrm{μs}\left({\color{lightgreen}-9.023 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.88 \mathrm{ms} \pm 25.2 \mathrm{μs}\left({\color{gray}1.87 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.04 \mathrm{ms} \pm 12.4 \mathrm{μs}\left({\color{gray}-1.439 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.44 \mathrm{ms} \pm 28.0 \mathrm{μs}\left({\color{gray}-1.760 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.12 \mathrm{ms} \pm 27.3 \mathrm{μs}\left({\color{gray}-3.315 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.62 \mathrm{ms} \pm 21.0 \mathrm{μs}\left({\color{gray}-1.871 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.14 \mathrm{ms} \pm 26.5 \mathrm{μs}\left({\color{gray}-4.473 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.36 \mathrm{ms} \pm 22.3 \mathrm{μs}\left({\color{lightgreen}-6.887 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.52 \mathrm{ms} \pm 26.4 \mathrm{μs}\left({\color{gray}-2.087 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.13 \mathrm{ms} \pm 29.1 \mathrm{μs}\left({\color{gray}-0.902 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.65 \mathrm{ms} \pm 13.2 \mathrm{μs}\left({\color{gray}-4.392 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.57 \mathrm{ms} \pm 13.4 \mathrm{μs}\left({\color{gray}-1.802 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.62 \mathrm{ms} \pm 16.9 \mathrm{μs}\left({\color{lightgreen}-5.653 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.90 \mathrm{ms} \pm 17.7 \mathrm{μs}\left({\color{gray}-4.583 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.76 \mathrm{ms} \pm 13.7 \mathrm{μs}\left({\color{gray}-2.789 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.91 \mathrm{ms} \pm 15.4 \mathrm{μs}\left({\color{lightgreen}-5.250 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.08 \mathrm{ms} \pm 15.4 \mathrm{μs}\left({\color{gray}-0.540 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.84 \mathrm{ms} \pm 14.7 \mathrm{μs}\left({\color{gray}-0.260 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$3.04 \mathrm{ms} \pm 16.7 \mathrm{μs}\left({\color{gray}-0.060 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.47 \mathrm{ms} \pm 26.2 \mathrm{μs}\left({\color{gray}-1.481 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.07 \mathrm{ms} \pm 17.2 \mathrm{μs}\left({\color{gray}-1.321 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.34 \mathrm{ms} \pm 17.5 \mathrm{μs}\left({\color{gray}-0.665 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.45 \mathrm{ms} \pm 24.9 \mathrm{μs}\left({\color{gray}1.04 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.02 \mathrm{ms} \pm 16.4 \mathrm{μs}\left({\color{gray}-1.194 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.35 \mathrm{ms} \pm 18.8 \mathrm{μs}\left({\color{gray}-2.674 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$41.5 \mathrm{ms} \pm 276 \mathrm{μs}\left({\color{gray}-3.694 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$32.4 \mathrm{ms} \pm 197 \mathrm{μs}\left({\color{lightgreen}-5.654 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$35.6 \mathrm{ms} \pm 223 \mathrm{μs}\left({\color{lightgreen}-5.119 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$39.7 \mathrm{ms} \pm 1.27 \mathrm{ms}\left({\color{gray}-3.373 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$40.8 \mathrm{ms} \pm 221 \mathrm{μs}\left({\color{lightgreen}-7.485 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$49.3 \mathrm{ms} \pm 214 \mathrm{μs}\left({\color{gray}-2.295 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$39.9 \mathrm{ms} \pm 194 \mathrm{μs}\left({\color{gray}-4.989 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$87.8 \mathrm{ms} \pm 503 \mathrm{μs}\left({\color{lightgreen}-5.691 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$45.0 \mathrm{ms} \pm 3.75 \mathrm{ms}\left({\color{red}9.58 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$257 \mathrm{ms} \pm 772 \mathrm{μs}\left({\color{gray}-0.059 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$10.3 \mathrm{ms} \pm 46.5 \mathrm{μs}\left({\color{gray}-0.585 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$10.6 \mathrm{ms} \pm 66.9 \mathrm{μs}\left({\color{gray}0.922 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$10.5 \mathrm{ms} \pm 63.5 \mathrm{μs}\left({\color{gray}-0.434 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$10.3 \mathrm{ms} \pm 56.0 \mathrm{μs}\left({\color{gray}0.216 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$10.6 \mathrm{ms} \pm 53.3 \mathrm{μs}\left({\color{gray}0.922 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$10.6 \mathrm{ms} \pm 57.9 \mathrm{μs}\left({\color{gray}0.662 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$10.6 \mathrm{ms} \pm 48.8 \mathrm{μs}\left({\color{gray}-0.225 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$10.5 \mathrm{ms} \pm 51.4 \mathrm{μs}\left({\color{gray}0.605 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$10.7 \mathrm{ms} \pm 53.5 \mathrm{μs}\left({\color{gray}0.805 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$11.1 \mathrm{ms} \pm 68.7 \mathrm{μs}\left({\color{gray}0.751 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$11.0 \mathrm{ms} \pm 79.2 \mathrm{μs}\left({\color{gray}3.12 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$11.0 \mathrm{ms} \pm 64.3 \mathrm{μs}\left({\color{gray}2.35 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$10.8 \mathrm{ms} \pm 50.4 \mathrm{μs}\left({\color{gray}1.14 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$11.0 \mathrm{ms} \pm 76.3 \mathrm{μs}\left({\color{gray}0.819 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$10.9 \mathrm{ms} \pm 53.1 \mathrm{μs}\left({\color{gray}2.30 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$10.8 \mathrm{ms} \pm 66.6 \mathrm{μs}\left({\color{gray}0.269 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$11.0 \mathrm{ms} \pm 59.0 \mathrm{μs}\left({\color{gray}1.03 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$10.8 \mathrm{ms} \pm 45.6 \mathrm{μs}\left({\color{gray}-0.620 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$10.7 \mathrm{ms} \pm 46.7 \mathrm{μs}\left({\color{gray}0.378 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$8.45 \mathrm{ms} \pm 43.1 \mathrm{μs}\left({\color{gray}-1.138 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$56.4 \mathrm{ms} \pm 366 \mathrm{μs}\left({\color{lightgreen}-7.511 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$111 \mathrm{ms} \pm 729 \mathrm{μs}\left({\color{gray}-2.887 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$61.5 \mathrm{ms} \pm 352 \mathrm{μs}\left({\color{lightgreen}-7.938 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$71.2 \mathrm{ms} \pm 387 \mathrm{μs}\left({\color{lightgreen}-7.677 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$80.1 \mathrm{ms} \pm 501 \mathrm{μs}\left({\color{lightgreen}-7.510 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$87.4 \mathrm{ms} \pm 453 \mathrm{μs}\left({\color{lightgreen}-5.996 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$45.2 \mathrm{ms} \pm 261 \mathrm{μs}\left({\color{gray}-3.019 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$75.4 \mathrm{ms} \pm 495 \mathrm{μs}\left({\color{gray}-2.357 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$53.2 \mathrm{ms} \pm 344 \mathrm{μs}\left({\color{gray}0.543 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$61.2 \mathrm{ms} \pm 386 \mathrm{μs}\left({\color{gray}-0.760 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$63.5 \mathrm{ms} \pm 344 \mathrm{μs}\left({\color{gray}-1.918 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$65.1 \mathrm{ms} \pm 505 \mathrm{μs}\left({\color{gray}-1.693 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$115 \mathrm{ms} \pm 598 \mathrm{μs}\left({\color{lightgreen}-8.397 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$125 \mathrm{ms} \pm 462 \mathrm{μs}\left({\color{lightgreen}-7.935 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$18.7 \mathrm{ms} \pm 119 \mathrm{μs}\left({\color{gray}-1.734 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$536 \mathrm{ms} \pm 991 \mathrm{μs}\left({\color{lightgreen}-5.518 \mathrm{\%}}\right) $$ Flame Graph

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

Labels

area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/apps > hash-graph area/apps area/infra Relates to version control, CI, CD or IaC (area) type/eng > backend Owned by the @backend team type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants