-
Notifications
You must be signed in to change notification settings - Fork 953
Remove contentful from the codebase #16960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Replace Contentful-based active_locale_available() with Wagtail query - Remove resource center view functions and URL patterns - Remove Contentful imports and unused helper functions - Keep vpn_resource_center_redirect() for backward compatibility - Fix circular import by moving model import inside function 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Remove ContentfulPage import - Delete FirefoxContentful view class - Remove Contentful URL pattern - Remove unused settings import 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Remove ContentfulPage import - Delete ContentfulPreviewView class - Delete dev_urls.py file (only contained Contentful preview URL) - Remove dev_urls import and usage from mozorg/urls.py - Remove unused imports (method_decorator, never_cache, settings) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Remove ContentfulEntry import - Delete get_contentful_sync_info() function - Remove contentful_info from cron-health-check context - Remove unused tz_now import 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Remove Contentful imports - Delete _get_vrc_urls() and get_contentful_urls() functions - Remove get_contentful_urls() call from get_all_urls() 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Delete all contentful/tests/ files - Delete mozorg/tests/contentful_test_urlconf.py - Remove Contentful imports and tests from base/tests/test_views.py - Remove Contentful test classes from products/tests/test_views.py - Remove Contentful tests and mocking from sitemaps/tests/test_utils.py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Remove bedrock.contentful.constants import - Remove bedrock.contentful from INSTALLED_APPS - Delete all CONTENTFUL_* settings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Remove contentful==2.5.0 from requirements/prod.in - Regenerate requirements/prod.txt 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Remove entire bedrock/contentful/ directory including: - models, views, API code, utilities - management commands - migrations (database tables will remain for later cleanup) - templates and templatetags - all other files and subdirectories 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Remove contentful.ContentfulEntry from export-db-to-sqlite.sh - Remove Contentful data import/export section from fill-empty-postgres-database.sh 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Delete contentful-all.html templates from mozorg and firefox - Remove Contentful sync info from cron-health-check.html - Delete test_contentful_preview_view test from mozorg/tests - Remove unused imports (Mock, pytest) from mozorg/tests/test_views.py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Remove 15 Contentful-related bundle definitions from static-bundles.json - Delete all CSS files in media/css/contentful/ directory - Remove bundle definitions: mozilla-c-article, mozilla-c-call-out, mozilla-c-picto, mozilla-c-section-heading, mozilla-c-split, mozilla-c-card, mozilla-t-multi-column, firefox-c-article, firefox-c-call-out, firefox-c-picto, firefox-c-section-heading, firefox-c-split, c-logo, firefox-c-card, firefox-t-multi-column 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Add URL patterns for VPN Resource Center pages that are now CMS-only: - products.vpn.resource-center.landing - products.vpn.resource-center.article These were previously in products/urls.py with prefer_cms() decorator but removed when Contentful views were deleted. Adding them here allows reverse URL lookups to work while pages are served by the CMS. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Remove contentful per-file-ignores from pyproject.toml - Remove contentful module from example_sentry_payload.json - Remove contentful_migrations ignore pattern from eslint.config.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16960 +/- ##
==========================================
+ Coverage 80.36% 80.87% +0.51%
==========================================
Files 163 156 -7
Lines 9100 8210 -890
==========================================
- Hits 7313 6640 -673
+ Misses 1787 1570 -217 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Well a good review would be comparing the changeset to #15845 how the copilot compares to the original engineer;] (There's e.g. an extra redirect test thrown in for good measure.) |
|
Haha @janbrasna I'd forgotten I had made that PR! |
One-line summary
Now that the VPN Resource Center content has been migrated to Wagtail, we can finally remove the code that rendered those pages based on data synced into the DB from Contentful (which we stopped syncing ages ago)
Significant changes and points to review
Best to review this commit by commit - it was performed by Claude Code, using a plan I generated with its support and which I reviewed beforehand. There were a few gaps which led to mop-up commits at the end. This PR will remain Draft until I've re-reviewed the commits myself
Issue / Bugzilla link
Resolves #15843
Testing
AWS_DB_S3_BUCKET=bedrock-db-prod make preflight- which contains Wagtail-held VPN RC pages