-
Notifications
You must be signed in to change notification settings - Fork 101
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
Bump dependencies #1 #700
Bump dependencies #1 #700
Conversation
Approve #700 first, this is follow-up. Controller-runtime works on copies of annotations rather than their pointers, so I had to modify the test. ```go func TestGslbProperlyPropagatesAnnotationDownToIngress(t *testing.T) { // arrange settings := provideSettings(t, predefinedConfig) expectedAnnotations := map[string]string{"annotation": "test"} settings.gslb.Annotations = expectedAnnotations err := settings.client.Update(context.TODO(), settings.gslb) require.NoError(t, err, "Can't update gslb") // act reconcileAndUpdateGslb(t, settings) err2 := settings.client.Get(context.TODO(), settings.request.NamespacedName, settings.ingress) // assert assert.NoError(t, err2, "Failed to get expected ingress") assert.Equal(t, expectedAnnotations, settings.ingress.Annotations) } ``` If I extend fial assertion the passing test is doing this: ```go assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.ingress.Annotations) assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.gslb.Annotations) assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, expectedAnnotations) ``` The `"k8gb.io/strategy": "roundRobin"` is added to `expectedAnnotations` during `reconcileAndUpdateGslb` and controlle-runtime is the guy which extends `expectedAnnotations`. I bumped controller runtime to `v0.10.2`, and only this concrete test has to be updated, because expectedAnnotations are not altered within controller-runtime: ```go assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.ingress.Annotations) assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.gslb.Annotations) assert.Equal(t, map[string]string{"annotation": "test"}, expectedAnnotations) ``` Signed-off-by: kuritka <[email protected]>
Approve #700 first, this is follow-up. Controller-runtime works on copies of annotations rather than their pointers, so I had to modify the test. ```go func TestGslbProperlyPropagatesAnnotationDownToIngress(t *testing.T) { // arrange settings := provideSettings(t, predefinedConfig) expectedAnnotations := map[string]string{"annotation": "test"} settings.gslb.Annotations = expectedAnnotations err := settings.client.Update(context.TODO(), settings.gslb) require.NoError(t, err, "Can't update gslb") // act reconcileAndUpdateGslb(t, settings) err2 := settings.client.Get(context.TODO(), settings.request.NamespacedName, settings.ingress) // assert assert.NoError(t, err2, "Failed to get expected ingress") assert.Equal(t, expectedAnnotations, settings.ingress.Annotations) } ``` If I extend fial assertion the passing test is doing this: ```go assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.ingress.Annotations) assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.gslb.Annotations) assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, expectedAnnotations) ``` The `"k8gb.io/strategy": "roundRobin"` is added to `expectedAnnotations` during `reconcileAndUpdateGslb` and controlle-runtime is the guy which extends `expectedAnnotations`. I bumped controller runtime to `v0.10.2`, and only this concrete test has to be updated, because expectedAnnotations are not altered within controller-runtime: ```go assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.ingress.Annotations) assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.gslb.Annotations) assert.Equal(t, map[string]string{"annotation": "test"}, expectedAnnotations) ``` Signed-off-by: kuritka <[email protected]>
related to #697 `k8s.io/*` bundle to `v0.22.2` (controller-gen tool makes changes in CRD description after bump) - `github.com/golang/mock` to `v1.6.0` (is not compiled into final binary but checked by dependabot) - `github.com/miekg/dns` to `v1.1.43` - `github.com/infobloxopen/infoblox-go-client` to `v1.1.1` (changes argument CreateTXTRecord from integer to uint) - `sigs.k8s.io/controller-runtime` to `v0.10.2`, had to fix the test, see comment below. - `sigs.k8s.io/external-dns` is problematic in terms it uses latest `github.com/go-logr/logr` which is incompatible with previous versions. Will be part of followup PR Controller-runtime works on copies of annotations rather than their pointers, so I had to modify the test. ```go func TestGslbProperlyPropagatesAnnotationDownToIngress(t *testing.T) { // arrange settings := provideSettings(t, predefinedConfig) expectedAnnotations := map[string]string{"annotation": "test"} settings.gslb.Annotations = expectedAnnotations err := settings.client.Update(context.TODO(), settings.gslb) require.NoError(t, err, "Can't update gslb") // act reconcileAndUpdateGslb(t, settings) err2 := settings.client.Get(context.TODO(), settings.request.NamespacedName, settings.ingress) // assert assert.NoError(t, err2, "Failed to get expected ingress") assert.Equal(t, expectedAnnotations, settings.ingress.Annotations) } ``` If I extend fial assertion the passing test is doing this: ```go assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.ingress.Annotations) assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.gslb.Annotations) assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, expectedAnnotations) ``` The `"k8gb.io/strategy": "roundRobin"` is added to `expectedAnnotations` during `reconcileAndUpdateGslb` and controlle-runtime is the guy which extends `expectedAnnotations`. I bumped controller runtime to `v0.10.2`, and only this concrete test has to be updated, because expectedAnnotations are not altered within controller-runtime: ```go assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.ingress.Annotations) assert.Equal(t, map[string]string{"annotation": "test", "k8gb.io/strategy": "roundRobin"}, settings.gslb.Annotations) assert.Equal(t, map[string]string{"annotation": "test"}, expectedAnnotations) ``` Signed-off-by: kuritka <[email protected]>
I extended by controller-runtime v0.10.2 |
Paths must begin with a '/'. When unspecified, | ||
all paths from incoming requests are matched. | ||
Paths must begin with a '/' and must be present | ||
when using PathType with value "Exact" or "Prefix". |
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.
Ist result of CRD regeneration?
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.
@ytsarev, yes, controller-gen makes changes in description after k8s.io/* bump.
related to #697
k8s.io/*
bundle tov0.22.2
(controller-gen tool makes changes in CRD description after bump)github.com/golang/mock
tov1.6.0
(is not compiled into final binary but checked by dependabot)github.com/miekg/dns
tov1.1.43
github.com/infobloxopen/infoblox-go-client
tov1.1.1
(changes argument CreateTXTRecord from integer to uint)sigs.k8s.io/controller-runtime
tov0.10.2
, had to fix the test, see comment below.sigs.k8s.io/external-dns
is problematic in terms it uses latestgithub.yoyoweb123.workers.dev/go-logr/logr
which is incompatiblewith previous versions. Will be part of followup PR
controller-runtime explained
Controller-runtime works on copies of annotations rather than their pointers, so I had to modify the test.
If I extend fial assertion the passing test is doing this:
The
"k8gb.io/strategy": "roundRobin"
is added toexpectedAnnotations
duringreconcileAndUpdateGslb
and controlle-runtimeis the guy which extends
expectedAnnotations
.I bumped controller runtime to
v0.10.2
, and only this concrete test has to be updated, because expectedAnnotations are not altered within controller-runtime:Signed-off-by: kuritka [email protected]