-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Pass config defaults into revision reconciler and add test case to verify #5892
Pass config defaults into revision reconciler and add test case to verify #5892
Conversation
@taragu: GitHub didn't allow me to request PR reviews from the following users: nimakaviani. Note that only knative members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taragu: 0 warnings.
In response to this:
/lint
Proposed Changes
- Currently we are not passing config-defaults into revision reconciler. The result is we are calling
SetDefaults(...)
but only use the hard coded values in the code, instead of using what users have set in the config-defaults config map in their cluster.By running 5296719 locally, I have verified that the config-defaults is not in the context of the revision reconciler.
Slack convo: https://knative.slack.com/archives/CA4DNJ9A4/p1572024996068100
/cc @nimakaviani
Release Note
NONE
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
The following jobs failed:
Automatically retrying due to test flakiness... |
I don't see a new test case for this behavior (and presumably all the existing tests were passing). Can we add a test where a ConfigMap value is different than the hard-coded defaults which would have failed before this change? |
@@ -96,6 +106,7 @@ func TestStoreImmutableConfig(t *testing.T) { | |||
store.OnConfigChanged(ConfigMapFromTestFile(t, pkgmetrics.ConfigMapName())) | |||
store.OnConfigChanged(ConfigMapFromTestFile(t, logging.ConfigMapName())) | |||
store.OnConfigChanged(ConfigMapFromTestFile(t, pkgtracing.ConfigName)) | |||
store.OnConfigChanged(ConfigMapFromTestFile(t, apisconfig.DefaultsConfigName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should test for immutability of defaults config object too similar to whats done below:
serving/pkg/reconciler/revision/config/store_test.go
Lines 113 to 115 in 18933ce
config.Deployment.QueueSidecarImage = "mutated" | |
config.Network.IstioOutboundIPRanges = "mutated" | |
config.Logging.LoggingConfig = "mutated" |
@evankanderson yup! @taragu looking at the code, it totally makes sense to add a unit test under |
432b2bc
to
5bb421f
Compare
/assign @markusthoemmes |
@evankanderson @markusthoemmes just a friendly ping :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do this for all of the controllers?
@mattmoor yes! We should do this for all the controllers. I will submit follow up PRs for them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor, taragu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lint
Proposed Changes
SetDefaults(...)
but only use the hard coded values in the code, instead of using what users have set in the config-defaults config map in their cluster.By running 5296719 locally, I have verified that the config-defaults is not in the context of the revision reconciler.
Slack convo: https://knative.slack.com/archives/CA4DNJ9A4/p1572024996068100
/cc @nimakaviani
Release Note