Skip to content

Removed ability to cancel in-progress email analytics jobs - #29869

Draft
EvanHahn wants to merge 1 commit into
mainfrom
stop-canceling-in-progress-email-analytics-jobs
Draft

Removed ability to cancel in-progress email analytics jobs#29869
EvanHahn wants to merge 1 commit into
mainfrom
stop-canceling-in-progress-email-analytics-jobs

Conversation

@EvanHahn

Copy link
Copy Markdown
Contributor

towards https://linear.app/ghost/issue/NY-1473

I recommend reviewing this with whitespace changes disabled.

Scheduled email analytics jobs can be canceled from a hidden debug screen. Not only does this cancel future jobs, it also stops processing existing jobs.

This has two disadvantages:

  • It makes the code more complex.
  • It relies on in-memory data, which we want to remove for statelessness purposes.

Given that this can only be canceled from a debug view, let's remove this small but troublesome feature.

I think this is a useful change on its own, but it'll make an upcoming change easier.


Stack created with GitHub Stacks CLIGive Feedback 💬

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 368e9f74-8a64-48f4-a194-109f8bf804c9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@nx-cloud

nx-cloud Bot commented Aug 10, 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 e4b23a5

Command Status Duration Result
nx run ghost:test:ci:integration ✅ Succeeded 3m View ↗
nx run @tryghost/admin:test:acceptance ✅ Succeeded 7m 33s View ↗
nx run ghost:test:integration ✅ Succeeded 3m 6s View ↗
nx run-many -t test:unit -p @tryghost/admin,ghost ✅ Succeeded 4m 39s View ↗
nx run ghost:test:legacy ✅ Succeeded 3m 9s View ↗
nx run ghost:test:e2e ✅ Succeeded 2m 42s View ↗
nx run ghost-admin:test ✅ Succeeded 2m 58s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 21s View ↗
Additional runs (3) ✅ Succeeded ... View ↗

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


☁️ Nx Cloud last updated this comment at 2026-08-11 17:07:24 UTC

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 6.66667% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.48%. Comparing base (b5293ba) to head (e4b23a5).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ervices/email-analytics/email-analytics-service.ts 6.66% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29869      +/-   ##
==========================================
+ Coverage   75.47%   75.48%   +0.01%     
==========================================
  Files        1606     1606              
  Lines      140753   140702      -51     
  Branches    17458    17456       -2     
==========================================
- Hits       106237   106213      -24     
- Misses      33439    33441       +2     
+ Partials     1077     1048      -29     
Flag Coverage Δ
admin-tests 55.97% <ø> (ø)
e2e-tests 77.64% <6.66%> (+0.01%) ⬆️

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.

@cmraible
cmraible force-pushed the stop-canceling-in-progress-email-analytics-jobs branch from d7e2c22 to a246c4f Compare August 11, 2026 16:28
Base automatically changed from typescriptify-email-analytics-service to main August 11, 2026 16:51
towards https://linear.app/ghost/issue/NY-1473

*I recommend reviewing this with whitespace changes disabled.*

Scheduled email analytics jobs can be canceled from a hidden debug
screen. Not only does this cancel future jobs, it also stops processing
existing jobs.

This has two disadvantages:

- It makes the code more complex.
- It relies on in-memory data, which we want to remove for statelessness
  purposes.

Given that this can only be canceled from a debug view, let's remove
this small but troublesome feature.

I think this is a useful change on its own, but it'll make [an upcoming
change][0] easier.

[0]: https://linear.app/ghost/issue/NY-1473
@EvanHahn
EvanHahn force-pushed the stop-canceling-in-progress-email-analytics-jobs branch from a246c4f to e4b23a5 Compare August 11, 2026 16:51
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.

1 participant