Restored @slack/webhook dependency for the Ghost(Pro) migrate script#28498
Restored @slack/webhook dependency for the Ghost(Pro) migrate script#28498jonatansberg wants to merge 1 commit into
Conversation
WalkthroughThis PR adds the Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
no ref - @slack/webhook, superagent and superagent-throttle were added to ghost/core as a workaround for internal Pro adapter files that are copied into the image at release time and resolve against core's node_modules - 8f2ec8d removed all three because knip flagged them unused - the consumers live outside this repo so knip/grep cannot see them - bbc3981 restored the superagent packages after Pro crashed at boot, but @slack/webhook was missed because migrate.js only requires it lazily inside notifySlack, so nothing failed until a migration actually went wrong - failed migrations then crashed with MODULE_NOT_FOUND, skipped failure alerting and exited 0 - pinned all three in knip.json ignoreDependencies so the next cleanup pass does not remove them again
167efdd to
b8aa5db
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28498 +/- ##
=======================================
Coverage 73.76% 73.76%
=======================================
Files 1541 1541
Lines 132364 132364
Branches 15834 15833 -1
=======================================
+ Hits 97637 97640 +3
+ Misses 33760 33735 -25
- Partials 967 989 +22
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:
|
Problem
Ghost(Pro) migrations are currently failing to alert.
migrate.js(copied into the Ghost(Pro) image at release time) crashes with:Because the require lives inside
notifySlack, theMODULE_NOT_FOUNDis thrown from inside the migrationcatchblocks beforeexitCode = 1is set and before the platform is notified of failure — so the alert never sends, the platform is never told a major migration failed, and the script exits0, letting the entrypoint attempt to boot Ghost instead of failing fast at the migrate step (Ghost then fails its own DB state check, so the failure surfaces as an unalerted boot crash-loop).Background
@slack/webhook,superagentandsuperagent-throttlewere deliberately added toghost/corein 5832ab5 as a workaround for internal Pro adapter files that are copied into the image at release time. Nothing in this repo imports them, so knip/grep cannot see the consumers.SchedulingProrequires them at module load), but@slack/webhookwas missed — its lazy require meant nothing failed until a migration actually went wrong.Changes
@slack/webhook@7.0.9(the version removed in Removed unused dependencies surfaced by knip #27720) toghost/coredependenciesknip.jsonvia aghost/coreworkspaceignoreDependenciesentry so the next cleanup pass does not remove them again (verifiedpnpm knipno longer flags any of them)