Skip to content

fix: support nested structures in New Relic scaler #6831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rickbrouwer
Copy link
Member

Enhanced response parser to handle nested map structures. The New Relic scaler fails to parse percentile query responses due to nested JSON structure.

Checklist

Fixes #6825

@rickbrouwer
Copy link
Member Author

rickbrouwer commented Jun 11, 2025

/run-e2e newrelic
Update: You can check the progress here

@wozniakjan wozniakjan requested a review from Copilot June 11, 2025 10:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request enhances the New Relic scaler to correctly parse responses that contain nested JSON structures, addressing issues where percentile query responses were not handled correctly.

  • Enhanced response parsing logic to support nested structures.
  • Added comprehensive test cases to cover various response scenarios including nested percentile values and error conditions.
  • Updated the changelog to document the feature.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pkg/scalers/newrelic_scaler_test.go Added new test cases to verify nested JSON response parsing behavior.
pkg/scalers/newrelic_scaler.go Updated the parsing logic to handle nested maps in the query results.
CHANGELOG.md Updated changelog with an entry for the new nested structures support.

Copy link
Member

@wozniakjan wozniakjan left a comment

Choose a reason for hiding this comment

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

lgtm, thank you!

@rickbrouwer
Copy link
Member Author

rickbrouwer commented Jun 11, 2025

/run-e2e newrelic
Update: You can check the progress here

@rickbrouwer rickbrouwer changed the title feat: support nested structures in New Relic scaler fix: support nested structures in New Relic scaler Jun 12, 2025
@rickbrouwer
Copy link
Member Author

rickbrouwer commented Jun 12, 2025

/run-e2e newrelic
Update: You can check the progress here

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.

query return no results when using percentile() function in NRQL
2 participants