Skip to content

fix: check relationships before deprecating objects - #972

Merged
seansica merged 1 commit into
nextfrom
hotfix/lifecycle-relationship-integrity
Oct 6, 2026
Merged

seansica merged 1 commit into
nextfrom
hotfix/lifecycle-relationship-integrity

Conversation

@seansica

@seansica seansica commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Why

Deprecation saved the object and its relationship changes at the same time. That could retire the object before its relationships were ready, and embedded references were not checked.

What changes

  • Check for embedded references first. If any remain, explain what the user must remove and make no changes.
  • Otherwise, retire ordinary relationships first, then deprecate the object.
  • Keep existing subtechnique-of and revoked-by links.
  • Do not automatically deprecate a data source’s components. Their references must be resolved explicitly.

Checks

Verified in the browser: ordinary relationships retire first, special links remain unchanged, and embedded blockers prevent writes.

Companion API change: mitre-attack/attack-workbench-rest-api#514

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 69.96700% with 91 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.33%. Comparing base (fc89c77) to head (7a4aac2).

Files with missing lines Patch % Lines
...omponents/object-status/object-status.component.ts 27.11% 43 Missing ⚠️
...pp/views/stix/stix-dialog/stix-dialog.component.ts 37.03% 17 Missing ⚠️
src/app/services/helpers/deprecation.service.ts 91.42% 14 Missing and 1 partial ⚠️
...hboard-page/data-quality/data-quality.component.ts 65.78% 13 Missing ⚠️
.../connectors/rest-api/rest-api-connector.service.ts 25.00% 3 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             next     #972      +/-   ##
==========================================
+ Coverage   48.94%   49.33%   +0.38%     
==========================================
  Files         213      214       +1     
  Lines       29070    29203     +133     
  Branches     2291     2351      +60     
==========================================
+ Hits        14228    14406     +178     
+ Misses      14754    14708      -46     
- Partials       88       89       +1     

☔ View full report in Codecov by Harness.
📢 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.

@seansica
seansica merged commit 79b0f6d into next Oct 6, 2026
4 checks passed
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 4.16.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants