Skip to content

Conversation

@Zhaoyikaiii
Copy link
Collaborator

No description provided.

- Add CMDBv2 interface with PathV2 return type for full path information
- Implement SurrealDB query builder and response parser
- Add liveness graph for time-series resource matching
- Include comprehensive unit tests and mock infrastructure
- Add RelationMultiResourceResponseV2 and RelationMultiResourceRangeResponseV2 structs
- Implement BKBase SurrealDB client for resource relation queries
- Register v2 API endpoints: /api/v2/relation/multi_resource and multi_resource_range
- Add BKBase SurrealDB configuration options (url, auth, result_table_id, etc.)
  Add test coverage for SurrealDB response parsing including:
  - hop relation parsing with nested hops (hop2, hop3)
  - entity and liveness period parsing
  - error handling for malformed data
  - edge direction and category parsing
…isons

 - Replace assert.Len/Contains/False with complete struct assertions
 - Use assert.Equal to compare full LivenessGraph, NodeLiveness, EdgeLiveness structures
 - Fix Adjacency field expectations (stores edge IDs, not node IDs)
 - Use exact error message matching instead of Contains
Copy link
Collaborator Author

@Zhaoyikaiii Zhaoyikaiii left a comment

Choose a reason for hiding this comment

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

done

// CMDB v1 版本接口,返回路径为 []string
type CMDB interface {
// QueryResourceMatcher 获取目标的关键维度和值(instant 查询)
QueryResourceMatcher(ctx context.Context, lookBackDelta, spaceUid string, ts string, target, source Resource, indexesMatcher, expandMatcher Matcher, expandShow bool, pathResource []Resource) (Resource, Matcher, []string, Resource, Matchers, error)
Copy link
Collaborator

Choose a reason for hiding this comment

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

原 indexesMatcher 可以优化成 conditions 操作符

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