Skip to content

fix: cap scalers-cache reader at a per-reader budget derived from globalHTTPTimeout#7780

Merged
wozniakjan merged 2 commits into
kedacore:mainfrom
wozniakjan:agent/timebox-scalers-cache-close-wait
May 29, 2026
Merged

fix: cap scalers-cache reader at a per-reader budget derived from globalHTTPTimeout#7780
wozniakjan merged 2 commits into
kedacore:mainfrom
wozniakjan:agent/timebox-scalers-cache-close-wait

Conversation

@wozniakjan

@wozniakjan wozniakjan commented May 26, 2026

Copy link
Copy Markdown
Member

followup to #7737. The PR got merged before discussion regarding timeboxing the wait for active scalers during cache rebuild got concluded. I think #7737 is a great addition fixing real issue. My only concern was regarding the possible awry scaler taking too long to respond and affecting other scalers in the ScaledObject and their behavior.

Users will be able to set this through globalHTTPTimeout to control the drain mechanism to not exceed a configured timeout for this operation.

Checklist

Relates to #7737
Relates to #7574

@wozniakjan wozniakjan requested a review from a team as a code owner May 26, 2026 09:00
@wozniakjan wozniakjan requested a review from Copilot May 26, 2026 09:00
@keda-automation keda-automation requested a review from a team May 26, 2026 09:00
@github-actions

Copy link
Copy Markdown

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:

  • Add an entry in our changelog in alphabetical order and link related issue
  • Update the documentation, if needed
  • Add unit & e2e tests for your changes
  • GitHub checks are passing
  • Is the DCO check failing? Here is how you can fix DCO issues

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-io

snyk-io Bot commented May 26, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@wozniakjan

Copy link
Copy Markdown
Member Author

if we conclude this is worth having, I will spin up a PR to charts and docs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a configurable timeout for draining in-flight scaler cache readers during cache rebuild/close, preventing a single slow or stuck scaler read from stalling cache replacement indefinitely (follow-up to the reader-tracking fix added in #7737).

Changes:

  • Add KEDA_SCALERS_CACHE_READERS_DRAIN_TIMEOUT (default 5s) and plumb it from operator startup into the scale handler and scalers cache.
  • Update ScalersCache.Close() to wait for readers with a bounded timeout before proceeding to close underlying scalers.
  • Add unit tests validating timeout and “disabled timeout” behavior.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pkg/util/env_resolver.go Adds env var constant for the new drain-timeout configuration.
cmd/operator/main.go Resolves the drain timeout from env (default 5s) and passes it into controllers/handlers.
pkg/scaling/scale_handler.go Extends NewScaleHandler to carry the drain timeout and sets it on newly built caches.
pkg/scaling/cache/scalers_cache.go Implements timeboxed waiting for active readers during cache close.
pkg/scaling/cache/scalers_cache_test.go Adds tests covering timeout honoring and disabled-timeout behavior.
controllers/keda/scaledjob_controller.go Plumbs the timeout into the ScaledJob controller’s scale handler.
controllers/keda/suite_test.go Updates the scale handler constructor call in controller test setup.
CHANGELOG.md Documents the new env var behavior in the unreleased changelog.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/scaling/cache/scalers_cache.go Outdated
Comment thread pkg/scaling/cache/scalers_cache.go Outdated
Comment thread pkg/scaling/cache/scalers_cache_test.go
Comment thread controllers/keda/suite_test.go Outdated
Comment thread CHANGELOG.md Outdated
@rickbrouwer

Copy link
Copy Markdown
Member

I'm struggling a bit with how this interacts with globalHTTPTimeout?

@wozniakjan wozniakjan force-pushed the agent/timebox-scalers-cache-close-wait branch from ef47d38 to f337a15 Compare May 26, 2026 09:25
@wozniakjan

wozniakjan commented May 26, 2026

Copy link
Copy Markdown
Member Author

I'm struggling a bit with how this interacts with globalHTTPTimeout?

for scalers that use keda's HTTP client, it would be effectively min(drain_timeout, global_http_timeout). But not all scalers use this HTTP client, iirc external scaler doesn't because it's over gRPC client where KEDA doesn't allow users to set custom timeouts. Similar to many scalers using third-party clients. For those call to GetMetrics() also doesn't have the configurability to set timeouts through globalHTTPTimeout and the defaults might be fairly long.

@wozniakjan wozniakjan added the nice-to-have:keda-v2.20 Not strictly necessary, but nice if you can bring it along label May 27, 2026
@wozniakjan wozniakjan force-pushed the agent/timebox-scalers-cache-close-wait branch from f337a15 to 09996f8 Compare May 27, 2026 16:30
@keda-automation keda-automation requested a review from a team May 27, 2026 16:30
@wozniakjan wozniakjan force-pushed the agent/timebox-scalers-cache-close-wait branch 2 times, most recently from 7c93d2f to 3de48c3 Compare May 27, 2026 17:06
Comment thread pkg/util/env_resolver.go Outdated
@wozniakjan

wozniakjan commented May 27, 2026

Copy link
Copy Markdown
Member Author

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

@rickbrouwer

Copy link
Copy Markdown
Member

I'm wondering whether this could be smaller and simpler. Since the rebuild path already detaches the old cache via go oldCache.Close(ctx), a hard drain timeout there seems largely redundant. Could we get away with applying the timeout only on the synchronous delete path, or even with a fixed, non-configurable upper bound instead of a new env var? That would drop the whole configuration layer (env var, plumbing, controller fields, default resolver) and leave just the small waitForReaders block, roughly half the code (or more I think) for nearly the same result.

Would something along those lines be worth considering, or is there a case I'm missing that justifies the configurable approach?

@wozniakjan

Copy link
Copy Markdown
Member Author

Would something along those lines be worth considering, or is there a case I'm missing that justifies the configurable approach?

you bring a good point, there is a very little benefit for timeboxing async cache close when the cache is hotswapped (just a temporary goroutine running doesn't hurt that much).

or even with a fixed, non-configurable upper bound instead of a new env var?

I guess constant would be ok too, with these types of timeouts I usually default to configurability but the use case in configuring this particular timeout is also rather limited

I am trying to explore another alternative, trying to see if I can refactor the synchronous path to also be asynchronous and then this timebox wouldn't be necessary at all

@rickbrouwer

Copy link
Copy Markdown
Member

I am trying to explore another alternative, trying to see if I can refactor the synchronous path to also be asynchronous and then this timebox wouldn't be necessary at all

Great that you're exploring this Jan! This would be a much cleaner outcome than a timebox, so it's well worth a try.

@wozniakjan wozniakjan removed the nice-to-have:keda-v2.20 Not strictly necessary, but nice if you can bring it along label May 29, 2026
@wozniakjan wozniakjan marked this pull request as draft May 29, 2026 06:16
@wozniakjan wozniakjan force-pushed the agent/timebox-scalers-cache-close-wait branch from 3de48c3 to 265403e Compare May 29, 2026 12:03
@keda-automation keda-automation requested a review from a team May 29, 2026 12:03
@wozniakjan wozniakjan force-pushed the agent/timebox-scalers-cache-close-wait branch from 265403e to 4a9d3ea Compare May 29, 2026 12:07
@wozniakjan wozniakjan marked this pull request as ready for review May 29, 2026 12:07
@wozniakjan

wozniakjan commented May 29, 2026

Copy link
Copy Markdown
Member Author

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

passed tests: 195
Execution of tests/scalers/dynatrace_dql/dynatrace_dql_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_managed_prometheus_pod_identity/aws_managed_prometheus_pod_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/external_scaler_sj/external_scaler_sj_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_cloudwatch_min_metric_value/aws_cloudwatch_min_metric_value_test.go, has passed after "one" attempts
Execution of tests/internals/scaling_strategies/eager_scaling_strategy/eager_scaling_strategy_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_service_bus_topic/azure_service_bus_topic_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_http_aad_wi/rabbitmq_queue_http_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_http_dpratio/rabbitmq_queue_http_dpratio_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_standalone_streams_lag/redis_standalone_streams_lag_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_sqs_queue_pod_identity/aws_sqs_queue_pod_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/external_push_scaler/external_push_scaler_test.go, has passed after "one" attempts
Execution of tests/scalers/nats_jetstream/nats_jetstream_standalone/nats_jetstream_standalone_test.go, has passed after "one" attempts
Execution of tests/secret-providers/gcp_secret_manager/gcp_secret_manager_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_sqs_queue_pod_identity_eks/aws_sqs_queue_pod_identity_eks_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_event_hub_dapr/azure_event_hub_dapr_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_event_hub_go_sdk/azure_event_hub_go_sdk_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_sentinel_streams_pending_entries/redis_sentinel_streams_pending_entries_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_cloudwatch_metric_stat/aws_cloudwatch_metric_stat_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_blob/azure_blob_test.go, has passed after "one" attempts
Execution of tests/internals/value_metric_type/value_metric_type_test.go, has passed after "two" attempts
Execution of tests/scalers/github_runner/github_runner_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_queue/azure_queue_test.go, has passed after "one" attempts
Execution of tests/scalers/loki/loki_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_standalone_streams_pending_entries/redis_standalone_streams_test_pending_entries_test.go, has passed after "one" attempts
Execution of tests/scalers/mysql/mysql_test.go, has passed after "one" attempts
Execution of tests/internals/idle_replicas/idle_replicas_test.go, has passed after "one" attempts
Execution of tests/internals/subresource_scale/subresource_scale_test.go, has passed after "two" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_http/rabbitmq_queue_http_test.go, has passed after "one" attempts
Execution of tests/scalers/couchdb/couchdb_test.go, has passed after "two" attempts
Execution of tests/scalers/pulsar/pulsar_non_partitioned_topic/pulsar_non_partitioned_topic_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_event_hub_dapr_wi/azure_event_hub_dapr_wi_test.go, has passed after "one" attempts
Execution of tests/internals/events/events_test.go, has passed after "one" attempts
Execution of tests/scalers/nsq/nsq_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_cloudwatch_pod_identity_eks/aws_cloudwatch_pod_identity_eks_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_blob_aad_wi/azure_blob_aad_wi_test.go, has passed after "one" attempts
Execution of tests/secret-providers/aws_secretmanager/aws_secretmanager_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_cluster_streams_lag/redis_cluster_streams_lag_test.go, has passed after "one" attempts
Execution of tests/internals/custom_hpa_name/custom_hpa_name_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_standalone_lists/redis_standalone_lists_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_cloudwatch_cross_account/aws_cloudwatch_cross_account_test.go, has passed after "one" attempts
Execution of tests/internals/scaling_modifiers/scaling_modifiers_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_kinesis_stream/aws_kinesis_stream_test.go, has passed after "one" attempts
Execution of tests/scalers/mongodb/mongodb_test.go, has passed after "one" attempts
Execution of tests/internals/replica_update_so/replica_update_so_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_dynamodb_streams_pod_identity_eks/aws_dynamodb_streams_pod_identity_eks_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_cloudwatch_expression/aws_cloudwatch_expression_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_log_analytics_aad_wi/azure_log_analytics_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/influxdb/influxdb_v2/influxdb_v2_test.go, has passed after "one" attempts
Execution of tests/internals/cloudevent_source/cloudevent_source_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_dynamodb_streams/aws_dynamodb_streams_test.go, has passed after "one" attempts
Execution of tests/secret-providers/azure_workload_identity_user_assigned/azure_workload_identity_user_assigned_test.go, has passed after "one" attempts
Execution of tests/internals/pause_scale_in_restore/pause_scale_in_restore_test.go, has passed after "one" attempts
Execution of tests/scalers/postgresql/postgresql_high_available/postgresql_ha_test.go, has passed after "one" attempts
Execution of tests/internals/eventemitter/azureeventgridtopic/azureeventgridtopic_test.go, has passed after "two" attempts
Execution of tests/internals/pause_scaledobject/pause_scaledobject_test.go, has passed after "one" attempts
Execution of tests/scalers/sumologic/sumologic_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_standalone_streams_length/redis_standalone_streams_length_test.go, has passed after "one" attempts
Execution of tests/internals/scaled_object_validation/scaled_object_validation_test.go, has passed after "two" attempts
Execution of tests/scalers/arangodb/arangodb_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_cluster_streams_pending_entries/redis_cluster_streams_pending_entries_test.go, has passed after "one" attempts
Execution of tests/secret-providers/azure_keyvault_workload_identity/azure_keyvault_workload_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_cluster_lists/redis_cluster_lists_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_service_bus_queue_aad_wi/azure_service_bus_queue_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/etcd/etcd_cluster_auth/etcd_cluster_auth_test.go, has passed after "one" attempts
Execution of tests/scalers/graphite/graphite_test.go, has passed after "one" attempts
Execution of tests/internals/initial_delay_cooldownperiod/initial_delay_cooldownperiod_test.go, has passed after "one" attempts
Execution of tests/scalers/elastic_forecast/elastic_forecast_test.go, has passed after "one" attempts
Execution of tests/scalers/dynatrace/dynatrace_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_amqp/rabbitmq_queue_amqp_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_dynamodb_pod_identity_eks/aws_dynamodb_pod_identity_eks_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_managed_prometheus/aws_managed_prometheus_test.go, has passed after "one" attempts
Execution of tests/scalers/gcp/gcp_storage/gcp_storage_test.go, has passed after "one" attempts
Execution of tests/internals/trigger_update_so/trigger_update_so_test.go, has passed after "one" attempts
Execution of tests/scalers/postgresql/postgresql_standalone/postgresql_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_dynamodb_pod_identity/aws_dynamodb_pod_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_kinesis_stream_pod_identity/aws_kinesis_stream_pod_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_data_explorer_aad_wi/azure_data_explorer_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/ibmmq/ibmmq_test.go, has passed after "one" attempts
Execution of tests/secret-providers/azure_keyvault/azure_keyvault_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_http_auth/rabbitmq_queue_http_auth_test.go, has passed after "one" attempts
Execution of tests/scalers/gcp/gcp_cloud_tasks_workload_identity/gcp_cloud_tasks_workload_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_monitor/azure_monitor_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_dynamodb_streams_pod_identity/aws_dynamodb_streams_pod_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/gcp/gcp_stackdriver/gcp_stackdriver_test.go, has passed after "one" attempts
Execution of tests/internals/cache_metrics/cache_metrics_test.go, has passed after "one" attempts
Execution of tests/secret-providers/trigger_auth_bound_service_account_token/trigger_auth_bound_service_account_token_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_cloudwatch_pod_identity/aws_cloudwatch_pod_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_amqp_auth/rabbitmq_queue_amqp_auth_test.go, has passed after "one" attempts
Execution of tests/internals/pause_scaledjob/pause_scaledjob_test.go, has passed after "one" attempts
Execution of tests/internals/trigger_authentication_validation/trigger_authentication_validation_test.go, has passed after "one" attempts
Execution of tests/scalers/solace/direct-messaging/solace_dm_test.go, has passed after "one" attempts
Execution of tests/internals/status_update/status_update_test.go, has passed after "one" attempts
Execution of tests/internals/pause_scale_out/pause_scale_out_test.go, has passed after "one" attempts
Execution of tests/secret-providers/aws_secretmanager_pod_identity/aws_secretmanager_pod_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/mssql/mssql_test.go, has passed after "one" attempts
Execution of tests/secret-providers/trigger_auth_secret/trigger_auth_secret_test.go, has passed after "one" attempts
Execution of tests/internals/restore_original/restore_original_test.go, has passed after "one" attempts
Execution of tests/scalers/artemis/artemis_test.go, has passed after "one" attempts
Execution of tests/scalers/external_scaler_so/external_scaler_so_test.go, has passed after "one" attempts
Execution of tests/internals/file_based_auth/file_based_auth_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_application_insights_aad_wi/azure_application_insights_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_http_eqct/rabbitmq_queue_http_eqct_test.go, has passed after "one" attempts
Execution of tests/internals/fallback/rollouts/fallback_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_pipelines_adv/azure_pipelines_adv_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_sentinel_streams_lag/redis_sentinel_streams_lag_test.go, has passed after "one" attempts
Execution of tests/internals/update_ta/update_ta_test.go, has passed after "one" attempts
Execution of tests/scalers/solarwinds/solarwinds_test.go, has passed after "one" attempts
Execution of tests/scalers/mssql/azure_mssql_aad_wi/azure_mssql_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_cluster_streams_length/redis_cluster_streams_length_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_sentinel_streams_length/redis_sentinel_streams_length_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_event_hub_blob_metadata_wi/azure_event_hub_blob_metadata_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_http_dget/rabbitmq_queue_http_dget_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_http_regex_vhost/rabbitmq_queue_http_regex_vhost_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_amqp_vhost/rabbitmq_queue_amqp_vhost_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_queue_aad_wi/azure_queue_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_sqs_queue/aws_sqs_queue_test.go, has passed after "one" attempts
Execution of tests/scalers/cpu/cpu_test.go, has passed after "one" attempts
Execution of tests/scalers/postgresql/azure_postgresql_flex_server_aad_wi/azure_postgresql_flex_server_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_event_hub_blob_metadata/azure_event_hub_blob_metadata_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_dynamodb/aws_dynamodb_test.go, has passed after "one" attempts
Execution of tests/scalers/influxdb/influxdb_v3/influxdb_v3_test.go, has passed after "one" attempts
Execution of tests/secret-providers/aws_identity_assume_role/aws_identity_assume_role_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_data_explorer/azure_data_explorer_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_kinesis_stream_pod_identity_eks/aws_kinesis_stream_pod_identity_eks_test.go, has passed after "one" attempts
Execution of tests/scalers/prometheus/prometheus_test.go, has passed after "one" attempts
Execution of tests/scalers/pulsar/pulsar_partitioned_topic/pulsar_partitioned_topic_test.go, has passed after "one" attempts
Execution of tests/scalers/external_push_scaler_old_proto/external_push_scaler_old_proto_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_pipelines/azure_pipelines_test.go, has passed after "two" attempts
Execution of tests/scalers/azure/azure_service_bus_queue_regex/azure_service_bus_queue_regex_test.go, has passed after "one" attempts
Execution of tests/scalers/gcp/gcp_prometheus_workload_identity/gcp_prometheus_workload_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_log_analytics/azure_log_analytics_test.go, has passed after "one" attempts
Execution of tests/secret-providers/aws_identity_external_id/aws_identity_external_id_test.go, has passed after "one" attempts
Execution of tests/scalers/gcp/gcp_pubsub_topic/gcp_pubsub_topic_test.go, has passed after "one" attempts
Execution of tests/internals/pause_scale_in/pause_scale_in_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_http_regex_aad_wi/rabbitmq_queue_http_regex_aad_wi_test.go, has passed after "one" attempts
Execution of tests/internals/scaled_job_validation/scaled_job_validation_test.go, has passed after "one" attempts
Execution of tests/scalers/redis/redis_sentinel_lists/redis_sentinel_lists_test.go, has passed after "one" attempts
Execution of tests/internals/scaled_job_conditions/scaled_job_conditions_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_cloudwatch_ignore_null_values_false/aws_cloudwatch_ignore_null_values_false_test.go, has passed after "one" attempts
Execution of tests/internals/polling_cooldown_so/polling_cooldown_so_test.go, has passed after "one" attempts
Execution of tests/internals/min_replica_sj/min_replica_sj_test.go, has passed after "one" attempts
Execution of tests/scalers/gcp/gcp_pubsub/gcp_pubsub_test.go, has passed after "one" attempts
Execution of tests/scalers/cron/cron_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_application_insights/azure_application_insights_test.go, has passed after "one" attempts
Execution of tests/scalers/kubernetes_workload/kubernetes_workload_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_service_bus_topic_aad_wi/azure_service_bus_topic_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/cassandra/cassandra_test.go, has passed after "one" attempts
Execution of tests/scalers/solace/solace_test.go, has passed after "two" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_http_oauth2/rabbitmq_queue_http_oauth2_test.go, has passed after "one" attempts
Execution of tests/internals/force_activation/force_activation_test.go, has passed after "one" attempts
Execution of tests/scalers/metrics_api/metrics_api_test.go, has passed after "one" attempts
Execution of tests/internals/fallback/deployments/fallback_test.go, has passed after "one" attempts
Execution of tests/internals/global_custom_ca/global_custom_ca_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_service_bus_queue/azure_service_bus_queue_test.go, has passed after "one" attempts
Execution of tests/scalers/kubernetes_resource/kubernetes_resource_test.go, has passed after "one" attempts
Execution of tests/scalers/forgejo_runner/forgejo_runner_test.go, has passed after "one" attempts
Execution of tests/internals/pause_scaledobject_explicitly/pause_scaledobject_explicitly_test.go, has passed after "one" attempts
Execution of tests/scalers/splunk/splunk_test.go, has passed after "one" attempts
Execution of tests/scalers/solr/solr_test.go, has passed after "one" attempts
Execution of tests/scalers/memory/memory_test.go, has passed after "one" attempts
Execution of tests/scalers/openstack_swift/openstack_swift_test.go, has passed after "one" attempts
Execution of tests/scalers/gcp/gcp_cloud_tasks/gcp_cloud_tasks_test.go, has passed after "one" attempts
Execution of tests/scalers/splunk_observability/splunk_observability_test.go, has passed after "two" attempts
Execution of tests/scalers/predictkube/predictkube_test.go, has passed after "one" attempts
Execution of tests/scalers/opensearch/opensearch_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_http_regex/rabbitmq_queue_http_regex_test.go, has passed after "one" attempts
Execution of tests/scalers/etcd/etcd_cluster/etcd_cluster_test.go, has passed after "one" attempts
Execution of tests/internals/fallback/fallback_scaling_modifiers_test.go, has passed after "one" attempts
Execution of tests/scalers/rabbitmq/rabbitmq_queue_http_vhost/rabbitmq_queue_http_vhost_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_service_bus_topic_regex/azure_service_bus_topic_regex_test.go, has passed after "one" attempts
Execution of tests/internals/replicaset_scale/replicaset_scale_test.go, has passed after "one" attempts
Execution of tests/scalers/aws/aws_cloudwatch/aws_cloudwatch_test.go, has passed after "one" attempts
Execution of tests/scalers/apache_kafka/apache_kafka_test.go, has passed after "one" attempts
Execution of tests/secret-providers/gcp_secret_manager_workload_identity/gcp_secret_manager_workload_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/gcp/gcp_stackdriver_workload_identity/gcp_stackdriver_workload_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/beanstalkd/beanstalkd_test.go, has passed after "one" attempts
Execution of tests/scalers/elasticsearch/elasticsearch_test.go, has passed after "one" attempts
Execution of tests/scalers/activemq/activemq_test.go, has passed after "one" attempts
Execution of tests/scalers/gcp/gcp_pubsub_workload_identity/gcp_pubsub_workload_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_event_hub_aad_wi/azure_event_hub_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_managed_prometheus/azure_managed_prometheus_aad_workload_identity/azure_managed_prometheus_aad_workload_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/newrelic/newrelic_test.go, has passed after "one" attempts
Execution of tests/scalers/nats_jetstream/nats_jetstream_cluster/nats_jetstream_cluster_test.go, has passed after "one" attempts
Execution of tests/scalers/selenium/selenium_test.go, has passed after "three" attempts
Execution of tests/scalers/temporal/temporal_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_monitor_aad_wi/azure_monitor_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/datadog/datadog_api/datadog_api_test.go, has passed after "one" attempts
Execution of tests/scalers/kafka/kafka_test.go, has passed after "one" attempts
Execution of tests/secret-providers/hashicorp_vault/hashicorp_vault_test.go, has passed after "one" attempts
Execution of tests/scalers/gcp/gcp_storage_workload_identity/gcp_storage_workload_identity_test.go, has passed after "two" attempts
Execution of tests/sequential/disruption/disruption_test.go, has passed after "one" attempts
Execution of tests/sequential/opentelemetry_metrics/opentelemetry_metrics_test.go, has passed after "one" attempts
Execution of tests/sequential/broken_scaledobject_tolerancy/broken_scaledobject_tolerancy_test.go, has passed after "one" attempts
Execution of tests/sequential/prometheus_metrics/prometheus_metrics_test.go, has passed after "one" attempts
Execution of tests/sequential/datadog_dca/datadog_dca_test.go, has passed after "one" attempts
failed tests: 2
Execution of tests/internals/scaling_strategies/accurate_scaling_strategy/accurate_scaling_strategy_test.go, has failed after "three" attempts
Execution of tests/scalers/azure/azure_pipelines_aad_wi/azure_pipelines_aad_wi_test.go, has failed after "three" attempts

@wozniakjan wozniakjan changed the title fix: timebox scaler drain during cache rebuild fix: cap scalers-cache reader at a per-reader budget derived from globalHTTPTimeout May 29, 2026
@wozniakjan wozniakjan force-pushed the agent/timebox-scalers-cache-close-wait branch 2 times, most recently from 3de48c3 to 955cdf1 Compare May 29, 2026 13:59
@wozniakjan

wozniakjan commented May 29, 2026

Copy link
Copy Markdown
Member Author

/run-e2e azure|scaling_strategies
Update: You can check the progress here

passed tests: 35
Execution of tests/secret-providers/azure_keyvault_workload_identity/azure_keyvault_workload_identity_test.go, has passed after "one" attempts
Execution of tests/secret-providers/azure_keyvault/azure_keyvault_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_service_bus_queue_aad_wi/azure_service_bus_queue_aad_wi_test.go, has passed after "one" attempts
Execution of tests/secret-providers/azure_workload_identity_user_assigned/azure_workload_identity_user_assigned_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_service_bus_topic_regex/azure_service_bus_topic_regex_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_service_bus_queue_regex/azure_service_bus_queue_regex_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_queue/azure_queue_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_data_explorer_aad_wi/azure_data_explorer_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_log_analytics_aad_wi/azure_log_analytics_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_log_analytics/azure_log_analytics_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_service_bus_queue/azure_service_bus_queue_test.go, has passed after "one" attempts
Execution of tests/scalers/mssql/azure_mssql_aad_wi/azure_mssql_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/postgresql/azure_postgresql_flex_server_aad_wi/azure_postgresql_flex_server_aad_wi_test.go, has passed after "one" attempts
Execution of tests/internals/scaling_strategies/eager_scaling_strategy/eager_scaling_strategy_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_service_bus_topic_aad_wi/azure_service_bus_topic_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_data_explorer/azure_data_explorer_test.go, has passed after "one" attempts
Execution of tests/internals/eventemitter/azureeventgridtopic/azureeventgridtopic_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_managed_prometheus/azure_managed_prometheus_aad_workload_identity/azure_managed_prometheus_aad_workload_identity_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_event_hub_aad_wi/azure_event_hub_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_event_hub_dapr/azure_event_hub_dapr_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_queue_aad_wi/azure_queue_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_event_hub_dapr_wi/azure_event_hub_dapr_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_event_hub_blob_metadata/azure_event_hub_blob_metadata_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_service_bus_topic/azure_service_bus_topic_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_blob/azure_blob_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_blob_aad_wi/azure_blob_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_event_hub_go_sdk/azure_event_hub_go_sdk_test.go, has passed after "one" attempts
Execution of tests/internals/scaling_strategies/accurate_scaling_strategy/accurate_scaling_strategy_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_monitor_aad_wi/azure_monitor_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_pipelines_adv/azure_pipelines_adv_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_pipelines/azure_pipelines_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_pipelines_aad_wi/azure_pipelines_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_monitor/azure_monitor_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_application_insights_aad_wi/azure_application_insights_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/azure/azure_application_insights/azure_application_insights_test.go, has passed after "one" attempts
failed tests: 1
Execution of tests/scalers/azure/azure_event_hub_blob_metadata_wi/azure_event_hub_blob_metadata_wi_test.go, has failed after "three" attempts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread CHANGELOG.md
@wozniakjan wozniakjan enabled auto-merge (squash) May 29, 2026 14:42
@wozniakjan

wozniakjan commented May 29, 2026

Copy link
Copy Markdown
Member Author

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

passed tests: 1
Execution of tests/scalers/azure/azure_event_hub_blob_metadata_wi/azure_event_hub_blob_metadata_wi_test.go, has passed after "one" attempts
failed tests: 0

@wozniakjan wozniakjan merged commit 23514c1 into kedacore:main May 29, 2026
23 of 24 checks passed
shcherbak pushed a commit to shcherbak/keda that referenced this pull request Jun 3, 2026
…obalHTTPTimeout` (kedacore#7780)

* fix: timebox scaler drain during cache rebuild

Signed-off-by: Jan Wozniak <[email protected]>

* cap scalers-cache reader budget

Signed-off-by: Jan Wozniak <[email protected]>

---------

Signed-off-by: Jan Wozniak <[email protected]>
Signed-off-by: Yurii Shcherbak <[email protected]>
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.

5 participants