Skip to content
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

fix: reimplement removePartInstance flow for syncChangesToPartInstances #1410

Merged

Conversation

jstarpl
Copy link
Member

@jstarpl jstarpl commented Mar 20, 2025

Note

This is a rebase of the PR for release53 of #1408

About the Contributor

This pull request is posted on behalf of the BBC

Type of Contribution

This is a: Bug fix

Current Behavior

This is a regression believed to be introduced by #1035

The removePartInstance method on SyncIngestUpdateToPartInstanceContext is broken, it did not reset the PartInstance correctly.

This PR reimplements this for the new model approach.

As part of this, some refactoring was done first, to make it easier to unit test portions of this logic. Not many tests have been added as part of this, but tests have been added for removePartInstance.

I have not looked into backporting this fix to earlier releases, but I suspect it would be pretty straightforward to rebase it without the refactoring or unit tests.

Testing

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

Affected areas

Time Frame

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

Sorry, something went wrong.

@jstarpl jstarpl requested a review from a team as a code owner March 20, 2025 12:42
@jstarpl jstarpl changed the base branch from master to release52 March 20, 2025 12:42
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 85.67073% with 47 lines in your changes missing coverage. Please review.

Project coverage is 56.57%. Comparing base (b2d584e) to head (17106c7).
Report is 11 commits behind head on release52.

Files with missing lines Patch % Lines
...job-worker/src/ingest/syncChangesToPartInstance.ts 85.89% 45 Missing ⚠️
...s/context/SyncIngestUpdateToPartInstanceContext.ts 77.77% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           release52    #1410      +/-   ##
=============================================
+ Coverage      56.25%   56.57%   +0.32%     
=============================================
  Files            408      408              
  Lines          73125    73255     +130     
  Branches        4625     4665      +40     
=============================================
+ Hits           41133    41445     +312     
+ Misses         31901    31591     -310     
- Partials          91      219     +128     

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

@jstarpl jstarpl added Contribution External contribution Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) 🐛🔨 bugfix This is a fix for an issue labels Mar 20, 2025
@jstarpl jstarpl merged commit 92ee08d into release52 Mar 25, 2025
67 checks passed
@jstarpl jstarpl deleted the fix/rebase/r52/syncingestchanges-removePartInstance branch March 25, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛🔨 bugfix This is a fix for an issue Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) Contribution External contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants