Skip to content

feat: reject ScaledObject creation and update when the name exceeds 63 characters#7762

Merged
JorTurFer merged 4 commits into
kedacore:mainfrom
rickbrouwer:issue-6998
May 25, 2026
Merged

feat: reject ScaledObject creation and update when the name exceeds 63 characters#7762
JorTurFer merged 4 commits into
kedacore:mainfrom
rickbrouwer:issue-6998

Conversation

@rickbrouwer
Copy link
Copy Markdown
Member

@rickbrouwer rickbrouwer commented May 22, 2026

Adds admission-webhook validation that rejects ScaledObject creation when the name is longer than 54 characters. The generated HPA name is keda-hpa-<so.Name>, which must itself be https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names and is also used as a
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set. Both capped at 63 characters by Kubernetes. The ScaledObject name therefore has to stay within 63 (minus "keda-hpa-" = 54).

Kubernetes itself enforces this kind of static name validation purely at admission and not in controllers, so, that's why i want to follow the same pattern.

Checklist

Fixes #6998
Docs: kedacore/keda-docs#1774

Signed-off-by: Rick Brouwer <rickbrouwer@gmail.com>
@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented May 22, 2026

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.

@keda-automation keda-automation requested review from a team May 22, 2026 15:32
@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.

@rickbrouwer
Copy link
Copy Markdown
Member Author

rickbrouwer commented May 22, 2026

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

passed tests: 174

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/internals/force_activation/force_activation_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_queue/azure_queue_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/azure/azure_service_bus_queue/azure_service_bus_queue_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_regex/azure_service_bus_queue_regex_test.go, has passed after "one" attempts
Execution of tests/scalers/activemq/activemq_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/azure/azure_queue_aad_wi/azure_queue_aad_wi_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/aws/aws_cloudwatch_cross_account/aws_cloudwatch_cross_account_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/scalers/azure/azure_log_analytics_aad_wi/azure_log_analytics_aad_wi_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/scalers/rabbitmq/rabbitmq_queue_http/rabbitmq_queue_http_test.go, has passed after "one" attempts
Execution of tests/scalers/graphite/graphite_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/postgresql/postgresql_standalone/postgresql_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/internals/scaled_job_conditions/scaled_job_conditions_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/azure/azure_blob_aad_wi/azure_blob_aad_wi_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/secret-providers/aws_secretmanager_pod_identity/aws_secretmanager_pod_identity_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/scaling_strategies/eager_scaling_strategy_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/internals/replicaset_scale/replicaset_scale_test.go, has passed after "one" attempts
Execution of tests/scalers/newrelic/newrelic_test.go, has passed after "one" attempts
Execution of tests/scalers/forgejo_runner/forgejo_runner_test.go, has passed after "two" attempts
Execution of tests/scalers/metrics_api/metrics_api_test.go, has passed after "one" attempts
Execution of tests/scalers/prometheus/prometheus_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_http_regex/rabbitmq_queue_http_regex_test.go, has passed after "one" attempts
Execution of tests/scalers/solace/solace_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/aws/aws_dynamodb_streams/aws_dynamodb_streams_test.go, has passed after "one" attempts
Execution of tests/internals/update_ta/update_ta_test.go, has passed after "two" 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/kubernetes_workload/kubernetes_workload_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/rabbitmq/rabbitmq_queue_http_auth/rabbitmq_queue_http_auth_test.go, has passed after "one" attempts
Execution of tests/scalers/ibmmq/ibmmq_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/gcp/gcp_storage/gcp_storage_test.go, has passed after "one" attempts
Execution of tests/internals/subresource_scale/subresource_scale_test.go, has passed after "one" attempts
Execution of tests/scalers/couchdb/couchdb_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/pause_scaledobject_explicitly/pause_scaledobject_explicitly_test.go, has passed after "one" attempts
Execution of tests/internals/eventemitter/azureeventgridtopic/azureeventgridtopic_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/solarwinds/solarwinds_test.go, has passed after "one" attempts
Execution of tests/internals/value_metric_type/value_metric_type_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/etcd/etcd_cluster/etcd_cluster_test.go, has passed after "three" attempts
Execution of tests/scalers/cron/cron_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/scalers/azure/azure_service_bus_queue_aad_wi/azure_service_bus_queue_aad_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/rabbitmq/rabbitmq_queue_http_aad_wi/rabbitmq_queue_http_aad_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/beanstalkd/beanstalkd_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_sqs_queue/aws_sqs_queue_test.go, has passed after "one" attempts
Execution of tests/scalers/mssql/mssql_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/scalers/gcp/gcp_cloud_tasks/gcp_cloud_tasks_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/secret-providers/aws_secretmanager/aws_secretmanager_test.go, has passed after "one" 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/temporal/temporal_test.go, has passed after "one" attempts
Execution of tests/scalers/predictkube/predictkube_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_event_hub_dapr_wi/azure_event_hub_dapr_wi_test.go, has passed after "one" attempts
Execution of tests/scalers/sumologic/sumologic_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/aws/aws_cloudwatch/aws_cloudwatch_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/gcp/gcp_pubsub_topic/gcp_pubsub_topic_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/azure/azure_blob/azure_blob_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/pause_scaledobject/pause_scaledobject_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/aws/aws_cloudwatch_pod_identity/aws_cloudwatch_pod_identity_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/gcp/gcp_pubsub_workload_identity/gcp_pubsub_workload_identity_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/secret-providers/gcp_secret_manager_workload_identity/gcp_secret_manager_workload_identity_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/aws/aws_managed_prometheus/aws_managed_prometheus_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/scalers/influxdb/influxdb_v3/influxdb_v3_test.go, has passed after "one" attempts
Execution of tests/scalers/dynatrace/dynatrace_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/trigger_auth_secret/trigger_auth_secret_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/scalers/external_push_scaler/external_push_scaler_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/rabbitmq/rabbitmq_queue_amqp_auth/rabbitmq_queue_amqp_auth_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 "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/secret-providers/aws_identity_assume_role/aws_identity_assume_role_test.go, has passed after "one" attempts
Execution of tests/internals/scaled_object_validation/scaled_object_validation_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_event_hub_go_sdk/azure_event_hub_go_sdk_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/fallback/rollouts/fallback_test.go, has passed after "one" attempts
Execution of tests/scalers/artemis/artemis_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/gcp/gcp_prometheus_workload_identity/gcp_prometheus_workload_identity_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_streams_pod_identity_eks/aws_dynamodb_streams_pod_identity_eks_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/kubernetes_resource/kubernetes_resource_test.go, has passed after "one" attempts
Execution of tests/scalers/cpu/cpu_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/external_scaler_sj/external_scaler_sj_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/internals/cloudevent_source/cloudevent_source_test.go, has passed after "one" attempts
Execution of tests/scalers/selenium/selenium_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/gcp/gcp_pubsub/gcp_pubsub_test.go, has passed after "one" attempts
Execution of tests/scalers/dynatrace_dql/dynatrace_dql_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/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/internals/scaled_job_validation/scaled_job_validation_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/global_custom_ca/global_custom_ca_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/memory/memory_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/internals/min_replica_sj/min_replica_sj_test.go, has passed after "one" attempts
Execution of tests/scalers/splunk_observability/splunk_observability_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/scalers/gcp/gcp_stackdriver_workload_identity/gcp_stackdriver_workload_identity_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/internals/pause_scale_in_restore/pause_scale_in_restore_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/datadog/datadog_api/datadog_api_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_event_hub_aad_wi/azure_event_hub_aad_wi_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/external_push_scaler_old_proto/external_push_scaler_old_proto_test.go, has passed after "two" attempts
Execution of tests/scalers/etcd/etcd_cluster_auth/etcd_cluster_auth_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_service_bus_topic_regex/azure_service_bus_topic_regex_test.go, has passed after "one" attempts
Execution of tests/scalers/nats_jetstream/nats_jetstream_standalone/nats_jetstream_standalone_test.go, has passed after "three" 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_pipelines_adv/azure_pipelines_adv_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/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_application_insights/azure_application_insights_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/loki/loki_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/elasticsearch/elasticsearch_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/scalers/mysql/mysql_test.go, has passed after "two" attempts
Execution of tests/internals/fallback/deployments/fallback_test.go, has passed after "one" attempts
Execution of tests/scalers/solace/direct-messaging/solace_dm_test.go, has passed after "three" attempts
Execution of tests/scalers/mongodb/mongodb_test.go, has passed after "three" attempts
Execution of tests/secret-providers/hashicorp_vault/hashicorp_vault_test.go, has passed after "three" attempts
Execution of tests/scalers/splunk/splunk_test.go, has passed after "three" attempts
Execution of tests/scalers/apache_kafka/apache_kafka_test.go, has passed after "two" attempts
Execution of tests/scalers/kafka/kafka_test.go, has passed after "two" attempts
Execution of tests/sequential/opentelemetry_metrics/opentelemetry_metrics_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/disruption/disruption_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/datadog_dca/datadog_dca_test.go, has passed after "one" attempts

failed tests: 18

Execution of tests/scalers/redis/redis_cluster_lists/redis_cluster_lists_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_cluster_streams_lag/redis_cluster_streams_lag_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_standalone_lists/redis_standalone_lists_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_standalone_streams_lag/redis_standalone_streams_lag_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_sentinel_streams_pending_entries/redis_sentinel_streams_pending_entries_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_standalone_streams_length/redis_standalone_streams_length_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_cluster_streams_pending_entries/redis_cluster_streams_pending_entries_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_cluster_streams_length/redis_cluster_streams_length_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_sentinel_lists/redis_sentinel_lists_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_sentinel_streams_length/redis_sentinel_streams_length_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_sentinel_streams_lag/redis_sentinel_streams_lag_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_standalone_streams_pending_entries/redis_standalone_streams_test_pending_entries_test.go, has failed after "three" attempts
Execution of tests/scalers/cassandra/cassandra_test.go, has failed after "three" attempts
Execution of tests/scalers/arangodb/arangodb_test.go, has failed after "three" attempts
Execution of tests/scalers/solr/solr_test.go, has failed after "three" attempts
Execution of tests/scalers/nsq/nsq_test.go, has failed after "three" attempts
Execution of tests/scalers/nats_jetstream/nats_jetstream_cluster/nats_jetstream_cluster_test.go, has failed after "three" attempts
Execution of tests/scalers/github_runner/github_runner_test.go, has failed after "three" attempts

@rickbrouwer
Copy link
Copy Markdown
Member Author

rickbrouwer commented May 22, 2026

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

passed tests: 1
Execution of tests/scalers/predictkube/predictkube_test.go, has passed after "one" attempts
failed tests: 12
Execution of tests/scalers/redis/redis_sentinel_streams_lag/redis_sentinel_streams_lag_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_standalone_streams_length/redis_standalone_streams_length_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_cluster_streams_pending_entries/redis_cluster_streams_pending_entries_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_cluster_streams_length/redis_cluster_streams_length_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_cluster_streams_lag/redis_cluster_streams_lag_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_sentinel_streams_length/redis_sentinel_streams_length_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_standalone_lists/redis_standalone_lists_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_cluster_lists/redis_cluster_lists_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_sentinel_streams_pending_entries/redis_sentinel_streams_pending_entries_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_standalone_streams_lag/redis_standalone_streams_lag_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_standalone_streams_pending_entries/redis_standalone_streams_test_pending_entries_test.go, has failed after "three" attempts
Execution of tests/scalers/redis/redis_sentinel_lists/redis_sentinel_lists_test.go, has failed after "three" attempts

@rickbrouwer
Copy link
Copy Markdown
Member Author

rickbrouwer commented May 23, 2026

/run-e2e cassandra|arangodb|solr|nsq|nats_jetstream*|github*
Update: You can check the progress here

passed tests: 7
Execution of tests/scalers/solr/solr_test.go, has passed after "one" attempts
Execution of tests/scalers/nsq/nsq_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/scalers/github_runner/github_runner_test.go, has passed after "one" attempts
Execution of tests/scalers/cassandra/cassandra_test.go, has passed after "one" attempts
Execution of tests/scalers/arangodb/arangodb_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
failed tests: 0

@rickbrouwer rickbrouwer marked this pull request as ready for review May 23, 2026 07:51
@rickbrouwer
Copy link
Copy Markdown
Member Author

The tests suddenly seem quite flaky. I am curious if we merged something that apparently requires more time somewhere, causing it to just miss completing its actions within the set time.

Copy link
Copy Markdown
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.

I have created this issue for a potential removal of keda-hpa in the future .

In the meantime, I think that this is better than silently failing, but I'm not sure about enabling it as default, this can be a potential breaking change, can't?

@rickbrouwer
Copy link
Copy Markdown
Member Author

I have created this issue for a potential removal of keda-hpa in the future .

In the meantime, I think that this is better than silently failing, but I'm not sure about enabling it as default, this can be a potential breaking change, can't?

I'm not sure. @wozniakjan mentioned in #6998 (comment)

Would that be a breaking change? I think the SO with a name longer than 63 chars won't perform any scaling (due to missing HPA) anyways, so rejecting creation of the SO at webhook doesn't sound half bad to me. We just need to document that clearly that SO can have at most 63 chars in name.

Having seen that, perhaps a piece of documentation would be good?

Signed-off-by: Rick Brouwer <rickbrouwer@gmail.com>
@rickbrouwer rickbrouwer added the Awaiting/2nd-approval This PR needs one more approval review label May 25, 2026
@keda-automation keda-automation requested a review from a team May 25, 2026 12:59
@wozniakjan
Copy link
Copy Markdown
Member

wozniakjan commented May 25, 2026

... this can be a potential breaking change, can't? ...

I'm not sure. @wozniakjan mentioned in #6998 (comment)

... I think the SO with a name longer than 63 chars won't perform any scaling ... so rejecting creation of the SO at webhook doesn't sound half bad to me ...

I still hold this opinion, willing to discuss alternatives though :)

The tests suddenly seem quite flaky. I am curious if we merged something that apparently requires more time somewhere, causing it to just miss completing its actions within the set time.

very frequently those flakes have similar patterns - that some bigger "infra" Pods (mysql, redis, etc.) are unable to schedule on the three cluster node due to insufficient space. I'm passively looking into this and I would like to add better visibility into the cluster failures.

@wozniakjan
Copy link
Copy Markdown
Member

wozniakjan commented May 25, 2026

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

passed tests: 34
Execution of tests/internals/status_update/status_update_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/internals/eventemitter/azureeventgridtopic/azureeventgridtopic_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/internals/idle_replicas/idle_replicas_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/internals/subresource_scale/subresource_scale_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/internals/custom_hpa_name/custom_hpa_name_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/internals/pause_scale_in_restore/pause_scale_in_restore_test.go, has passed after "one" attempts
Execution of tests/internals/scaling_strategies/eager_scaling_strategy_test.go, has passed after "one" attempts
Execution of tests/internals/scaled_object_validation/scaled_object_validation_test.go, has passed after "one" attempts
Execution of tests/internals/value_metric_type/value_metric_type_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/internals/scaled_job_validation/scaled_job_validation_test.go, has passed after "one" attempts
Execution of tests/internals/pause_scaledobject/pause_scaledobject_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/internals/events/events_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/internals/replica_update_so/replica_update_so_test.go, has passed after "one" attempts
Execution of tests/internals/force_activation/force_activation_test.go, has passed after "two" attempts
Execution of tests/internals/global_custom_ca/global_custom_ca_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/internals/cache_metrics/cache_metrics_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/internals/scaled_job_conditions/scaled_job_conditions_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/internals/pause_scaledjob/pause_scaledjob_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/scaling_modifiers/scaling_modifiers_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/internals/fallback/deployments/fallback_test.go, has passed after "one" attempts
Execution of tests/internals/fallback/rollouts/fallback_test.go, has passed after "one" attempts
failed tests: 0

@wozniakjan wozniakjan enabled auto-merge (squash) May 25, 2026 13:39
@JorTurFer
Copy link
Copy Markdown
Member

very frequently those flakes have similar patterns - that some bigger "infra" Pods (mysql, redis, etc.) are unable to schedule on the three cluster node due to insufficient space. I'm passively looking into this and I would like to add better visibility into the cluster failures.

in theory, we should NOT set resources for workloads during e2e test to avoid scheduling issues. Even if SQL Server (as example) uses X CPU and Y RAM for operating, our e2e are light enough to not set them. Some time ago I visited all the e2e tests and removed all the requests, but maybe there are new charts setting them.

We can spin up more nodes for e2e tests, but I'd say that just removing the pod request should be enough

@rickbrouwer
Copy link
Copy Markdown
Member Author

Docs: kedacore/keda-docs#1774

Comment thread apis/keda/v1alpha1/scaledobject_webhook.go Outdated
@wozniakjan wozniakjan disabled auto-merge May 25, 2026 14:00
@rickbrouwer rickbrouwer changed the title feat: reject ScaledObject when name exceeds 54 characters feat: reject ScaledObject creation and update when the name exceeds 63 characters May 25, 2026
…3 characters

Signed-off-by: Rick Brouwer <rickbrouwer@gmail.com>
@keda-automation keda-automation requested a review from a team May 25, 2026 14:30
@JorTurFer JorTurFer enabled auto-merge (squash) May 25, 2026 14:59
@rickbrouwer
Copy link
Copy Markdown
Member Author

rickbrouwer commented May 25, 2026

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

passed tests: 34
Execution of tests/internals/status_update/status_update_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/internals/restore_original/restore_original_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/internals/idle_replicas/idle_replicas_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/internals/replicaset_scale/replicaset_scale_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/subresource_scale/subresource_scale_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/internals/pause_scale_out/pause_scale_out_test.go, has passed after "one" attempts
Execution of tests/internals/scaled_object_validation/scaled_object_validation_test.go, has passed after "one" attempts
Execution of tests/internals/value_metric_type/value_metric_type_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/internals/update_ta/update_ta_test.go, has passed after "one" attempts
Execution of tests/internals/events/events_test.go, has passed after "one" attempts
Execution of tests/internals/pause_scaledobject/pause_scaledobject_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/internals/trigger_update_so/trigger_update_so_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/internals/global_custom_ca/global_custom_ca_test.go, has passed after "one" attempts
Execution of tests/internals/scaling_strategies/eager_scaling_strategy_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/internals/cache_metrics/cache_metrics_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/internals/force_activation/force_activation_test.go, has passed after "one" attempts
Execution of tests/internals/pause_scale_in/pause_scale_in_test.go, has passed after "two" attempts
Execution of tests/internals/replica_update_so/replica_update_so_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/polling_cooldown_so/polling_cooldown_so_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/internals/pause_scaledobject_explicitly/pause_scaledobject_explicitly_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/fallback/rollouts/fallback_test.go, has passed after "one" attempts
failed tests: 0

@rickbrouwer rickbrouwer added ok-to-merge This PR can be merged and removed Awaiting/2nd-approval This PR needs one more approval review labels May 25, 2026
@JorTurFer
Copy link
Copy Markdown
Member

JorTurFer commented May 25, 2026

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

passed tests: 1
Execution of tests/internals/scaled_object_validation/scaled_object_validation_test.go, has passed after "one" attempts
failed tests: 0

@JorTurFer JorTurFer merged commit 92bda55 into kedacore:main May 25, 2026
26 checks passed
@rickbrouwer rickbrouwer deleted the issue-6998 branch May 25, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-merge This PR can be merged waiting-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ScaledObject invalid due metadata.labels must be no more than 63 characters

3 participants