Repository navigation
Create separate store for configuration and labeler - #9171
Conversation
|
Welcome @SwEngin! It looks like this is your first PR to knative/serving 🎉 |
|
Hi @SwEngin. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
|
Hi @SwEngin |
|
I pulled the branch and the |
|
Nope, sorry will fix that.
Matt Moore <[email protected]> schrieb am Di., 25. Aug. 2020, 15:54:
… I pulled the branch and the git history shows mona AT swengin.com as the
author of these commits. Is that the email used to sign the CLA?
cc @thisisnotapril <https://github.com/thisisnotapril>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9171 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHVTWCIMDWY3UIPVYG4UODSCO7ABANCNFSM4QKTH2BQ>
.
|
|
OK, I verified internally that CLA is signed. |
|
@SwEngin can you add a message saying @googlebot I fixed it. ensure the period is there :) |
|
There are 2 emails on CLA, so should be good, I think :) |
b314c2b to
72ba93e
Compare
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
@vagababov ok will fix that |
whaught
left a comment
There was a problem hiding this comment.
I don't think we need to duplicate features.go and defaults.go, just the store
72ba93e to
42fa8c4
Compare
|
/ok-to-test |
| } | ||
|
|
||
| if cfg.Defaults == nil { | ||
| cfg.Defaults, _ = cfgmap.NewDefaultsConfigFromMap(map[string]string{}) |
There was a problem hiding this comment.
I think nil map here and below should work just fine.
There was a problem hiding this comment.
actually not because the responsive revision depends on features
There was a problem hiding this comment.
Sure. I don't see how that relates to my comment though? :)
There was a problem hiding this comment.
defaults can be nil but features cannot as it gets referenced in responsive revision (we use the same store there)
There was a problem hiding this comment.
You're reading the comment incorrectly. I am not saying that Defaults CM or Features CM can be nil, I mean the map you're passing to the call. You create unnecessary objects.
| @@ -0,0 +1,122 @@ | |||
| # Copyright 2020 The Knative Authors | |||
There was a problem hiding this comment.
This should a link to the ./config/core/configmaps/defaults.yaml rather than just a file.
There was a problem hiding this comment.
so ConfigMapFromTestFile is not implemented to follow symlinks should I add that?
There was a problem hiding this comment.
All our other store/cm tests load symlinks without much trouble. It'll work here as well, I think?
| @@ -0,0 +1,94 @@ | |||
| # Copyright 2020 The Knative Authors | |||
| @@ -0,0 +1,108 @@ | |||
| /* | |||
There was a problem hiding this comment.
Should this re-use the one from above?
There was a problem hiding this comment.
you mean should reuse the configuration store?
There was a problem hiding this comment.
yeah is there a reason to have individual ones here?
It is fine, but I want it to be an informed decision.
There was a problem hiding this comment.
updated labeler to use configuration store, but I have my doubts regarding separation of concerns (coming from a java background) I know they will point to the same configmaps at the end, but
0c3878c to
7ea2f61
Compare
| if diff := cmp.Diff(expected, config.Defaults, ignoreStuff...); diff != "" { | ||
| t.Errorf("Unexpected defaults config (-want, +got):\n%v", diff) | ||
| } |
There was a problem hiding this comment.
I really prefer cmp.Equal in the if call and only call cmp.Diff in case it fails.
Same below.
| t.Run("defaults", func(t *testing.T) { | ||
| expected, _ := cfgmap.NewDefaultsConfigFromConfigMap(defaultsConfig) | ||
| if diff := cmp.Diff(expected, config.Defaults, ignoreStuff...); diff != "" { | ||
| t.Errorf("Unexpected defaults config (-want, +got):\n%v", diff) |
There was a problem hiding this comment.
| t.Errorf("Unexpected defaults config (-want, +got):\n%v", diff) | |
| t.Errorf("Unexpected defaults config (-want, +got):\n%s", diff) |
| t.Run("features", func(t *testing.T) { | ||
| expected, _ := cfgmap.NewFeaturesConfigFromConfigMap(featuresConfig) | ||
| if diff := cmp.Diff(expected, config.Features, ignoreStuff...); diff != "" { | ||
| t.Errorf("Unexpected features config (-want, +got):\n%v", diff) |
There was a problem hiding this comment.
| t.Errorf("Unexpected features config (-want, +got):\n%v", diff) | |
| t.Errorf("Unexpected features config (-want, +got):\n%s", diff) |
7ea2f61 to
7f7afc6
Compare
vagababov
left a comment
There was a problem hiding this comment.
Nits mostly.
Thanks for the change.
| t.Run("defaults", func(t *testing.T) { | ||
| expected, _ := cfgmap.NewDefaultsConfigFromConfigMap(defaultsConfig) | ||
| if got, want := config.Defaults, expected; !cmp.Equal(got, want, ignoreStuff...) { | ||
| t.Errorf("Unexpected defaults config = %v, want: %v, diff (-want, +got):\n %s", got, want, cmp.Diff(want, got, ignoreStuff...)) |
There was a problem hiding this comment.
| t.Errorf("Unexpected defaults config = %v, want: %v, diff (-want, +got):\n %s", got, want, cmp.Diff(want, got, ignoreStuff...)) | |
| t.Errorf("Unexpected defaults config = %v, want: %v, diff (-want, +got):\n%s", got, want, cmp.Diff(want, got, ignoreStuff...)) |
We add \n for proper alignment in the output, hence we don't want the space.
| t.Run("features", func(t *testing.T) { | ||
| expected, _ := cfgmap.NewFeaturesConfigFromConfigMap(featuresConfig) | ||
| if got, want := config.Features, expected; !cmp.Equal(got, want, ignoreStuff...) { | ||
| t.Errorf("Unexpected features config = %v, want: %v, diff (-want, +got):\n %s", got, want, cmp.Diff(want, got, ignoreStuff...)) |
There was a problem hiding this comment.
| t.Errorf("Unexpected features config = %v, want: %v, diff (-want, +got):\n %s", got, want, cmp.Diff(want, got, ignoreStuff...)) | |
| t.Errorf("Unexpected features config = %v, want: %v, diff (-want, +got):\n%s", got, want, cmp.Diff(want, got, ignoreStuff...)) |
There was a problem hiding this comment.
This still here. And below.
7f7afc6 to
e0fc19d
Compare
vagababov
left a comment
There was a problem hiding this comment.
/approve
If you fix the test nits, this should be good.
|
@vagababov will do thanks for your patience |
74e2962 to
c649bbc
Compare
c649bbc to
9a9dd77
Compare
|
The following is the coverage report on the affected files.
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SwEngin, vagababov The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Issue #8871