Skip to content
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

Prometheus scaler add option to ignore null value #3073

Conversation

bamboo12366
Copy link
Contributor

@bamboo12366 bamboo12366 commented May 27, 2022

Provide a description of what has been changed

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Tests have been added
  • [N/A] A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
  • A PR is opened to update the documentation on (repo) (if applicable)
  • Changelog has been updated and is aligned with our changelog requirements

Fixes #3065
Relates to #3064
Relates to kedacore/keda-docs#769 (docs)

Signed-off-by: Xinzhu Zhou <bamboo12366@gmail.com>
Signed-off-by: Xinzhu Zhou <bamboo12366@gmail.com>
Signed-off-by: Xinzhu Zhou <bamboo12366@gmail.com>
Signed-off-by: Xinzhu Zhou <bamboo12366@gmail.com>
Signed-off-by: Xinzhu Zhou <bamboo12366@gmail.com>
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

The change looks good in general. Thanks for this improvement
Some nits to be addressed:

  • There is a test failing TestPrometheusScalerCortexHeader
  • Open a PR in keda-docs updating the doc about prometheus scaler (only in the latest version)
  • Inline comment in changelog

Apart from that, IDK if it makes sense adding another e2e test to check this new behaviour, WDYT?

CHANGELOG.md Outdated Show resolved Hide resolved
@JorTurFer JorTurFer requested a review from zroubalik May 27, 2022 20:32
Signed-off-by: Xinzhu Zhou <bamboo12366@gmail.com>
@bamboo12366
Copy link
Contributor Author

The change looks good in general. Thanks for this improvement Some nits to be addressed:

  • There is a test failing TestPrometheusScalerCortexHeader
  • Open a PR in keda-docs updating the doc about prometheus scaler (only in the latest version)
  • Inline comment in changelog

Apart from that, IDK if it makes sense adding another e2e test to check this new behaviour, WDYT?

The change looks good in general. Thanks for this improvement Some nits to be addressed:

  • There is a test failing TestPrometheusScalerCortexHeader
  • Open a PR in keda-docs updating the doc about prometheus scaler (only in the latest version)
  • Inline comment in changelog

Apart from that, IDK if it makes sense adding another e2e test to check this new behaviour, WDYT?

The changelog and TestPrometheusScalerCortexHeader already updated.
I will update the keda-doc these days.
I think it unnecessary to do e2e in this case, cause I already cover this one in test file by mocking the prometheus return data, which will be the same thing in e2e.

@bamboo12366 bamboo12366 changed the title Bamboo/prometheus scaler add option to ignore null value prometheus scaler add option to ignore null value May 29, 2022
Signed-off-by: Xinzhu Zhou <bamboo12366@gmail.com>
@bamboo12366
Copy link
Contributor Author

The PR related to keda-doc: kedacore/keda-docs#769

pkg/scalers/prometheus_scaler.go Outdated Show resolved Hide resolved
pkg/scalers/prometheus_scaler.go Outdated Show resolved Hide resolved
pkg/scalers/prometheus_scaler.go Outdated Show resolved Hide resolved
Signed-off-by: Xinzhu Zhou <bamboo12366@gmail.com>
@JorTurFer
Copy link
Member

JorTurFer commented May 30, 2022

/run-e2e prometheus*
Update: You can check the progres here

Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

LGTM, only 1 thing inline
Thanks for the improvement! ❤️

pkg/scalers/prometheus_scaler.go Outdated Show resolved Hide resolved
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

Looking good, just a few nits.

@NaveLevi would be nice if you can take a look on this

pkg/scalers/prometheus_scaler.go Outdated Show resolved Hide resolved
Signed-off-by: Xinzhu Zhou <bamboo12366@gmail.com>
@zroubalik
Copy link
Member

Signed-off-by: Xinzhu Zhou <bamboo12366@gmail.com>
Signed-off-by: Xinzhu Zhou <bamboo12366@gmail.com>
@zroubalik
Copy link
Member

zroubalik commented May 31, 2022

/run-e2e prometheus*
Update: You can check the progres here

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

LGTM

@zroubalik zroubalik changed the title prometheus scaler add option to ignore null value Prometheus scaler add option to ignore null value May 31, 2022
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

LGTM! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prometheus scaler - add option to consider null values as errors
4 participants