Added benchmarking for production docker image - #29794
Conversation
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 6m 35s | View ↗ |
nx run ghost:test:ci:integration |
✅ Succeeded | 4s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 59s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 3m | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 29s | View ↗ |
nx run @tryghost/koenig-lexical:test:acceptance |
✅ Succeeded | 2m 24s | View ↗ |
nx run @tryghost/comments-ui:test:acceptance |
✅ Succeeded | 42s | View ↗ |
nx run @tryghost/activitypub:test:acceptance |
✅ Succeeded | 38s | View ↗ |
Additional runs (9) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-08-05 21:52:22 UTC
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
WalkthroughThe PR adds composite actions for pinned Hyperfine installation and boot benchmark reporting. The reporting action measures host data, compilation calibration, and Hyperfine results. The CI workflow uses these actions for development-tree benchmarks and adds a production-image benchmark after loading the core image and starting MySQL and Ghost. The workflow exports core image tags from Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.github/workflows/ci.yml (2)
546-554: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider pinning the MySQL image for series comparability.
mysql:8.0is a floating tag. A new 8.0.x push changes database behaviour under the measurement, so the production-image series can move with no Ghost commit behind it. That is the same failure mode the comment at lines 509-512 describes for base image bumps. Pin a digest or a full patch version, and treat a bump as a deliberate baseline break.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 546 - 554, Update the MySQL image reference in the docker run command to use a fixed full patch version or immutable digest instead of the floating mysql:8.0 tag. Preserve the existing MySQL configuration and treat future image-reference changes as deliberate baseline updates.
569-576: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePass the image tag through
envinstead of inline${{ }}.
${{ steps.load.outputs.image-tag }}expands directly into the shell command. The value is sanitized bydocker/metadata-actionand the job runs only on the registry path, so this is not exploitable today. Useenvindirection to match the pattern already used at lines 1512-1517 and to clear the zizmortemplate-injectionfinding.♻️ Proposed change
- name: Start Ghost container # Kept alive with `sleep` so each measured run is a `docker exec`; timing # `docker run` would put container create/start inside the measurement. + env: + IMAGE_TAG: ${{ steps.load.outputs.image-tag }} run: | docker run -d --name ghost --network ghost-perf --entrypoint sleep \ -e GHOST_CI_SHUTDOWN_AFTER_BOOT=1 \ -e database__client=mysql \ -e database__connection__host=mysql \ -e database__connection__user=root \ -e database__connection__password=root \ -e database__connection__database=ghost \ - "${{ steps.load.outputs.image-tag }}" infinity + "$IMAGE_TAG" infinity🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 569 - 576, Update the docker run step to expose steps.load.outputs.image-tag through the step’s env configuration, then reference that environment variable in the command instead of inline GitHub expression interpolation. Preserve the existing image selection and container arguments.Source: Linters/SAST tools
.github/actions/install-hyperfine/action.yml (1)
21-24: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winAdd download retries and quiet output.
A single
wgetcall with no retry makes the step fail on a transient GitHub CDN error. Retries remove a known CI flake source at low cost.♻️ Proposed change
TARBALL="hyperfine-v${HYPERFINE_VERSION}-x86_64-unknown-linux-gnu.tar.gz" - wget "https://github.com/sharkdp/hyperfine/releases/download/v${HYPERFINE_VERSION}/${TARBALL}" + wget --retry-connrefused --tries=3 --timeout=30 \ + "https://github.com/sharkdp/hyperfine/releases/download/v${HYPERFINE_VERSION}/${TARBALL}" echo "${HYPERFINE_SHA256} ${TARBALL}" | sha256sum --check --strict🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/actions/install-hyperfine/action.yml around lines 21 - 24, Update the wget invocation in the hyperfine download step to use retry handling for transient failures and quiet output, while preserving the existing URL and tarball flow. Configure wget with a finite retry count appropriate for CI before the existing checksum validation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/actions/report-boot-benchmark/action.yml:
- Around line 87-97: Update the “Publish to benchmark series” step’s if
condition to require a non-empty github-token in addition to excluding
pull_request events. Preserve publishing for authenticated non-pull-request runs
while skipping the step when the optional token is empty.
---
Nitpick comments:
In @.github/actions/install-hyperfine/action.yml:
- Around line 21-24: Update the wget invocation in the hyperfine download step
to use retry handling for transient failures and quiet output, while preserving
the existing URL and tarball flow. Configure wget with a finite retry count
appropriate for CI before the existing checksum validation.
In @.github/workflows/ci.yml:
- Around line 546-554: Update the MySQL image reference in the docker run
command to use a fixed full patch version or immutable digest instead of the
floating mysql:8.0 tag. Preserve the existing MySQL configuration and treat
future image-reference changes as deliberate baseline updates.
- Around line 569-576: Update the docker run step to expose
steps.load.outputs.image-tag through the step’s env configuration, then
reference that environment variable in the command instead of inline GitHub
expression interpolation. Preserve the existing image selection and container
arguments.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 710ae366-44b4-4dd7-8fd8-d3339dba401b
📒 Files selected for processing (3)
.github/actions/install-hyperfine/action.yml.github/actions/report-boot-benchmark/action.yml.github/workflows/ci.yml
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29794 +/- ##
==========================================
- Coverage 75.59% 75.55% -0.04%
==========================================
Files 1613 1613
Lines 142670 142670
Branches 17659 17647 -12
==========================================
- Hits 107852 107800 -52
- Misses 33766 33818 +52
Partials 1052 1052
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
4b8bc64 to
34ccab4
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
34ccab4 to
7bee325
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
no ref - allow benchmarks of dev tree as well as docker image to benchmark docker-specific boot time improvements
7bee325 to
af05f8e
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |

no ref
split out from #29790 to make the benchmark measurements appear