Skip to content

UPSTREAM: <carry>: support feature gate filtering from upstream #2310

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ require (
github.com/onsi/gomega v1.35.1
github.com/opencontainers/runc v1.2.1
github.com/opencontainers/selinux v1.11.1
github.com/openshift-eng/openshift-tests-extension v0.0.0-20250220212757-b9c4d98a0c45
github.com/openshift-eng/openshift-tests-extension v0.0.0-20250521164908-537495efca83
github.com/openshift/api v0.0.0-20250129162653-107848b719c5
github.com/openshift/apiserver-library-go v0.0.0-20250127121756-dc9a973f14ce
github.com/openshift/client-go v0.0.0-20250125113824-8e1f0b8fa9a7
Expand Down Expand Up @@ -234,6 +234,7 @@ require (

replace (
github.com/onsi/ginkgo/v2 => github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20241205171354-8006f302fd12
github.com/openshift-eng/openshift-tests-extension => github.com/stbenjam/openshift-tests-extension v0.0.0-20250521164908-537495efca83
github.com/openshift/apiserver-library-go => github.com/openshift/apiserver-library-go v0.0.0-20250502092109-8d341e94467d
k8s.io/api => ./staging/src/k8s.io/api
k8s.io/apiextensions-apiserver => ./staging/src/k8s.io/apiextensions-apiserver
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,6 @@ github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE
github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/selinux v1.11.1 h1:nHFvthhM0qY8/m+vfhJylliSshm8G1jJ2jDMcgULaH8=
github.com/opencontainers/selinux v1.11.1/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
github.com/openshift-eng/openshift-tests-extension v0.0.0-20250220212757-b9c4d98a0c45 h1:hXpbYtP3iTh8oy/RKwKkcMziwchY3fIk95ciczf7cOA=
github.com/openshift-eng/openshift-tests-extension v0.0.0-20250220212757-b9c4d98a0c45/go.mod h1:6gkP5f2HL0meusT0Aim8icAspcD1cG055xxBZ9yC68M=
github.com/openshift/api v0.0.0-20250129162653-107848b719c5 h1:PzJJmofv/P9R1JUxO8X6tAMxKACVS6Quxo/xBzMkSmI=
github.com/openshift/api v0.0.0-20250129162653-107848b719c5/go.mod h1:yk60tHAmHhtVpJQo3TwVYq2zpuP70iJIFDCmeKMIzPw=
github.com/openshift/apiserver-library-go v0.0.0-20250502092109-8d341e94467d h1:M/oS6u+K6AYb2pkQJWsnwfts8R85sPJDbB0wgv7KKKo=
Expand Down Expand Up @@ -481,6 +479,8 @@ github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stbenjam/openshift-tests-extension v0.0.0-20250521164908-537495efca83 h1:gK2sUoXg0Q/Y4HrBFuTushvz4Ka7MfXjv3mgSqBSo5Q=
github.com/stbenjam/openshift-tests-extension v0.0.0-20250521164908-537495efca83/go.mod h1:6gkP5f2HL0meusT0Aim8icAspcD1cG055xxBZ9yC68M=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
2 changes: 1 addition & 1 deletion openshift-hack/cmd/k8s-tests-ext/disabled_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"

"k8s.io/apimachinery/pkg/util/sets"
)

Expand All @@ -18,7 +19,6 @@ func filterOutDisabledSpecs(specs et.ExtensionTestSpecs) et.ExtensionTestSpecs {
"[Feature:UserNamespacesPodSecurityStandards]",
"[Feature:UserNamespacesSupport]", // disabled Beta
"[Feature:DynamicResourceAllocation]",
"[Feature:VolumeAttributesClass]", // disabled Beta
"[sig-cli] Kubectl client Kubectl prune with applyset should apply and prune objects", // Alpha feature since k8s 1.27
// 4.19
"[Feature:PodLevelResources]",
Expand Down
12 changes: 12 additions & 0 deletions openshift-hack/cmd/k8s-tests-ext/environment_selectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ func addEnvironmentSelectors(specs et.ExtensionTestSpecs) {
filterByTopology(specs)
filterByNoOptionalCapabilities(specs)
filterByNetwork(specs)
filterByFeatureGate(specs)

// LoadBalancer tests in 1.31 require explicit platform-specific skips
// https://issues.redhat.com/browse/OCPBUGS-38840
Expand Down Expand Up @@ -247,3 +248,14 @@ func filterByNetwork(specs et.ExtensionTestSpecs) {
AddLabel(fmt.Sprintf("[Skipped:%s]", network))
}
}

// filterByFeatureGate is a helper to exclude tests that only work when a particular feature gate is enabled
func filterByFeatureGate(specs et.ExtensionTestSpecs) {
techPreviewFeatureGates := []string{
"VolumeAttributesClass", // Kubernetes beta, disabled by default
}

for _, featureGate := range techPreviewFeatureGates {
specs.Select(et.NameContains("[FeatureGate:" + featureGate)).Include(et.FeatureGateEnabled(featureGate))
}
}
2 changes: 2 additions & 0 deletions staging/src/k8s.io/code-generator/examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ replace (
)

replace github.com/onsi/ginkgo/v2 => github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20241205171354-8006f302fd12

replace github.com/openshift-eng/openshift-tests-extension => github.com/stbenjam/openshift-tests-extension v0.0.0-20250521164908-537495efca83
2 changes: 2 additions & 0 deletions staging/src/k8s.io/kms/internal/plugins/_mock/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ require (
replace k8s.io/kms => ../../../../kms

replace github.com/onsi/ginkgo/v2 => github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20241205171354-8006f302fd12

replace github.com/openshift-eng/openshift-tests-extension => github.com/stbenjam/openshift-tests-extension v0.0.0-20250521164908-537495efca83

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading