Cross-reference OCP lifecycle data in REQ-TIER-PA-01#31
Open
kyle-walker wants to merge 1 commit into
Open
Conversation
REQ-TIER-PA-01 previously hardcoded all five phases (Full Support, Maintenance, EUS Terms 1/2/3) as required for platform-aligned versions. OCP only has EUS on even minor versions (4.14, 4.16, ...); odd versions have EUS slots with N/A dates. Operators targeting odd OCP versions always failed validation for phases OCP itself lacks. Add NewPlatformAlignedPhasesValidator factory that cross-references the OCP product from the PLCC catalog. EUS phases are now required only when the corresponding OCP version has them with parseable dates. Falls back to requiring all five phases when OCP data is unavailable. Extract resolveLabels helper from LookupValidators. Add BuildValidators that replaces REQ-TIER-PA-01 with the OCP-aware closure when OCP context is available. Wire it up in loadAndValidate by extracting the OCP product before package-name filtering. Assisted-by: Claude
d4809a4 to
4e076c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR depends on #27 (
skip-eol-versions-only) for theisPreTierModelcheck. Merge #27 first.Summary
N/Adates, causing operators targeting them to always fail validation.NewPlatformAlignedPhasesValidatorfactory that cross-references the OCP product's PLCC data. EUS phases are now required only when the corresponding OCP version has them with parseable dates. The pattern is derived from PLCC data rather than hardcoded, so it will adapt if the EUS versioning policy changes.Changes
pkg/plcc/plcc.go: AddOCPProductNameconstant andFindProductByNamemethod onCatalogpkg/plcc/validation.go: AddNewPlatformAlignedPhasesValidatorfactory,resolveRequiredPhases/parseOCPVersions/findVersionInProducthelpers,BuildValidators(replacesLookupValidatorsin CLI path), extractresolveLabelshelpercmd/plcc2fbc/main.go: Extract OCP product before package filtering, useBuildValidatorsinstead ofLookupValidatorsdocs/VALIDATION_RULES.md: Document OCP cross-reference behavior, resolution logic, and examplesTestFindProductByName,TestParseOCPVersions,TestResolveRequiredPhases,TestNewPlatformAlignedPhasesValidator,TestBuildValidatorsTest plan
make test— all tests pass./bin/plcc2fbc -p kubernetes-nmstate-operator … -o yaml— passes strict (odd OCP versions no longer flagged for missing EUS)./bin/plcc2fbc -p kubernetes-nmstate-operator … -o yaml --permissive— no warningsAssisted-by: Claude
Signed-off-by: Kyle Walker kwalker@redhat.com