Skip to content

🎨 Further improved automation polling performance#29477

Merged
troyciesco merged 1 commit into
mainfrom
improve-fetch-steps-in-automations-poll-db-performance
Jul 21, 2026
Merged

🎨 Further improved automation polling performance#29477
troyciesco merged 1 commit into
mainfrom
improve-fetch-steps-in-automations-poll-db-performance

Conversation

@EvanHahn

Copy link
Copy Markdown
Contributor

no ref

When fetching automation steps to run, we try to lock up to 100 rows, then select any rows we've locked.

This improves the performance of that query by limiting it to our candidate rows. That means we'll only check 100 rows instead of the full database.

See also: #29476

no ref

When fetching automation steps to run, we try to lock up to 100 rows,
then select any rows we've locked.

This improves the performance of that query by limiting it to our
candidate rows. That means we'll only check 100 rows instead of the full
database.

See also: #29476
@nx-cloud

nx-cloud Bot commented Jul 21, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit db3e4b7

Command Status Duration Result
nx run ghost:test:ci:integration ✅ Succeeded 2m 21s View ↗
nx run ghost:test:integration ✅ Succeeded 3m View ↗
nx run ghost:test:legacy ✅ Succeeded 3m 3s View ↗
nx run ghost:test:e2e ✅ Succeeded 2m 34s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 19s View ↗
nx run-many -t test:unit -p ghost ✅ Succeeded 29s View ↗
nx run-many -t lint -p ghost,ghost-monorepo ✅ Succeeded 18s View ↗
nx run @tryghost/admin:build ✅ Succeeded 4s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-21 02:53:51 UTC

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: df64b3b7-fa08-484c-9ae4-db303cd368c8

📥 Commits

Reviewing files that changed from the base of the PR and between bab7706 and db3e4b7.

📒 Files selected for processing (1)
  • ghost/core/core/server/services/automations/database-automations-repository.ts

Walkthrough

Updated fetchAndLockSteps so its final query returns only locked automation_run_steps rows whose IDs were included in the original candidate set.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the changeset's main goal: improving automation polling performance.
Description check ✅ Passed The description is on-topic and explains the query lock optimization and its performance impact.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve-fetch-steps-in-automations-poll-db-performance

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.54%. Comparing base (a71827a) to head (db3e4b7).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29477      +/-   ##
==========================================
+ Coverage   74.50%   74.54%   +0.03%     
==========================================
  Files        1602     1602              
  Lines      140468   140469       +1     
  Branches    17058    17067       +9     
==========================================
+ Hits       104657   104713      +56     
+ Misses      34759    34738      -21     
+ Partials     1052     1018      -34     
Flag Coverage Δ
e2e-tests 76.62% <100.00%> (+0.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.

@EvanHahn
EvanHahn requested a review from troyciesco July 21, 2026 03:43
@troyciesco
troyciesco merged commit 6d1f6e7 into main Jul 21, 2026
50 checks passed
@troyciesco
troyciesco deleted the improve-fetch-steps-in-automations-poll-db-performance branch July 21, 2026 15:54
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