Skip to content

Commit bd1cea0

Browse files
Merge pull request #384 from openshift-bot/synchronize-upstream
OCPBUGS-55051: Synchronize From Upstream Repositories
2 parents 4f83d9d + c6456a9 commit bd1cea0

File tree

9 files changed

+480
-10
lines changed

9 files changed

+480
-10
lines changed

commitchecker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
expectedMergeBase: efc6657e23a9f03ed370e73562c89b72d13ec605
1+
expectedMergeBase: 29282969fc3d137a9bc8a93befc014acb66b12aa
22
upstreamBranch: main
33
upstreamOrg: operator-framework
44
upstreamRepo: operator-controller

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/BurntSushi/toml v1.5.0
77
github.com/Masterminds/semver/v3 v3.3.1
88
github.com/blang/semver/v4 v4.0.0
9-
github.com/cert-manager/cert-manager v1.18.0
9+
github.com/cert-manager/cert-manager v1.18.1
1010
github.com/containerd/containerd v1.7.27
1111
github.com/containers/image/v5 v5.35.0
1212
github.com/fsnotify/fsnotify v1.9.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR
5151
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
5252
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
5353
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
54-
github.com/cert-manager/cert-manager v1.18.0 h1:v7vxC1Mx5tkDz1oGOAktB88zA6TbGKcmpLM92+AIXRc=
55-
github.com/cert-manager/cert-manager v1.18.0/go.mod h1:icDJx4kG9BCNpGjBvrmsFd99d+lXUvWdkkcrSSQdIiw=
54+
github.com/cert-manager/cert-manager v1.18.1 h1:5qa3UNrgkNc5Zpn0CyAVMyRIchfF3/RHji4JrazYmWw=
55+
github.com/cert-manager/cert-manager v1.18.1/go.mod h1:icDJx4kG9BCNpGjBvrmsFd99d+lXUvWdkkcrSSQdIiw=
5656
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
5757
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
5858
github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk=

internal/operator-controller/rukpak/preflights/crdupgradesafety/checks.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,13 @@ func Type(diff FieldDiff) (bool, error) {
242242

243243
return isHandled(diff, reset), err
244244
}
245+
246+
// Description changes are considered safe and non-breaking.
247+
func Description(diff FieldDiff) (bool, error) {
248+
reset := func(diff FieldDiff) FieldDiff {
249+
diff.Old.Description = ""
250+
diff.New.Description = ""
251+
return diff
252+
}
253+
return isHandled(diff, reset), nil
254+
}

internal/operator-controller/rukpak/preflights/crdupgradesafety/checks_test.go

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,3 +904,105 @@ func TestType(t *testing.T) {
904904
})
905905
}
906906
}
907+
908+
func TestDescription(t *testing.T) {
909+
for _, tc := range []testcase{
910+
{
911+
name: "no diff, no error, handled",
912+
diff: FieldDiff{
913+
Old: &apiextensionsv1.JSONSchemaProps{
914+
Description: "some field",
915+
},
916+
New: &apiextensionsv1.JSONSchemaProps{
917+
Description: "some field",
918+
},
919+
},
920+
err: nil,
921+
handled: true,
922+
},
923+
{
924+
name: "description changed, no error, handled",
925+
diff: FieldDiff{
926+
Old: &apiextensionsv1.JSONSchemaProps{
927+
Description: "old description",
928+
},
929+
New: &apiextensionsv1.JSONSchemaProps{
930+
Description: "new description",
931+
},
932+
},
933+
err: nil,
934+
handled: true,
935+
},
936+
{
937+
name: "description added, no error, handled",
938+
diff: FieldDiff{
939+
Old: &apiextensionsv1.JSONSchemaProps{},
940+
New: &apiextensionsv1.JSONSchemaProps{
941+
Description: "a new description was added",
942+
},
943+
},
944+
err: nil,
945+
handled: true,
946+
},
947+
{
948+
name: "description removed, no error, handled",
949+
diff: FieldDiff{
950+
Old: &apiextensionsv1.JSONSchemaProps{
951+
Description: "this description will be removed",
952+
},
953+
New: &apiextensionsv1.JSONSchemaProps{},
954+
},
955+
err: nil,
956+
handled: true,
957+
},
958+
{
959+
name: "different field changed, no error, not handled",
960+
diff: FieldDiff{
961+
Old: &apiextensionsv1.JSONSchemaProps{
962+
ID: "foo",
963+
},
964+
New: &apiextensionsv1.JSONSchemaProps{
965+
ID: "bar",
966+
},
967+
},
968+
err: nil,
969+
handled: false,
970+
},
971+
{
972+
name: "different field changed with description, no error, not handled",
973+
diff: FieldDiff{
974+
Old: &apiextensionsv1.JSONSchemaProps{
975+
ID: "foo",
976+
Description: "description",
977+
},
978+
New: &apiextensionsv1.JSONSchemaProps{
979+
ID: "bar",
980+
Description: "description",
981+
},
982+
},
983+
err: nil,
984+
handled: false,
985+
},
986+
{
987+
name: "description and ID changed, no error, not handled",
988+
diff: FieldDiff{
989+
Old: &apiextensionsv1.JSONSchemaProps{
990+
ID: "foo",
991+
Description: "old description",
992+
},
993+
New: &apiextensionsv1.JSONSchemaProps{
994+
ID: "bar",
995+
Description: "new description",
996+
},
997+
},
998+
err: nil,
999+
handled: false,
1000+
},
1001+
} {
1002+
t.Run(tc.name, func(t *testing.T) {
1003+
handled, err := Description(tc.diff)
1004+
require.Equal(t, tc.err, err)
1005+
require.Equal(t, tc.handled, handled)
1006+
})
1007+
}
1008+
}

internal/operator-controller/rukpak/preflights/crdupgradesafety/crdupgradesafety.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ type Preflight struct {
3131

3232
func NewPreflight(crdCli apiextensionsv1client.CustomResourceDefinitionInterface, opts ...Option) *Preflight {
3333
changeValidations := []ChangeValidation{
34+
Description,
3435
Enum,
3536
Required,
3637
Maximum,

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Babel==2.17.0
22
beautifulsoup4==4.13.4
3-
certifi==2025.4.26
3+
certifi==2025.6.15
44
charset-normalizer==3.4.2
55
click==8.1.8
66
colorama==0.4.6
@@ -9,7 +9,7 @@ ghp-import==2.1.0
99
idna==3.10
1010
Jinja2==3.1.6
1111
lxml==5.4.0
12-
Markdown==3.8
12+
Markdown==3.8.2
1313
markdown2==2.5.3
1414
MarkupSafe==3.0.2
1515
mergedeep==1.3.4
@@ -20,8 +20,8 @@ packaging==25.0
2020
paginate==0.5.7
2121
pathspec==0.12.1
2222
platformdirs==4.3.8
23-
Pygments==2.19.1
24-
pymdown-extensions==10.15
23+
Pygments==2.19.2
24+
pymdown-extensions==10.16
2525
pyquery==2.0.1
2626
python-dateutil==2.9.0.post0
2727
PyYAML==6.0.2
@@ -31,5 +31,5 @@ regex==2024.11.6
3131
requests==2.32.4
3232
six==1.17.0
3333
soupsieve==2.7
34-
urllib3==2.4.0
34+
urllib3==2.5.0
3535
watchdog==6.0.0

0 commit comments

Comments
 (0)