Skip to content

Conversation

troyciesco
Copy link
Contributor

@troyciesco troyciesco commented Jun 24, 2025

ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

  • deletes the entire AMP app and its associated tests
  • no longer includes AMP as a possible context type and removes any checks for it
  • removes other tests related to AMP posts
  • ignores AMP as a valid setting in SettingsImporter
  • removes amperize from package.json

Copy link
Contributor

coderabbitai bot commented Jun 24, 2025

Walkthrough

This change set removes all support for AMP (Accelerated Mobile Pages) from the codebase. It deletes the AMP frontend application, including routing logic, helper functions, and the AMP page template. All AMP-related utility functions, meta-data generation, and context handling have been stripped from the frontend and server logic. Settings, configuration, and import/export handling for AMP are also removed. Corresponding dependencies, such as "amperize", are deleted from the package manifest. All unit and integration tests related to AMP functionality and context are eliminated, and fixture data is updated to remove AMP settings and fields. The codebase no longer includes any AMP-specific features or code paths.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 451c3f0 and 88295dd.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (42)
  • ghost/core/core/frontend/apps/amp/index.js (0 hunks)
  • ghost/core/core/frontend/apps/amp/lib/helpers/amp_analytics.js (0 hunks)
  • ghost/core/core/frontend/apps/amp/lib/helpers/amp_components.js (0 hunks)
  • ghost/core/core/frontend/apps/amp/lib/helpers/amp_content.js (0 hunks)
  • ghost/core/core/frontend/apps/amp/lib/helpers/amp_style.js (0 hunks)
  • ghost/core/core/frontend/apps/amp/lib/router.js (0 hunks)
  • ghost/core/core/frontend/apps/amp/lib/views/amp.hbs (0 hunks)
  • ghost/core/core/frontend/meta/amp-url.js (0 hunks)
  • ghost/core/core/frontend/meta/context-object.js (1 hunks)
  • ghost/core/core/frontend/meta/get-meta.js (1 hunks)
  • ghost/core/core/frontend/meta/og-image.js (1 hunks)
  • ghost/core/core/frontend/meta/og-type.js (0 hunks)
  • ghost/core/core/frontend/meta/schema.js (1 hunks)
  • ghost/core/core/frontend/meta/twitter-image.js (1 hunks)
  • ghost/core/core/frontend/services/rendering/context.js (0 hunks)
  • ghost/core/core/server/api/endpoints/utils/serializers/input/utils/settings-filter-type-group-mapper.js (0 hunks)
  • ghost/core/core/server/api/endpoints/utils/serializers/input/utils/settings-key-group-mapper.js (0 hunks)
  • ghost/core/core/server/api/endpoints/utils/serializers/input/utils/settings-key-type-mapper.js (0 hunks)
  • ghost/core/core/server/data/importer/importers/data/SettingsImporter.js (1 hunks)
  • ghost/core/core/server/services/url/config.js (0 hunks)
  • ghost/core/package.json (0 hunks)
  • ghost/core/test/integration/importer/v2.test.js (2 hunks)
  • ghost/core/test/legacy/mock-express-style/parent-app-vhosts.test.js (4 hunks)
  • ghost/core/test/legacy/mock-express-style/utils/setup.js (0 hunks)
  • ghost/core/test/unit/api/canary/utils/serializers/input/utils/settings-filter-type-group-mapper.test.js (1 hunks)
  • ghost/core/test/unit/frontend/apps/amp/amp_components.test.js (0 hunks)
  • ghost/core/test/unit/frontend/apps/amp/amp_content.test.js (0 hunks)
  • ghost/core/test/unit/frontend/apps/amp/router.test.js (0 hunks)
  • ghost/core/test/unit/frontend/meta/amp-url.test.js (0 hunks)
  • ghost/core/test/unit/frontend/meta/author-fb-url.test.js (0 hunks)
  • ghost/core/test/unit/frontend/meta/author-image.test.js (0 hunks)
  • ghost/core/test/unit/frontend/meta/author-url.test.js (0 hunks)
  • ghost/core/test/unit/frontend/meta/context-object.test.js (0 hunks)
  • ghost/core/test/unit/frontend/meta/cover-image.test.js (0 hunks)
  • ghost/core/test/unit/frontend/meta/creator-url.test.js (0 hunks)
  • ghost/core/test/unit/frontend/meta/modified-date.test.js (0 hunks)
  • ghost/core/test/unit/frontend/meta/og-type.test.js (0 hunks)
  • ghost/core/test/unit/frontend/meta/published-date.test.js (0 hunks)
  • ghost/core/test/unit/frontend/meta/schema.test.js (0 hunks)
  • ghost/core/test/unit/frontend/services/rendering/context.test.js (0 hunks)
  • ghost/core/test/unit/frontend/services/rendering/templates.test.js (0 hunks)
  • ghost/core/test/utils/fixtures/export/valid.json (1 hunks)
💤 Files with no reviewable changes (32)
  • ghost/core/core/server/api/endpoints/utils/serializers/input/utils/settings-key-group-mapper.js
  • ghost/core/core/server/api/endpoints/utils/serializers/input/utils/settings-key-type-mapper.js
  • ghost/core/test/unit/frontend/meta/author-fb-url.test.js
  • ghost/core/core/server/api/endpoints/utils/serializers/input/utils/settings-filter-type-group-mapper.js
  • ghost/core/test/legacy/mock-express-style/utils/setup.js
  • ghost/core/test/unit/frontend/services/rendering/context.test.js
  • ghost/core/package.json
  • ghost/core/core/server/services/url/config.js
  • ghost/core/test/unit/frontend/meta/creator-url.test.js
  • ghost/core/test/unit/frontend/meta/author-url.test.js
  • ghost/core/test/unit/frontend/meta/og-type.test.js
  • ghost/core/test/unit/frontend/meta/modified-date.test.js
  • ghost/core/test/unit/frontend/meta/context-object.test.js
  • ghost/core/core/frontend/services/rendering/context.js
  • ghost/core/test/unit/frontend/meta/published-date.test.js
  • ghost/core/test/unit/frontend/services/rendering/templates.test.js
  • ghost/core/test/unit/frontend/meta/cover-image.test.js
  • ghost/core/core/frontend/meta/og-type.js
  • ghost/core/core/frontend/apps/amp/lib/helpers/amp_analytics.js
  • ghost/core/core/frontend/meta/amp-url.js
  • ghost/core/core/frontend/apps/amp/index.js
  • ghost/core/core/frontend/apps/amp/lib/helpers/amp_style.js
  • ghost/core/test/unit/frontend/apps/amp/amp_components.test.js
  • ghost/core/test/unit/frontend/meta/author-image.test.js
  • ghost/core/test/unit/frontend/meta/schema.test.js
  • ghost/core/core/frontend/apps/amp/lib/helpers/amp_components.js
  • ghost/core/test/unit/frontend/meta/amp-url.test.js
  • ghost/core/core/frontend/apps/amp/lib/helpers/amp_content.js
  • ghost/core/core/frontend/apps/amp/lib/views/amp.hbs
  • ghost/core/test/unit/frontend/apps/amp/router.test.js
  • ghost/core/core/frontend/apps/amp/lib/router.js
  • ghost/core/test/unit/frontend/apps/amp/amp_content.test.js
✅ Files skipped from review due to trivial changes (1)
  • ghost/core/core/server/data/importer/importers/data/SettingsImporter.js
🚧 Files skipped from review as they are similar to previous changes (9)
  • ghost/core/core/frontend/meta/context-object.js
  • ghost/core/core/frontend/meta/twitter-image.js
  • ghost/core/core/frontend/meta/get-meta.js
  • ghost/core/test/legacy/mock-express-style/parent-app-vhosts.test.js
  • ghost/core/test/unit/api/canary/utils/serializers/input/utils/settings-filter-type-group-mapper.test.js
  • ghost/core/core/frontend/meta/schema.js
  • ghost/core/core/frontend/meta/og-image.js
  • ghost/core/test/integration/importer/v2.test.js
  • ghost/core/test/utils/fixtures/export/valid.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Setup
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the migration [pull request] Includes migration for review label Jun 24, 2025
Copy link
Contributor

It looks like this PR contains a migration 👀
Here's the checklist for reviewing migrations:

General requirements

  • ⚠️ Tested on the staging database servers
  • Satisfies idempotency requirement (both up() and down())
  • Does not reference models
  • Filename is in the correct format (and correctly ordered)
  • Targets the next minor version
  • All code paths have appropriate log messages
  • Uses the correct utils
  • Contains a minimal changeset
  • Does not mix DDL/DML operations
  • Tested in MySQL and SQLite

Schema changes

  • Both schema change and related migration have been implemented
  • For index changes: has been performance tested for large tables
  • For new tables/columns: fields use the appropriate predefined field lengths
  • For new tables/columns: field names follow the appropriate conventions
  • Does not drop a non-alpha table outside of a major version

Data changes

  • Mass updates/inserts are batched appropriately
  • Does not loop over large tables/datasets
  • Defends against missing or invalid data
  • For settings updates: follows the appropriate guidelines

@troyciesco troyciesco changed the base branch from main to 6.x June 24, 2025 16:39
Copy link

codecov bot commented Jun 24, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 71.58%. Comparing base (cce1d06) to head (88295dd).
Report is 1 commits behind head on 6.x.

Files with missing lines Patch % Lines
ghost/core/core/frontend/meta/context-object.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              6.x   #24055      +/-   ##
==========================================
+ Coverage   71.30%   71.58%   +0.27%     
==========================================
  Files        1534     1527       -7     
  Lines      113998   113539     -459     
  Branches    13685    13675      -10     
==========================================
- Hits        81290    81280      -10     
+ Misses      31668    31220     -448     
+ Partials     1040     1039       -1     
Flag Coverage Δ
admin-tests 49.24% <ø> (+0.01%) ⬆️
e2e-tests 71.58% <83.33%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@troyciesco troyciesco force-pushed the 6.x-remove-amp-from-core branch from 6ef46be to 451c3f0 Compare June 24, 2025 17:58
@troyciesco troyciesco marked this pull request as ready for review June 24, 2025 18:37
@troyciesco troyciesco requested a review from kevinansfield June 24, 2025 18:42
@troyciesco troyciesco force-pushed the 6.x-remove-amp-from-core branch from 451c3f0 to d987e94 Compare June 25, 2025 12:12
@troyciesco troyciesco force-pushed the 6.x-remove-amp-from-core branch from d987e94 to 88295dd Compare June 25, 2025 13:42
@troyciesco troyciesco removed the migration [pull request] Includes migration for review label Jun 25, 2025
@troyciesco troyciesco merged commit 009b85e into 6.x Jun 25, 2025
46 of 51 checks passed
@troyciesco troyciesco deleted the 6.x-remove-amp-from-core branch June 25, 2025 14:45
ErisDS pushed a commit that referenced this pull request Jun 27, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jun 30, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 1, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 2, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 2, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 10, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 10, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 11, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 14, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 15, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 16, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 17, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 17, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 18, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 20, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
ErisDS pushed a commit that referenced this pull request Jul 21, 2025
ref #23924
closes https://linear.app/ghost/issue/PROD-2116/completely-remove-amp-app-from-core

- deletes the entire AMP app and its associated tests
- no longer includes AMP as a possible context type and removes any checks for it
- removes other tests related to AMP posts
- ignores AMP as a valid setting in SettingsImporter
- removes `amperize` from `package.json`
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