feat: add FederatedLogSetup, AwsConnection, and FederatedLogPartition entity support to pipelinecontrol#1377
feat: add FederatedLogSetup, AwsConnection, and FederatedLogPartition entity support to pipelinecontrol#1377voorepreethi wants to merge 1 commit intonewrelic:mainfrom
Conversation
504dcb5 to
6aff2e1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1377 +/- ##
==========================================
- Coverage 33.04% 31.92% -1.12%
==========================================
Files 136 140 +4
Lines 6256 6737 +481
==========================================
+ Hits 2067 2151 +84
- Misses 3990 4386 +396
- Partials 199 200 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f04274e to
3630c2a
Compare
4cd4961 to
45098aa
Compare
67711f6 to
f7ba608
Compare
…dLogPartition support with update/delete mutations and tests
088bd56 to
4256acc
Compare
maya-jha
left a comment
There was a problem hiding this comment.
Can you please mention which files are auto generated and which files are updated by you?
| - name: entityManagementCreateFederatedLogSetup | ||
| max_query_field_depth: 4 | ||
| - name: entityManagementCreateAwsConnection | ||
| max_query_field_depth: 3 |
There was a problem hiding this comment.
This is the reason : max_query_field_depth = deepest nesting level in the GraphQL response. AwsConnection has 3 levels (entity → credential → assumeRole), FederatedLogSetup and FederatedLogPartition have 4 levels (entity → metadata → createdBy → __typename). Tutone uses this to know how deep to generate fields.
| require.Error(t, err) | ||
| require.Nil(t, result) | ||
| } | ||
|
|
maya-jha
left a comment
There was a problem hiding this comment.
I see fleet related entity here: https://github.com/newrelic/newrelic-client-go/tree/30c29f31adbfcfcd7c9f41b9da6b4473284c9e6c/pkg/fleetcontrol . Can we get some guidance from the owning team of this repo whether we should create a new folder for federated logs? How much effort required if we move to a dedicated folder?
|
Files are not autogenerated. Code is . |
Summary
Adds support for three new entity types in the pipelinecontrol package: FederatedLogSetupEntity, AwsConnectionEntity, and FederatedLogPartitionEntity. These enable full lifecycle management of federated log infrastructure resources via the Entity Management API.
Changes
New API Methods
Federated Log Setup
EntityManagementCreateFederatedLogSetup / WithContext — create a Federated Log Setup entity
EntityManagementUpdateFederatedLogSetup / WithContext — update an existing Federated Log Setup entity
Federated Log Partition
EntityManagementCreateFederatedLogPartition / WithContext — create a Federated Log Partition entity
EntityManagementUpdateFederatedLogPartition / WithContext — update an existing Federated Log Partition entity
AWS Connection
EntityManagementCreateAwsConnection / WithContext — create an AWS Connection entity
Search
GetEntitySearch / WithContext — search entities with filters and cursor-based pagination
Tests
Unit Tests (27 total)
Federated Log Setup (6)
Create: success, with-context, error
Update: success, with-context, error
Federated Log Partition (6)
Create: success, with-context, error
Update: success, with-context, error
AWS Connection (3)
Create: success, with-context, error
GetEntity (2)
Returns FederatedLogSetupEntity type assertion
Returns AwsConnectionEntity type assertion
GetEntitySearch (4)
Success, with-context, empty results, error
Integration Tests
TestIntegrationEntityManagement_FederatedLogSetup_CRUD — full create/read/update/delete cycle (gated by RUN_FEDERATED_LOG_SETUP_TEST=true)
TestIntegrationEntityManagement_FederatedLogSetup_Create — standalone create test with real credentials (gated by env vars)