Skip to content
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

Merged
merged 4 commits into from
Nov 12, 2019

Conversation

taragu
Copy link
Contributor

@taragu taragu commented Oct 28, 2019

/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

@knative-prow-robot
Copy link
Contributor

@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:

/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.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Oct 28, 2019
@knative-prow-robot knative-prow-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 28, 2019
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a 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.

@knative-prow-robot knative-prow-robot added the area/API API objects and controllers label Oct 28, 2019
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 28, 2019
@nimakaviani
Copy link
Contributor

Thanks @taragu!

@mattmoor this PR follows our slack conversation on passing config-defaults to the controllers. wiring it into revision controller in the PR, since all the config are used in revision spec.

@knative-test-reporter-robot

The following jobs failed:

Test name Triggers Retries
pull-knative-serving-integration-tests pull-knative-serving-integration-tests 1/3

Automatically retrying due to test flakiness...
/test pull-knative-serving-integration-tests

@evankanderson
Copy link
Member

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))
Copy link
Contributor

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:

config.Deployment.QueueSidecarImage = "mutated"
config.Network.IstioOutboundIPRanges = "mutated"
config.Logging.LoggingConfig = "mutated"

@nimakaviani
Copy link
Contributor

@evankanderson yup!

@taragu looking at the code, it totally makes sense to add a unit test under revision_test.go to verify the update behavior.

@taragu taragu force-pushed the passing-config-defaults branch from 432b2bc to 5bb421f Compare October 29, 2019 15:03
@taragu
Copy link
Contributor Author

taragu commented Oct 31, 2019

/assign @markusthoemmes
Could you take a look when you get a chance?

@taragu
Copy link
Contributor Author

taragu commented Nov 12, 2019

@evankanderson @markusthoemmes just a friendly ping :)

Copy link
Member

@mattmoor mattmoor left a 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?

@taragu
Copy link
Contributor Author

taragu commented Nov 12, 2019

@mattmoor yes! We should do this for all the controllers. I will submit follow up PRs for them.

Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 12, 2019
@knative-prow-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 12, 2019
@knative-prow-robot knative-prow-robot merged commit be87d5f into knative:master Nov 12, 2019
@taragu taragu deleted the passing-config-defaults branch February 18, 2020 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/API API objects and controllers cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants