feat(pipelinecontrol): add OttlTransform field and make NRQL nullable on PipelineCloudRuleEntity - #1474
Open
pranav-new-relic wants to merge 1 commit into
Open
Conversation
… on PipelineCloudRuleEntity PipelineCloudRuleEntity.NRQL is changing from Nrql! to Nrql in ep-next-gen-api (PR #1860) to support a new OTTL-based rule type alongside existing NRQL rules. This commit prepares the Go client: - NRQL field: nrdb.NRQL -> *nrdb.NRQL with omitempty so null responses from NGEP deserialise to nil rather than empty string - OttlTransform field added to EntityManagementPipelineCloudRuleEntity with a new EntityManagementPipelineCloudRuleEntityOttlTransform struct (logStatements, eventStatements, metricStatements, traceStatements) - getEntityQuery and getEntitySearchQuery updated to fetch ottlTransform from the inline PipelineCloudRuleEntity fragment - Create/Update input types are intentionally unchanged: they always carry NRQL for NRQL-based rules and OTTL inputs are not yet supported Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1474 +/- ##
==========================================
+ Coverage 32.71% 32.75% +0.04%
==========================================
Files 148 148
Lines 6939 6939
==========================================
+ Hits 2270 2273 +3
+ Misses 4455 4454 -1
+ Partials 214 212 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prepares
pkg/pipelinecontrolfor the NGEP schema change in ep-next-gen-api PR #1860, which relaxesPipelineCloudRuleEntity.nrqlfromNrql!toNrqland adds a newottlTransformsibling field to support OTTL-based pipeline cloud rules alongside existing NRQL rules.Changes
EntityManagementPipelineCloudRuleEntity.NRQL:nrdb.NRQL→*nrdb.NRQLwithomitempty— null responses from NGEP now deserialise tonilinstead of silently coercing to empty stringOttlTransformfield added toEntityManagementPipelineCloudRuleEntitywith a newEntityManagementPipelineCloudRuleEntityOttlTransformstruct (logStatements,eventStatements,metricStatements,traceStatements)getEntityQueryandgetEntitySearchQueryupdated to fetchottlTransform { ... }in the... on EntityManagementPipelineCloudRuleEntityinline fragmentNRQL nrdb.NRQL(non-pointer) for NRQL-based rules; OTTL input support is deferred until the backend shipsTest plan
go build ./pkg/pipelinecontrol/...passes (verified locally)nrql)OttlTransformand nilNRQL🤖 Generated with Claude Code