Skip to content

create placeholder facts if they're None when creating relationships#3248

Merged
clenk merged 3 commits into
masterfrom
issue-3247
Jan 29, 2026
Merged

create placeholder facts if they're None when creating relationships#3248
clenk merged 3 commits into
masterfrom
issue-3247

Conversation

@uruwhy
Copy link
Copy Markdown
Contributor

@uruwhy uruwhy commented Jan 29, 2026

Description

Addresses #3247 by creating placeholder source/target facts if creating a relationship that is missing them. Out-of-the-box parsers will create relationships with both source and target facts (even if their traits and values are empty), but custom user-made parsers may not always create the actual corresponding fact objects. This change creates an additional guard-rail.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Modified an existing parser to skip creating a target fact object and verified the relationship was created correctly and that it shows up in the fact source for a test operation.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@uruwhy uruwhy marked this pull request as ready for review January 29, 2026 20:53
@uruwhy uruwhy requested a review from clenk January 29, 2026 20:53
@sonarqubecloud
Copy link
Copy Markdown

1 similar comment
@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

1 similar comment
@sonarqubecloud
Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@clenk clenk left a comment

Choose a reason for hiding this comment

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

LGTM

@clenk clenk merged commit a9371d4 into master Jan 29, 2026
14 checks passed
@clenk clenk deleted the issue-3247 branch January 29, 2026 21:35
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