Added show_share_button column to newsletters#26939
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (5)
WalkthroughThis change introduces a new 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
It looks like this PR contains a migration 👀 General requirements
Schema changes
Data changes
|
bfa013c to
e6aad7d
Compare
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 23503341707 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
d43d63a to
642bd8c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26939 +/- ##
==========================================
+ Coverage 73.18% 73.23% +0.04%
==========================================
Files 1539 1539
Lines 121668 121669 +1
Branches 14718 14729 +11
==========================================
+ Hits 89039 89100 +61
+ Misses 31621 31540 -81
- Partials 1008 1029 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
642bd8c to
b07ca74
Compare
| show_comment_cta: boolean; | ||
| show_subscription_details: boolean; | ||
| show_latest_posts: boolean; | ||
| show_share_button: boolean; |
There was a problem hiding this comment.
i dont think this type update and the newsletters.json normally get included in a migration PR...but i think they should?
When i first set up this PR i basically just had the bare min migration files, but migration-related changes in tests failed here.
So i added it to the model and it seemed to pass from there, and i had to then update the snapshots accordingly. with that in mind it makes sense to me that the type and the test response data also should be updated.
Unless i hit a weird sqlite edge-case on the first run in that test? i'm not sure, i'd never hit that error before when doing a migration.
There was a problem hiding this comment.
Genuinely just a question, I'm not sure: given that the admin pieces of this will deploy right away ahead of the migration, will this cause any issues if this field doesn't exist in the API responses?
There was a problem hiding this comment.
Unless i hit a weird sqlite edge-case on the first run in that test? i'm not sure, i'd never hit that error before when doing a migration.
I've also never encountered that error, but it does seem a bit fishy. You've defined a default value, so it shouldn't encounter any NOT NULL constraints 🤔
There was a problem hiding this comment.
we've talked outside this thread about this, but to summarize here for the curious (cc @EvanHahn):
- the model change is needed and included in other migrations of this type (like Added
show_latest_postscolumn to newsletter table #16402)
given that the admin pieces of this will deploy right away ahead of the migration, will this cause any issues if this field doesn't exist in the API responses?
we don't think so. once this is merged, these server changes won't deploy to Pro right away, they'll need a rollout. but because there are no changes to the admin code to try and reference/useshow_share_buttonwe should be ok, even if it's still hitting server version6.22.1, effectively. once the server is next rolled out it will be6.23-rc.0, and then we can safely add code that references it.
|
|
||
| module.exports = createAddColumnMigration('newsletters', 'show_share_button', { | ||
| type: 'boolean', | ||
| nullable: false, |
There was a problem hiding this comment.
praise: love when a field is not nullable.
b07ca74 to
dbbdc52
Compare
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 23559505758 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
1 similar comment
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 23559505758 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
ref https://linear.app/ghost/issue/FEA-480
show_share_buttoncolumn to newsletters to prep for future share button functionality6.23.0-rc.0