Skip to content

Conversation

@stevejalim
Copy link
Contributor

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

stevejalim and others added 14 commits December 19, 2025 16:06
- 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
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.87%. Comparing base (911ca18) to head (6f71ed2).

Files with missing lines Patch % Lines
bedrock/products/views.py 0.00% 2 Missing ⚠️
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.
📢 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.

@janbrasna
Copy link
Collaborator

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.)

@stevejalim
Copy link
Contributor Author

Haha @janbrasna I'd forgotten I had made that PR!

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.

Remove Contentful app, templates and related CSS bundles

3 participants