You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When revision-timeout-seconds=revision-response-start-timeout-seconds in config defaults a revision without any timeouts should get 0 for revision-response-start-timeout-seconds.
Actual Behavior
revision-response-start-timeout-seconds is set wrongly when its default equals to the default timeoutSeconds in configmap defaults.
Now it gets 300 which is the default if the configmap values are not modified. However, when the user sets those values to be equal, he expects to allow any response time until the revision timeout expires not an arbitrary default value eg. 300.
The reason this falls back to 300 is due to the wrong config store used.
Long ago we split config stores so that the configuration controller
and the revision controller can have a separate one. However the configuration_defaults code here calls the revision_default code here.
The revision defaulting code will get its own config values from here cfg := config.FromContextOrDefaults(ctx), however that config store has not be initialized as this is the configuration controller and it only gets the default configmap values, thus the value 300.
A fix requires to inject the right values in the ctx as follows:
skonto
changed the title
revision-response-start-timeout-seconds is set wrongly when its default equals to the default timeoutSeconds in configmap defaults
revision-response-start-timeout-seconds is set wrongly
Nov 14, 2024
What version of Knative?
1.16.x and previous versions
Expected Behavior
When
revision-timeout-seconds=revision-response-start-timeout-seconds
in config defaults a revision without any timeouts should get0
forrevision-response-start-timeout-seconds
.Actual Behavior
revision-response-start-timeout-seconds is set wrongly when its default equals to the default timeoutSeconds in configmap defaults.
Now it gets
300
which is the default if the configmap values are not modified. However, when the user sets those values to be equal, he expects to allow any response time until the revision timeout expires not an arbitrary default value eg. 300.Steps to Reproduce the Problem
In config defaults we set:
Apply a service without any timeouts and then observe:
kubectl get revision autoscale-go-00001 -ojson | jq .spec.timeoutSeconds
582
kubectl get revision autoscale-go-00001 -ojson | jq .spec.responseStartTimeoutSeconds
300
Given the logic in revision defaults we should see 0 for responseStartTimeoutSeconds.
The reason this falls back to 300 is due to the wrong config store used.
Long ago we split config stores so that the configuration controller
and the revision controller can have a separate one. However the configuration_defaults code here calls the revision_default code here.
The revision defaulting code will get its own config values from here
cfg := config.FromContextOrDefaults(ctx)
, however that config store has not be initialized as this is the configuration controller and it only gets the default configmap values, thus the value 300.A fix requires to inject the right values in the ctx as follows:
To debug further you can use this branch.
The text was updated successfully, but these errors were encountered: