Skip to content

chore: custom node kinds cleanup BED-8537#2939

Closed
AD7ZJ wants to merge 1 commit into
mainfrom
BED-8537--Custom-node-kinds-cleanup
Closed

chore: custom node kinds cleanup BED-8537#2939
AD7ZJ wants to merge 1 commit into
mainfrom
BED-8537--Custom-node-kinds-cleanup

Conversation

@AD7ZJ

@AD7ZJ AD7ZJ commented Jun 29, 2026

Copy link
Copy Markdown
Member

Description

Now that custom_node_kinds is a full description of node kinds, we can clean up the various areas that are looking in multiple areas for node kinds. Note that this depends on BED-7922 PR #2829

Motivation and Context

Resolves https://specterops.atlassian.net/browse/BED-8537

How Has This Been Tested?

Updates to unit tests

Screenshots (optional):

Types of changes

  • Chore (a change that does not modify the application functionality)

Checklist:

Summary by CodeRabbit

  • New Features

    • Custom node kinds are now recognized consistently across kind listings and graph displays.
    • Primary display kinds now reflect configured custom node kinds and their icons.
    • Display labels correctly show configured names, while unsupported non-display kinds continue to use the unknown label.
  • Bug Fixes

    • Improved handling of custom node-kind validation and display behavior.
    • Removed inconsistencies between configured custom kinds and the kinds shown in API responses.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Custom node kinds are now used directly by API kind validation and primary display kind retrieval. Related tests replace graph-schema node-kind setup with custom node-kind configurations and verify display labels, names, icons, and result counts.

Changes

Custom node kind behavior

Layer / File(s) Summary
Direct custom kind validation
cmd/api/src/api/v2/kinds.go, cmd/api/src/api/v2/kinds_test.go
ListKinds converts custom kind names directly to graph.Kind values and no longer calls GetKindsByNames; corresponding mock expectations are removed.
Custom display kind retrieval
cmd/api/src/database/graphschema.go, cmd/api/src/database/database_integration_test.go, cmd/api/src/database/graphschema_integration_test.go
GetPrimaryDisplayKinds derives results from custom node kind icon configurations, while integration tests create custom kinds and verify display labels, names, icons, and counts.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: api, go

Suggested reviewers: mistahj67, urangel, seanjSO

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the main change and includes the associated ticket.
Description check ✅ Passed The description follows the template and includes the change summary, ticket reference, testing note, change type, and checklist.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch BED-8537--Custom-node-kinds-cleanup

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

@AD7ZJ
AD7ZJ force-pushed the BED-8537--Custom-node-kinds-cleanup branch 2 times, most recently from a855416 to 01ee28f Compare July 10, 2026 00:24
@AD7ZJ
AD7ZJ marked this pull request as ready for review July 10, 2026 19:24
@coderabbitai coderabbitai Bot added api A pull request containing changes affecting the API code. go Pull requests that update go code labels Jul 10, 2026
@AD7ZJ AD7ZJ self-assigned this Jul 14, 2026
@AD7ZJ
AD7ZJ force-pushed the BED-8537--Custom-node-kinds-cleanup branch from 7b03edb to 9de3f82 Compare July 16, 2026 22:47
@AD7ZJ AD7ZJ closed this Jul 16, 2026
@AD7ZJ
AD7ZJ deleted the BED-8537--Custom-node-kinds-cleanup branch July 16, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api A pull request containing changes affecting the API code. go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant