-
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 <marcelo.bartsch@letgo.com>
Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
add noDataErr to tests add missinng threshold to tests add better error description when NerdGraph query fails Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
also fix the test so newrelic is replaced by new-relic to keep consistency on the names Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
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 <marcelo.bartsch@letgo.com>
…v variables Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
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 <marcelo.bartsch@letgo.com>
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
https://github.com/kedacore/keda/runs/4448161285?check_suite_focus=true#step:8:96 |
I think that it's not. I will try your PR in my local |
Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
/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 <marcelo.bartsch@letgo.com>
Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
/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 <marcelo.bartsch@letgo.com>
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 <726523+zroubalik@users.noreply.github.com> Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
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 <marcelo.bartsch@letgo.com>
/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 <marcelo.bartsch@letgo.com>
…elic Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com>
a9830a8
to
22519f7
Compare
Signed-off-by: Marcelo Bartsch <marcelo.bartsch@letgo.com> Co-authored-by: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com> Signed-off-by: alex60217101990 <alex6021710@gmail.com>
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.