fix(gcp): resolve deprecation in GCP Stackdriver API#7350
fix(gcp): resolve deprecation in GCP Stackdriver API#7350majiayu000 wants to merge 3 commits intokedacore:mainfrom
Conversation
|
Thank you for your contribution! 🙏 Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected. While you are waiting, make sure to:
Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient. Learn more about our contribution guide. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
/run-e2e gcp |
|
could you fix DCO check please? |
|
Sorry, I will fix it soon. |
9a48a90 to
44f633d
Compare
Replace the deprecated MQL-based QueryTimeSeries API with the filter-based ListTimeSeries API for GCP PubSub metrics. Changes: - Remove deprecated QueryClient and QueryTimeSeries usage - Remove deprecated BuildMQLQuery and related MQL functions - Add GetPubSubMetrics method using filter-based API - Add NewPubSubAggregator to map aggregation functions to filter API - Update gcp_pubsub_scaler.go to use new GetPubSubMetrics method - Update tests to reflect API changes - Extract aggregation function names to constants - Replace string literals with constants in aligner/reducer/aggregator - Use switch for resource type handling in GetPubSubMetrics This change addresses the deprecation of MQL (Monitoring Query Language) announced by GCP. The new implementation uses the recommended ListTimeSeries API with filter strings, which provides equivalent functionality. Closes kedacore#6653 Signed-off-by: lif <1835304752@qq.com>
44f633d to
86f3e2c
Compare
|
/run-e2e gcp |
|
/run-e2e gcp_pubsub_topic |
When using the ListTimeSeries API with aggregations on distribution-type metrics (like message_sizes), the API may return DistributionValue type. This fix adds proper handling for: - DistributionValue: returns the count from the distribution - BoolValue: returns 1 for true, 0 for false Also adds comprehensive unit tests for extractValueFromPoint function. Signed-off-by: majiayu000 <jiayuma2@cisco.com>
|
/run-e2e gcp_pubsub_topic |
…-0502 Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
|
/run-e2e gcp |
|
afaict the commits are all signed off, I set the DCO to pass (the last commit is just resolving the CHANGELOG conflict) |
|
What I'm especially curious about is: Does this scaler still function exactly the same way after these changes? Are we sure that the scaling behavior for e.g. aggregation: "count" or aggregation: "sum" has the same scaling behavior? |
Fixes #6653
Changes
QueryTimeSeriesMQL-based API with filter-basedListTimeSeriesAPIGetPubSubMetricsmethod that uses existingGetMetricsinfrastructureQueryClientdependency and related MQL query building code