diff --git a/.github/workflows/supported_features.yml b/.github/workflows/supported_features.yml new file mode 100644 index 0000000000..80394ce69d --- /dev/null +++ b/.github/workflows/supported_features.yml @@ -0,0 +1,25 @@ +name: 'kubebuilder-supported-features-freshness-check' +on: + pull_request: + branches: + - main + - master + paths: + - 'conformance/utils/suite/**' +jobs: + checks: + runs-on: ubuntu-latest + steps: + - name: 'checkout' + uses: actions/checkout@v4 + - name: 'check_diff' + run: | + current_features=$(grep -B 1 'type SupportedFeature string' apis/v1/gatewayclass_types.go | grep -oP '// \+kubebuilder:validation:Enum=\K.*') + expected_features=$(go run hack/supportedfeatures/main.go) + if [[ "$current_features" != "$expected_features" ]]; then + echo "found diff between the current and the expected supportedFeatures" + echo "expected: $expected_features" + echo "current: $current_features" + exit 1 + fi + # working-directory: hack/supported \ No newline at end of file diff --git a/conformance/utils/suite/features.go b/conformance/utils/suite/features.go index f3c4689a8b..2726542625 100644 --- a/conformance/utils/suite/features.go +++ b/conformance/utils/suite/features.go @@ -217,7 +217,7 @@ var MeshCoreFeatures = sets.New( // AllFeatures contains all the supported features and can be used to run all // conformance tests with `all-features` flag. -// +// asd // NOTE: as new feature sets are added they should be inserted into this set. var AllFeatures = sets.New[SupportedFeature](). Insert(GatewayExtendedFeatures.UnsortedList()...).