@@ -210,12 +210,16 @@ func registerInSuite(ginkgoCall func(string, ...interface{}) bool, args []interf
210
210
addLabel (fullLabel )
211
211
if arg .alphaBetaLevel != "" {
212
212
texts = append (texts , fmt .Sprintf ("[%[1]s]" , arg .alphaBetaLevel ))
213
- ginkgoArgs = append (ginkgoArgs , ginkgo .Label ("Feature:" + arg .alphaBetaLevel ))
213
+ ginkgoArgs = append (ginkgoArgs , ginkgo .Label (arg .alphaBetaLevel ))
214
214
}
215
215
if arg .offByDefault {
216
216
texts = append (texts , "[Feature:OffByDefault]" )
217
- // TODO: consider this once we have a plan to update the alpha/beta job filters
218
- // ginkgoArgs = append(ginkgoArgs, ginkgo.Label("Feature:OffByDefault"))
217
+ ginkgoArgs = append (ginkgoArgs , ginkgo .Label ("Feature:OffByDefault" ))
218
+ // Alphas are always off by default but we may want to select
219
+ // betas based on defaulted-ness.
220
+ if arg .alphaBetaLevel == "Beta" {
221
+ ginkgoArgs = append (ginkgoArgs , ginkgo .Label ("BetaOffByDefault" ))
222
+ }
219
223
}
220
224
if fullLabel == "Serial" {
221
225
ginkgoArgs = append (ginkgoArgs , ginkgo .Serial )
@@ -374,12 +378,18 @@ func withFeature(name Feature) interface{} {
374
378
// on the current stability level of the feature, to emulate historic
375
379
// usage of those tags.
376
380
//
377
- // In addition, [Feature:Alpha] resp. [Feature:Beta] get added to support
378
- // skipping a test with a dependency on an alpha or beta feature gate in
379
- // jobs which use the traditional \[Feature:.*\] skip regular expression.
381
+ // For label filtering, Alpha resp. Beta get added to the Ginkgo labels.
380
382
//
381
- // For label filtering, Feature:Alpha resp. Feature:Beta get added to the
382
- // Ginkgo labels.
383
+ // [Feature:OffByDefault] gets added to support skipping a test with
384
+ // a dependency on an alpha or beta feature gate in jobs which use the
385
+ // traditional \[Feature:.*\] skip regular expression.
386
+ //
387
+ // Feature:OffByDefault is also available for label filtering.
388
+ //
389
+ // BetaOffByDefault is also added *only as a label* when the feature gate is
390
+ // an off by default beta feature. This can be used to include/exclude based
391
+ // on beta + defaulted-ness. Alpha has no equivalent because all alphas are
392
+ // off by default.
383
393
//
384
394
// If the test can run in any cluster that has alpha resp. beta features and
385
395
// API groups enabled, then annotating it with just WithFeatureGate is
0 commit comments