Skip to content

refactor: remove Strapi CMS and related infrastructure#8932

Open
tataihono wants to merge 2 commits intomainfrom
25-03-30-refactor-remove-strapi-cms
Open

refactor: remove Strapi CMS and related infrastructure#8932
tataihono wants to merge 2 commits intomainfrom
25-03-30-refactor-remove-strapi-cms

Conversation

@tataihono
Copy link
Copy Markdown
Contributor

@tataihono tataihono commented Mar 30, 2026

Summary

  • Remove the entire apps/cms/ Strapi application (dead infrastructure with no active consumers)
  • Clean up Terraform module references from prod and stage environment configs
  • Remove DOPPLER_CMS_TOKEN from all GitHub Actions workflows (including required: true declarations in worker workflows)
  • Remove CMS database creation from devcontainer setup, stale .gitignore entries, and documentation references
  • Regenerate pnpm-lock.yaml (8,500+ lines of Strapi dependencies removed)

Before Merging (Manual Steps)

Phase A — Infrastructure Teardown must be completed before merging this PR:

# Staging first
cd infrastructure/environments/stage
terraform destroy -target=module.cms
terraform plan  # Confirm zero CMS-related changes

# Then production
cd infrastructure/environments/prod
terraform destroy -target=module.cms
terraform plan  # Confirm zero CMS-related changes

After Merging (Manual Steps)

Phase C — Secret Cleanup:

  • Remove DOPPLER_CMS_TOKEN from GitHub repository secrets
  • Archive the CMS project in Doppler
  • Delete AWS SSM parameters: /terraform/prd/DOPPLER_CMS_PROD_TOKEN, /terraform/prd/DOPPLER_CMS_STAGE_TOKEN
  • (Optional) Clean up stale CMS Docker images from ECR
  • (Optional) Remove any Datadog dashboards/monitors referencing dd_source = "strapi"

Files Changed (16 modified + 50 deleted)

Area Files Action
CMS App apps/cms/ (50 files) Deleted entirely
Terraform infrastructure/environments/{prod,stage}/{main,data}.tf Removed CMS module + SSM data blocks
CI/CD 6 workflow files in .github/workflows/ Removed CMS jobs, tokens, and required declarations
Root config package.json, .gitignore, .devcontainer/post-create-command.sh Removed Strapi override, CMS DB setup, stale entries
Tooling .claude/rules/frontend/apps.md Removed CMS path
Docs apps/watch/.../README.md Removed stale CMS references

Post-Deploy Monitoring & Validation

No additional operational monitoring required: this removes dead infrastructure with no active consumers. After terraform destroy, verify that cms.central.jesusfilm.org and cms.stage.central.jesusfilm.org no longer resolve.

Test Plan

  • CI pipeline passes (no CMS references remain)
  • pnpm install succeeds with regenerated lockfile
  • Terraform plan shows clean state in both environments (after Phase A destroy)
  • No workflow failures from missing DOPPLER_CMS_TOKEN required secret

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]

Summary by CodeRabbit

  • Chores

    • Removed the CMS application and its local/dev infra, build and deployment configs, artifacts, and related repository entries (including CI/CD secret usage and devcontainer DB setup).
    • Deleted CMS infrastructure modules and environment wiring from production and staging workflows.
    • Cleared CMS-specific ignore rules and package override entries.
  • Documentation

    • Added planning and execution docs describing the CMS removal, rollout steps, and validation criteria.

The Strapi CMS (apps/cms/) was dead infrastructure with no active
consumers. This removes the entire app, Terraform module references,
CI/CD workflow entries, Doppler token declarations, devcontainer
database setup, and stale gitignore/docs references.

Phase A (terraform destroy) and Phase C (secret cleanup) are manual
steps to be completed separately.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@jesus-film-bot
Copy link
Copy Markdown

Ran Plan for dir: infrastructure workspace: default

Plan Failed: This project is currently locked by an unapplied plan from pull #8875. To continue, delete the lock from #8875 or apply that plan and merge the pull request.

Once the lock is released, comment atlantis plan here to re-plan.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

Walkthrough

Removes the Strapi CMS app and all associated artifacts: application source, build/config, Terraform infra, CI/CD secrets/jobs, devcontainer DB setup, package override, .gitignore entries, and adds documentation describing the removal plan and requirements.

Changes

Cohort / File(s) Summary
CMS Application Directory
apps/cms/*, apps/cms/...
Deleted entire CMS app: source code, Strapi configs (admin/api/database/middlewares/plugins/server), APIs (schemas, controllers, routes, services), components, index/bootstrap, Dockerfile, README, project/package/tsconfig/eslint files, and public assets.
Nx / Build Rules & Ignores
.claude/rules/frontend/apps.md, .gitignore, apps/cms/.gitignore
Removed CMS path from frontend rules, removed Strapi compiled config ignore patterns from root .gitignore, and deleted the CMS-specific .gitignore.
Devcontainer
.devcontainer/post-create-command.sh
Removed post-create CMS DB existence check/creation step.
GitHub Actions Workflows
.github/workflows/...
ecs-frontend-deploy-prod.yml, ecs-frontend-deploy-stage.yml, ecs-frontend-deploy-prod-worker.yml, ecs-frontend-deploy-stage-worker.yml, main.yml, ai-build-spike.yml
Removed cms job definitions and removed DOPPLER_CMS_TOKEN secret mappings/usages from multiple workflows; adjusted AI build spike prompt to stop rejecting cms target domain.
Terraform / Infrastructure
apps/cms/infrastructure/*, infrastructure/environments/prod/*, infrastructure/environments/stage/*
Deleted CMS Terraform locals/module usage and variable declarations in apps/cms/infrastructure; removed module "cms" from prod and stage environment main.tf and removed SSM data lookups for Doppler CMS tokens.
Package & Dependency Overrides
package.json
Cleared pnpm.overrides entry for strapi-blurhash>canvas (override removed).
Watch app docs
apps/watch/public/images/thumbnails/README.md
Removed guidance linking thumbnail naming to CMS slug patterns.
Documentation (new)
docs/brainstorms/2026-03-30-remove-strapi-cms-requirements.md, docs/plans/2026-03-30-001-refactor-remove-strapi-cms-plan.md
Added brainstorming and staged plan docs detailing CMS removal steps, prerequisites (terraform destroy ordering), and post-merge secret/infra cleanup instructions.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: removing the Strapi CMS application and its related infrastructure components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 25-03-30-refactor-remove-strapi-cms

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@infracost
Copy link
Copy Markdown

infracost bot commented Mar 30, 2026

💰 Infracost report

Monthly estimate decreased by $72 📉

Changed project Baseline cost Usage cost* Total change New monthly cost
infrastructure -$72 - -$72 (-3%) $2,427

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

Estimate details (includes details of unsupported resources)
Key: * usage cost, ~ changed, + added, - removed

──────────────────────────────────
Project: infrastructure
Module path: infrastructure

- module.prod.module.cms.module.ecs-task.aws_ecs_service.ecs_service
  -$36

    - Per GB per hour
      -$6

    - Per vCPU per hour
      -$30

- module.stage.module.cms.module.ecs-task.aws_ecs_service.ecs_service
  -$36

    - Per GB per hour
      -$6

    - Per vCPU per hour
      -$30

Monthly cost change for infrastructure (Module path: infrastructure)
Amount:  -$72 ($2,500 → $2,427)
Percent: -3%

──────────────────────────────────
Key: * usage cost, ~ changed, + added, - removed

*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options.

872 cloud resources were detected:
∙ 118 were estimated
∙ 752 were free
∙ 2 are not supported yet, see https://infracost.io/requested-resources:
  ∙ 1 x aws_s3_bucket_accelerate_configuration
  ∙ 1 x aws_s3_bucket_request_payment_configuration

Infracost estimate: Monthly estimate decreased by $72 ↓
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Changed project                                    ┃ Baseline cost ┃ Usage cost* ┃ Total change ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━━━┫
┃ infrastructure                                     ┃          -$72 ┃           - ┃   -$72 (-3%) ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┛
This comment will be updated when code changes.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

Fails
🚫 Please assign someone to merge this PR.
Warnings
⚠️ ❗ Big PR (11404 changes)

(change count - 11404): Pull Request size seems relatively large. If Pull Request contains multiple changes, split each into separate PR will helps faster, easier review.

Generated by 🚫 dangerJS against d6ea433

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Mar 30, 2026

View your CI Pipeline Execution ↗ for commit d6ea433

Command Status Duration Result
nx run journeys-admin-e2e:e2e ✅ Succeeded 1m 48s View ↗
nx run watch-e2e:e2e ✅ Succeeded 22s View ↗
nx run short-links-e2e:e2e ✅ Succeeded 5s View ↗
nx run docs-e2e:e2e ✅ Succeeded 3s View ↗
nx run journeys-e2e:e2e ✅ Succeeded 20s View ↗
nx run watch-modern-e2e:e2e ✅ Succeeded 5s View ↗
nx run resources-e2e:e2e ✅ Succeeded 11s View ↗
nx run videos-admin-e2e:e2e ✅ Succeeded 5s View ↗
Additional runs (28) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2026-03-30 09:54:09 UTC

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Mar 30, 2026

View your CI Pipeline Execution ↗ for commit d6ea433

Command Status Duration Result
nx run-many --target=upload-sourcemaps --projec... ✅ Succeeded 2s View ↗
nx run-many --target=deploy --projects=short-links ✅ Succeeded 33s View ↗
nx run-many --target=vercel-alias --projects=wa... ✅ Succeeded 2s View ↗
nx run-many --target=upload-sourcemaps --projec... ✅ Succeeded 3s View ↗
nx run-many --target=deploy --projects=watch-mo... ✅ Succeeded 23s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-30 09:46:49 UTC

@github-actions github-actions bot temporarily deployed to Preview - watch March 30, 2026 09:32 Inactive
@github-actions github-actions bot temporarily deployed to Preview - resources March 30, 2026 09:32 Inactive
@github-actions github-actions bot temporarily deployed to Preview - player March 30, 2026 09:32 Inactive
@github-actions github-actions bot temporarily deployed to Preview - videos-admin March 30, 2026 09:32 Inactive
@github-actions github-actions bot temporarily deployed to Preview - journeys-admin March 30, 2026 09:32 Inactive
@github-actions github-actions bot temporarily deployed to Preview - journeys March 30, 2026 09:32 Inactive
@github-actions github-actions bot temporarily deployed to Preview - short-links March 30, 2026 09:32 Inactive
@github-actions github-actions bot temporarily deployed to Preview - watch-modern March 30, 2026 09:32 Inactive
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/brainstorms/2026-03-30-remove-strapi-cms-requirements.md (1)

58-60: Minor: Markdown lint warnings on bracketed labels.

The [Needs research] and [Technical] labels are being parsed as undefined reference links by markdownlint. Since these are status labels rather than links, consider escaping the brackets or using a different format to silence the warnings.

✏️ Suggested fix
-- [Affects R2, R3][Needs research] Confirm exact Terraform module names and state paths for the CMS in prod and stage environments
-- [Affects R4][Needs research] Identify all GitHub Actions workflow files that reference the CMS app and determine which references to remove vs. which workflows to delete entirely
-- [Affects R8][Technical] Determine how Doppler CMS tokens are configured and the process to remove them
+- \[Affects R2, R3\]\[Needs research\] Confirm exact Terraform module names and state paths for the CMS in prod and stage environments
+- \[Affects R4\]\[Needs research\] Identify all GitHub Actions workflow files that reference the CMS app and determine which references to remove vs. which workflows to delete entirely
+- \[Affects R8\]\[Technical\] Determine how Doppler CMS tokens are configured and the process to remove them
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/brainstorms/2026-03-30-remove-strapi-cms-requirements.md` around lines
58 - 60, The bracketed status labels like [Needs research] and [Technical] are
being treated as undefined Markdown links; update the markdown in the listed
bullet lines to prevent lint warnings by either escaping the brackets (e.g.,
\[Needs research\]), replacing square brackets with a non-link format such as
parentheses or an inline tag (e.g., (Needs research) or `Needs research`), or
moving labels to a prefix/suffix outside square brackets so the items retain the
same meaning but no longer trigger markdownlint; apply this change to each
occurrence of [Needs research] and [Technical] in the shown bullets.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/brainstorms/2026-03-30-remove-strapi-cms-requirements.md`:
- Around line 58-60: The bracketed status labels like [Needs research] and
[Technical] are being treated as undefined Markdown links; update the markdown
in the listed bullet lines to prevent lint warnings by either escaping the
brackets (e.g., \[Needs research\]), replacing square brackets with a non-link
format such as parentheses or an inline tag (e.g., (Needs research) or `Needs
research`), or moving labels to a prefix/suffix outside square brackets so the
items retain the same meaning but no longer trigger markdownlint; apply this
change to each occurrence of [Needs research] and [Technical] in the shown
bullets.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7c915323-5c33-4509-986f-a6b0f3bbae5a

📥 Commits

Reviewing files that changed from the base of the PR and between 40c9509 and 94d431b.

⛔ Files ignored due to path filters (4)
  • apps/cms/favicon.png is excluded by !**/*.png
  • apps/cms/types/generated/components.d.ts is excluded by !**/generated/**
  • apps/cms/types/generated/contentTypes.d.ts is excluded by !**/generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (64)
  • .claude/rules/frontend/apps.md
  • .devcontainer/post-create-command.sh
  • .github/workflows/ai-build-spike.yml
  • .github/workflows/ecs-frontend-deploy-prod-worker.yml
  • .github/workflows/ecs-frontend-deploy-prod.yml
  • .github/workflows/ecs-frontend-deploy-stage-worker.yml
  • .github/workflows/ecs-frontend-deploy-stage.yml
  • .github/workflows/main.yml
  • .gitignore
  • apps/cms/.gitignore
  • apps/cms/Dockerfile
  • apps/cms/README.md
  • apps/cms/config/admin.ts
  • apps/cms/config/api.ts
  • apps/cms/config/database.ts
  • apps/cms/config/middlewares.ts
  • apps/cms/config/plugins.ts
  • apps/cms/config/server.ts
  • apps/cms/database/migrations/.gitkeep
  • apps/cms/eslint.config.mjs
  • apps/cms/index.ts
  • apps/cms/infrastructure/locals.tf
  • apps/cms/infrastructure/main.tf
  • apps/cms/infrastructure/variables.tf
  • apps/cms/package.json
  • apps/cms/project.json
  • apps/cms/public/robots.txt
  • apps/cms/public/uploads/.gitkeep
  • apps/cms/src/admin/app.example.tsx
  • apps/cms/src/admin/tsconfig.json
  • apps/cms/src/admin/vite.config.example.ts
  • apps/cms/src/api/.gitkeep
  • apps/cms/src/api/article/content-types/article/schema.json
  • apps/cms/src/api/article/controllers/article.ts
  • apps/cms/src/api/article/routes/article.ts
  • apps/cms/src/api/article/services/article.ts
  • apps/cms/src/api/author/content-types/author/schema.json
  • apps/cms/src/api/author/controllers/author.ts
  • apps/cms/src/api/author/routes/author.ts
  • apps/cms/src/api/author/services/author.ts
  • apps/cms/src/api/category/content-types/category/schema.json
  • apps/cms/src/api/category/controllers/category.ts
  • apps/cms/src/api/category/routes/category.ts
  • apps/cms/src/api/category/services/category.ts
  • apps/cms/src/api/client/content-types/client/schema.json
  • apps/cms/src/api/client/controllers/client.ts
  • apps/cms/src/api/client/routes/client.ts
  • apps/cms/src/api/client/services/client.ts
  • apps/cms/src/components/shared/media.json
  • apps/cms/src/components/shared/quote.json
  • apps/cms/src/components/shared/rich-text.json
  • apps/cms/src/components/shared/seo.json
  • apps/cms/src/components/shared/slider.json
  • apps/cms/src/extensions/.gitkeep
  • apps/cms/src/index.ts
  • apps/cms/tsconfig.json
  • apps/watch/public/images/thumbnails/README.md
  • docs/brainstorms/2026-03-30-remove-strapi-cms-requirements.md
  • docs/plans/2026-03-30-001-refactor-remove-strapi-cms-plan.md
  • infrastructure/environments/prod/data.tf
  • infrastructure/environments/prod/main.tf
  • infrastructure/environments/stage/data.tf
  • infrastructure/environments/stage/main.tf
  • package.json
💤 Files with no reviewable changes (56)
  • .gitignore
  • apps/cms/public/robots.txt
  • apps/cms/.gitignore
  • .claude/rules/frontend/apps.md
  • apps/cms/README.md
  • apps/cms/config/middlewares.ts
  • apps/cms/src/api/category/routes/category.ts
  • apps/cms/src/api/author/controllers/author.ts
  • apps/cms/src/admin/tsconfig.json
  • apps/cms/src/api/article/controllers/article.ts
  • .devcontainer/post-create-command.sh
  • apps/cms/config/api.ts
  • apps/cms/src/api/article/routes/article.ts
  • apps/cms/src/components/shared/quote.json
  • apps/cms/src/api/author/routes/author.ts
  • apps/cms/config/database.ts
  • apps/cms/package.json
  • apps/cms/tsconfig.json
  • .github/workflows/main.yml
  • infrastructure/environments/prod/data.tf
  • apps/cms/config/server.ts
  • infrastructure/environments/stage/data.tf
  • apps/cms/src/api/author/services/author.ts
  • apps/watch/public/images/thumbnails/README.md
  • apps/cms/src/api/category/services/category.ts
  • apps/cms/src/api/client/services/client.ts
  • apps/cms/src/admin/app.example.tsx
  • apps/cms/infrastructure/main.tf
  • .github/workflows/ecs-frontend-deploy-stage-worker.yml
  • apps/cms/src/api/author/content-types/author/schema.json
  • apps/cms/src/api/client/routes/client.ts
  • apps/cms/config/admin.ts
  • apps/cms/src/components/shared/rich-text.json
  • apps/cms/config/plugins.ts
  • apps/cms/project.json
  • .github/workflows/ecs-frontend-deploy-prod-worker.yml
  • apps/cms/eslint.config.mjs
  • infrastructure/environments/prod/main.tf
  • apps/cms/src/api/category/controllers/category.ts
  • infrastructure/environments/stage/main.tf
  • apps/cms/src/api/client/controllers/client.ts
  • apps/cms/src/index.ts
  • .github/workflows/ecs-frontend-deploy-prod.yml
  • apps/cms/src/admin/vite.config.example.ts
  • apps/cms/src/api/category/content-types/category/schema.json
  • apps/cms/src/components/shared/media.json
  • apps/cms/src/components/shared/slider.json
  • apps/cms/src/api/client/content-types/client/schema.json
  • .github/workflows/ecs-frontend-deploy-stage.yml
  • apps/cms/infrastructure/variables.tf
  • apps/cms/src/components/shared/seo.json
  • apps/cms/src/api/article/content-types/article/schema.json
  • apps/cms/infrastructure/locals.tf
  • apps/cms/index.ts
  • apps/cms/src/api/article/services/article.ts
  • apps/cms/Dockerfile

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
docs ✅ Ready docs preview Mon Mar 30 22:47:07 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
player ✅ Ready player preview Mon Mar 30 22:47:29 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
watch-modern ✅ Ready watch-modern preview Mon Mar 30 22:46:26 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
short-links ✅ Ready short-links preview Mon Mar 30 22:46:53 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys ✅ Ready journeys preview Mon Mar 30 22:47:23 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
videos-admin ✅ Ready videos-admin preview Mon Mar 30 22:48:30 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
resources ✅ Ready resources preview Mon Mar 30 22:48:11 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
watch ✅ Ready watch preview Mon Mar 30 22:48:15 NZDT 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys-admin ✅ Ready journeys-admin preview Mon Mar 30 22:49:33 NZDT 2026

@jesus-film-bot
Copy link
Copy Markdown

Ran Plan for dir: infrastructure workspace: default

Plan Failed: This project is currently locked by an unapplied plan from pull #8875. To continue, delete the lock from #8875 or apply that plan and merge the pull request.

Once the lock is released, comment atlantis plan here to re-plan.

@github-actions github-actions bot temporarily deployed to Preview - watch-modern March 30, 2026 09:44 Inactive
@github-actions github-actions bot temporarily deployed to Preview - resources March 30, 2026 09:44 Inactive
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
docs/plans/2026-03-30-001-refactor-remove-strapi-cms-plan.md (1)

142-146: Consider verifying the worker workflow caller assumption.

The plan assumes no external repositories call the reusable worker workflows. This assumption could be verified before proceeding with the changes.

🔍 Suggested verification step

Add a verification note to Phase B or as a pre-flight check:

**Verify worker workflow usage:**
Check if any external repositories reference the worker workflows:
- Search GitHub for references to `ecs-frontend-deploy-prod-worker.yml`
- Search GitHub for references to `ecs-frontend-deploy-stage-worker.yml`
- Confirm no external callers exist before removing `required: true` declarations

Alternatively, you could use GitHub's "Used by" feature in the Actions tab to check for external callers.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/plans/2026-03-30-001-refactor-remove-strapi-cms-plan.md` around lines
142 - 146, The plan assumes no external repositories call the reusable worker
workflows; add an explicit verification pre-flight step to Phase B (or before
removing required: true) that searches for external usages of
ecs-frontend-deploy-prod-worker.yml and ecs-frontend-deploy-stage-worker.yml
(e.g., GitHub code search for those filenames and use the Actions "Used by" UI)
and record the results; if any external callers are found, do not remove the
required: true declarations until callers are updated or coordinate migration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/plans/2026-03-30-001-refactor-remove-strapi-cms-plan.md`:
- Line 86: Update the fallback text for using "terraform state rm module.cms" to
warn that it decouples Terraform state from real AWS resources and can leave
orphaned cloud resources; instruct the reader to treat this as a last-resort
action only after exhausting attempts to recover the Terraform module source,
backing up the state, and manually verifying via AWS Console/CLI/SDK that every
CMS-related resource has been deleted (or to delete them manually first), then
document the removal and run a targeted drift check/plan to confirm no remaining
resources; ensure the wording replaces the current brief mention of "terraform
state rm module.cms" with these explicit verification and backup steps.
- Around line 68-86: Add a pre-flight check step before "Phase A: Terraform
Destroy" that verifies and clears Terraform locks (e.g., check remote/state
locks and any outstanding lock from PR `#8875`) so destroy won't be blocked;
explicitly state to run the lock-status check against the environment
(stage/prod), note the lock identifier to inspect, and include guidance to
either run the appropriate unlock operation or coordinate with the owner of the
lock before proceeding with terraform destroy -target=module.cms and the
subsequent terraform plan; reference "Phase A", "terraform destroy
-target=module.cms", and the outstanding lock from "PR `#8875`" so reviewers can
find and follow the new checklist entry.
- Around line 126-130: Replace the invalid nx command "nx graph --verify" in the
plan with a supported alternative: use "nx graph --print" if you need JSON
output for validation scripting, "nx graph" for the interactive visualization,
or "nx graph --affected --base=main" if the intent was to verify affected
projects; update the line referencing nx graph to one of these valid commands so
the plan runs on Nx 22.0.2.

---

Nitpick comments:
In `@docs/plans/2026-03-30-001-refactor-remove-strapi-cms-plan.md`:
- Around line 142-146: The plan assumes no external repositories call the
reusable worker workflows; add an explicit verification pre-flight step to Phase
B (or before removing required: true) that searches for external usages of
ecs-frontend-deploy-prod-worker.yml and ecs-frontend-deploy-stage-worker.yml
(e.g., GitHub code search for those filenames and use the Actions "Used by" UI)
and record the results; if any external callers are found, do not remove the
required: true declarations until callers are updated or coordinate migration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4889ae42-0248-48e9-a720-633b73dbb34a

📥 Commits

Reviewing files that changed from the base of the PR and between 94d431b and d6ea433.

⛔ Files ignored due to path filters (6)
  • apis/api-journeys/src/__generated__/graphql.ts is excluded by !**/__generated__/**
  • apps/journeys-admin/__generated__/globalTypes.ts is excluded by !**/__generated__/**
  • apps/journeys/__generated__/globalTypes.ts is excluded by !**/__generated__/**
  • apps/resources/__generated__/globalTypes.ts is excluded by !**/__generated__/**
  • apps/watch/__generated__/globalTypes.ts is excluded by !**/__generated__/**
  • libs/journeys/ui/__generated__/globalTypes.ts is excluded by !**/__generated__/**
📒 Files selected for processing (1)
  • docs/plans/2026-03-30-001-refactor-remove-strapi-cms-plan.md

Comment on lines +68 to +86
## Implementation Plan

### Phase A: Terraform Destroy (Manual, Pre-PR)

Run in staging first to validate, then production.

```bash
# Staging
cd infrastructure/environments/stage
terraform destroy -target=module.cms
terraform plan # Confirm zero CMS-related changes

# Production
cd infrastructure/environments/prod
terraform destroy -target=module.cms
terraform plan # Confirm zero CMS-related changes
```

**Fallback:** If destroy fails partially, resolve the blocking resource manually, then retry. If code removal has already happened, use `terraform state rm module.cms` to decouple state.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Add pre-flight checks for Terraform locks before Phase A.

The PR objectives comments mention an outstanding infrastructure lock from PR #8875 that blocks the plan. The implementation plan should include an explicit pre-flight check to identify and resolve any Terraform locks before attempting terraform destroy.

📋 Suggested addition before Phase A instructions

Add a pre-flight checklist section:

 ### Phase A: Terraform Destroy (Manual, Pre-PR)
 
+**Pre-flight checks:**
+
+1. Check for outstanding Terraform locks: `atlantis plan` or check Atlantis UI
+2. Resolve any blocking locks from other PRs (apply/merge or delete the lock)
+3. Verify CMS endpoints return no active traffic in last 30 days (check ALB/CloudWatch logs)
+4. Confirm with stakeholders that CMS data can be permanently deleted
+
 Run in staging first to validate, then production.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/plans/2026-03-30-001-refactor-remove-strapi-cms-plan.md` around lines 68
- 86, Add a pre-flight check step before "Phase A: Terraform Destroy" that
verifies and clears Terraform locks (e.g., check remote/state locks and any
outstanding lock from PR `#8875`) so destroy won't be blocked; explicitly state to
run the lock-status check against the environment (stage/prod), note the lock
identifier to inspect, and include guidance to either run the appropriate unlock
operation or coordinate with the owner of the lock before proceeding with
terraform destroy -target=module.cms and the subsequent terraform plan;
reference "Phase A", "terraform destroy -target=module.cms", and the outstanding
lock from "PR `#8875`" so reviewers can find and follow the new checklist entry.

terraform plan # Confirm zero CMS-related changes
```

**Fallback:** If destroy fails partially, resolve the blocking resource manually, then retry. If code removal has already happened, use `terraform state rm module.cms` to decouple state.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Strengthen warning about terraform state rm fallback.

Using terraform state rm module.cms as a fallback decouples Terraform state from actual AWS resources, which can leave orphaned resources in the cloud. This fallback should only be used after manually verifying that all CMS resources have been deleted from AWS, or after exhausting all other options to recover the Terraform module source.

⚠️ Suggested improved fallback guidance
-**Fallback:** If destroy fails partially, resolve the blocking resource manually, then retry. If code removal has already happened, use `terraform state rm module.cms` to decouple state.
+**Fallback:** If destroy fails partially, resolve the blocking resource manually in AWS console, then retry `terraform destroy`. If code removal has already happened and Terraform cannot manage the resources, first manually verify all CMS resources are deleted from AWS (ECS services, task definitions, ALB rules, target groups, DNS records, security groups), then use `terraform state rm module.cms` to decouple state. Document any orphaned resources found.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Fallback:** If destroy fails partially, resolve the blocking resource manually, then retry. If code removal has already happened, use `terraform state rm module.cms` to decouple state.
**Fallback:** If destroy fails partially, resolve the blocking resource manually in AWS console, then retry `terraform destroy`. If code removal has already happened and Terraform cannot manage the resources, first manually verify all CMS resources are deleted from AWS (ECS services, task definitions, ALB rules, target groups, DNS records, security groups), then use `terraform state rm module.cms` to decouple state. Document any orphaned resources found.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/plans/2026-03-30-001-refactor-remove-strapi-cms-plan.md` at line 86,
Update the fallback text for using "terraform state rm module.cms" to warn that
it decouples Terraform state from real AWS resources and can leave orphaned
cloud resources; instruct the reader to treat this as a last-resort action only
after exhausting attempts to recover the Terraform module source, backing up the
state, and manually verifying via AWS Console/CLI/SDK that every CMS-related
resource has been deleted (or to delete them manually first), then document the
removal and run a targeted drift check/plan to confirm no remaining resources;
ensure the wording replaces the current brief mention of "terraform state rm
module.cms" with these explicit verification and backup steps.

Comment on lines +126 to +130
```bash
pnpm install # Regenerates pnpm-lock.yaml without CMS deps
nx graph --verify # Confirm clean project graph
nx affected --target=build --base=main # Confirm no broken references
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify the correct Nx command for validating the project graph

# Check if --verify flag is documented
nx graph --help 2>&1 | grep -i verify

# Alternative: Check what flags are available for nx graph
echo "Available nx graph options:"
nx graph --help 2>&1 | grep -E '^\s+--' | head -20

Repository: JesusFilm/core

Length of output: 85


🏁 Script executed:

#!/bin/bash

# Test 1: Try running nx graph --verify to see if it works or produces an error
echo "=== Testing: nx graph --verify ==="
nx graph --verify 2>&1 | head -20

echo ""
echo "=== Test result exit code: $? ==="

# Test 2: Check Nx version
echo ""
echo "=== Nx Version ==="
nx --version

# Test 3: Run nx graph without flags to see what it does
echo ""
echo "=== Running: nx graph (without flags) ==="
nx graph 2>&1 | head -20

# Test 4: Look for valid verification commands in nx
echo ""
echo "=== Check for nx show projects command ==="
nx show projects --help 2>&1 | head -15

Repository: JesusFilm/core

Length of output: 417


🏁 Script executed:

#!/bin/bash

# Search for existing uses of "nx graph" in the codebase
echo "=== Searching for 'nx graph' usage in codebase ==="
rg "nx graph" --type md --type yaml --type json --type ts --type js -i 2>/dev/null | head -20

echo ""
echo "=== Searching for 'nx' verification or validation commands ==="
rg "nx (graph|show|verify)" --type md --type yaml -i 2>/dev/null | head -20

# Check nx.json and package.json for version info
echo ""
echo "=== Checking nx.json ==="
if [ -f "nx.json" ]; then
  cat nx.json | head -30
else
  echo "nx.json not found"
fi

echo ""
echo "=== Checking package.json for nx version ==="
if [ -f "package.json" ]; then
  rg '"nx":|"@nrwl' package.json
else
  echo "package.json not found"
fi

# Check for any documentation about nx commands in the repo
echo ""
echo "=== Searching for Nx documentation/guides in docs ==="
find docs -name "*.md" -type f 2>/dev/null | xargs rg "nx graph" -l 2>/dev/null | head -5

Repository: JesusFilm/core

Length of output: 1280


🌐 Web query:

Nx graph --verify command syntax valid flag options

💡 Result:

The nx graph --verify command does not exist in Nx. No official documentation or sources mention a --verify flag or subcommand for nx graph. The nx graph command visualizes project dependencies in the workspace. Basic syntax: nx graph Valid flags/options from official Nx documentation include: --affected: Highlight affected projects --base: Base git branch (usually main) --exclude: Exclude projects (comma-separated) --file: Output file (e.g., --file=output.json or --file=dep-graph.html) --files: Specify changed files for affected calculation --focus: Focus on a project and its ancestors/descendants --groupByFolder: Group projects by folder --head: Head git commit (usually HEAD) --help: Show help --host: Server host IP --open: Open in browser (default: true) --port: Server port --print: Print graph as JSON to stdout --targets: Targets for task graph --uncommitted: Include uncommitted changes --untracked: Include untracked changes --verbose: Additional logging --version: Show version --view: projects or tasks (default: projects) --watch: Watch for changes (default: true) Examples: nx graph --focus=my-project nx graph --file=graph.json nx graph --print nx graph --affected --base=main --head=HEAD Note: affected:graph was deprecated; use nx graph --affected instead. For project graph computation issues, use nx reset or set NX_DAEMON=false. No verification-specific command found across Nx docs, GitHub issues/PRs, or CLI help outputs.

Citations:


Replace nx graph --verify with a valid Nx command.

The --verify flag does not exist for nx graph in Nx 22.0.2. Use nx graph --print to output the project graph as JSON (useful for validation via scripting), or simply nx graph to view the interactive visualization. If the intent is to verify affected projects, use nx graph --affected --base=main.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/plans/2026-03-30-001-refactor-remove-strapi-cms-plan.md` around lines
126 - 130, Replace the invalid nx command "nx graph --verify" in the plan with a
supported alternative: use "nx graph --print" if you need JSON output for
validation scripting, "nx graph" for the interactive visualization, or "nx graph
--affected --base=main" if the intent was to verify affected projects; update
the line referencing nx graph to one of these valid commands so the plan runs on
Nx 22.0.2.

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