Skip to content

Conversation

@adgad
Copy link
Collaborator

@adgad adgad commented Feb 17, 2025

Problem

We need a way to validate that our migration library (from-bodyxml) works for all of FT pink's content

Proposed solution

A test in CircleCI that:

  • gets CAPI notifications from the last 5 minutes
  • runs from-bodyxml on them
  • validates against the generated JSON schemas for ContentTree.transit

Example: https://app.circleci.com/pipelines/github/Financial-Times/content-tree/453/workflows/98438d49-c044-48d6-98c7-6ae43fcc3593/jobs/445/steps

Limitations

  • This is useful for recent articles, but isn't likely to pick up old/archived content (where there is likely to be weirder stuff)
  • It will validate that the tree we produce is valid, but not necessarily correct (for example, if our transformer chose an incorrect but still valid value for layoutWidth, this test would pass). A possible improvement here is to also compare the output against what is being created by cp-content-pipeline-api (assuming that is a reasonable source-of-truth for correctness, given it currently serves the website).

Despite the limitations, hopefully this is still useful at least for an indication of how close to complete the migration code is.

@adgad adgad requested review from a team and chee as code owners February 17, 2025 13:54
Copy link
Contributor

@epavlova epavlova left a comment

Choose a reason for hiding this comment

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

Despite the limitations mentioned, I think it's useful.

@adgad adgad merged commit 4279bfb into main Feb 18, 2025
2 of 4 checks passed
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