Change:
expectedGVK = *testData.ExpectedGVK } <ins> // if previous releases had a non-alpha version of this group/kind, make sure the storage version is understood by a previous release fixtureFilenameGroup := expectedGVK.Group if fixtureFilenameGroup == "" { fixtureFilenameGroup = "core" } // find all versions of this group/kind in all versions of the serialization fixture testdata previousReleaseGroupKindFiles, err := filepath.Glob("../../../staging/src/k8s.io/api/testdata/*/" + fixtureFilenameGroup + ".*." + expectedGVK.Kind + ".yaml") if err != nil { t.Error(err) } if len(previousReleaseGroupKindFiles) == 0 && !allowMissingTestdataFixtures[expectedGVK] { // We should at least find the HEAD fixtures t.Errorf("No testdata serialization files found for %#v, cannot determine if previous releases could read this group/kind. Add this group-version to k8s.io/api/roundtrip_test.go", expectedGVK) } // find non-alpha versions of this group/kind understood by previous releases previousNonAlphaVersions := sets.NewString() for _, previousReleaseGroupKindFile := range previousReleaseGroupKindFiles { if serverVersion := filepath.Base(filepath.Dir(previousReleaseGroupKindFile)); serverVersion == "HEAD" { continue } parts := strings.Split(filepath.Base(previousReleaseGroupKindFile), ".") version := parts[len(parts)-3] if !strings.Contains(version, "alpha") { previousNonAlphaVersions.Insert(version) } } if len(previousNonAlphaVersions) > 0 && !previousNonAlphaVersions.Has(expectedGVK.Version) { t.Errorf("Previous releases understand non-alpha versions %q, but do not understand the expected current storage version %q. "+ "This means a current server will store data in etcd that is not understood by a previous version.", previousNonAlphaVersions.List(), expectedGVK.Version, ) } </ins> actualGVK := output.getGVK() if actualGVK != expectedGVK { t.Errorf("GVK for %s does not match, expected %s got %s", kind, expectedGVK, actualGVK)

Discussion:
Improve the to ensure that the expected storage version for a resource is one understood by previous releases. We have API testdata from prior versions available in When checking each group/version/kind in the test: accumulate all the versions of the group/kind available in previous (non-HEAD) releases if there is a beta or stable version of the group/kind available in previous releases, then the storage version must be in the set of previously available versions It is too easy to accidentally change the storage version prematurely and edit the test/integration/etcd test to match the bug cc
There are no sig labels on this issue. Please add an appropriate label by using one of the following commands: - Please see the for a listing of the SIGs, working groups, and committees available. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details