-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: Provide New Relic scaler #2387
Conversation
Add an option to make empty data returned by query as an error Make sure test-app has at least 1 pod and keda-test-app is 0 before running tests Signed-off-by: Marcelo Bartsch <[email protected]>
Signed-off-by: Marcelo Bartsch <[email protected]>
add noDataErr to tests add missinng threshold to tests add better error description when NerdGraph query fails Signed-off-by: Marcelo Bartsch <[email protected]>
also fix the test so newrelic is replaced by new-relic to keep consistency on the names Signed-off-by: Marcelo Bartsch <[email protected]>
Signed-off-by: Marcelo Bartsch <[email protected]>
hi @marcelobartsch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general, but there is a pending change to make e2e test possible.
Please, update the (GitHub) workloads to pass the new environment variables to the actions where tests are executed.
There are 3 places to update:
- https://github.com/kedacore/keda/blob/main/.github/workflows/main-build.yml#L64-L82
- https://github.com/kedacore/keda/blob/main/.github/workflows/nightly-e2e.yml#L18-L36
- https://github.com/kedacore/keda/blob/main/.github/workflows/pr-e2e.yml#L62-L84
You should add these lines:
NEWRELIC_API_KEY: ${{ secrets.NEWRELIC_API_KEY}}
NEWRELIC_ACCOUNT_ID: ${{ secrets.NEWRELIC_ACCOUNT_ID}}
I have just added them in the repository. After your change, I will trigger e2e test to check it :)
Thanks for this contribution! ❤️
Yes, in fact all my tests have been done using a free account tier, so I don't mix my test with our company data, so it is perfectly good! |
For the E2E you will also need the NEWRELIC_LICENSE environment variable, the scaler itself don't need it, but the nri-bundle which install the components needed in the kubernetes cluster use it. NEWRELIC_API_KEY always start with NRAK This is a common issue , at least for us , we always mix up them when we started years ago :) I added those lines to the files you mentions NEWRELIC_ACCOUNT_ID: ${{ secrets.NEWRELIC_ACCOUNT_ID}}
NEWRELIC_API_KEY: ${{ secrets.NEWRELIC_API_KEY}}
NEWRELIC_LICENSE: ${{ secrets.NEWRELIC_LICENSE}} NEWRELIC_LICENSE is new so probably you will need to add it to secrets. |
Signed-off-by: Marcelo Bartsch <[email protected]>
…v variables Signed-off-by: Marcelo Bartsch <[email protected]>
I will add it right now, thanks :) |
The terms are a bit tricky, but I have updated both following your instructions :) |
/run-e2e new-relic.test* |
/run-e2e new-relic.test* |
/run-e2e new-relic.test* |
Signed-off-by: Marcelo Bartsch <[email protected]>
6aa6f9c
to
91ee020
Compare
Woking on fix the E2E test, for some reason it works on local (which I know is no excuse :D ) |
@JorTurFer any chance the e2e test had limited from where it can download the helm charts? I got this error
|
I think that it's not. I will try your PR in my local |
Signed-off-by: Marcelo Bartsch <[email protected]>
Signed-off-by: Marcelo Bartsch <[email protected]>
Signed-off-by: Marcelo Bartsch <[email protected]>
/run-e2e new-relic.test* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in newRelicHelmPackageName
. Look the suggestion to see where is and how it could be fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, update the e2e test to use EU region because our new relic account is in EU. Thanks :)
Make use of variables for helm package repo instead of hardcoded it (Thanks Jorge!) Split long lines on the test to make more easy to ready and catch errors Signed-off-by: Marcelo Bartsch <[email protected]>
Signed-off-by: Marcelo Bartsch <[email protected]>
/run-e2e new-relic.test* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks fot your contribution ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, update CHANGELOG.md
Signed-off-by: Marcelo Bartsch <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks fot your contribution ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looking good, I have some minor comments.
Co-authored-by: Zbynek Roubalik <[email protected]> Signed-off-by: Marcelo Bartsch <[email protected]>
c7947d5
to
8aa68e4
Compare
Rename noDataErr to noDataError Move 'new-relic' scaler name to a const so don't repeat the string Signed-off-by: Marcelo Bartsch <[email protected]>
/run-e2e new-relic.test* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
/run-e2e new-relic.test* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove metricName
from the test and fix the conflict in the workflows & Changelog and we can merge this!
Thanks
Signed-off-by: Marcelo Bartsch <[email protected]>
…elic Signed-off-by: Marcelo Bartsch <[email protected]>
Signed-off-by: Marcelo Bartsch <[email protected]>
a9830a8
to
22519f7
Compare
Signed-off-by: Marcelo Bartsch <[email protected]> Co-authored-by: Zbynek Roubalik <[email protected]> Signed-off-by: alex60217101990 <[email protected]>
Provide New Relic scaler.
Checklist
Relates to #2290
This is a 'redo' of PR #2286 as I had an issue in my REPO and had to start over, but I manage to rescue the files.