Skip to content

Cross-reference OCP lifecycle data in REQ-TIER-PA-01#31

Open
kyle-walker wants to merge 1 commit into
release-engineering:mainfrom
kyle-walker:ocp-crossref-pa01
Open

Cross-reference OCP lifecycle data in REQ-TIER-PA-01#31
kyle-walker wants to merge 1 commit into
release-engineering:mainfrom
kyle-walker:ocp-crossref-pa01

Conversation

@kyle-walker

@kyle-walker kyle-walker commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Note

This PR depends on #27 (skip-eol-versions-only) for the isPreTierModel check. Merge #27 first.

Summary

  • REQ-TIER-PA-01 previously hardcoded all five phases (Full Support, Maintenance, EUS Terms 1/2/3) as required for platform-aligned operator versions. OCP only has EUS on even-numbered minor versions (4.14, 4.16, …); odd versions have EUS slots with N/A dates, causing operators targeting them to always fail validation.
  • Add NewPlatformAlignedPhasesValidator factory 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.
  • Falls back to requiring all five phases when OCP data is unavailable (conservative — no false negatives).

Changes

  • pkg/plcc/plcc.go: Add OCPProductName constant and FindProductByName method on Catalog
  • pkg/plcc/validation.go: Add NewPlatformAlignedPhasesValidator factory, resolveRequiredPhases/parseOCPVersions/findVersionInProduct helpers, BuildValidators (replaces LookupValidators in CLI path), extract resolveLabels helper
  • cmd/plcc2fbc/main.go: Extract OCP product before package filtering, use BuildValidators instead of LookupValidators
  • docs/VALIDATION_RULES.md: Document OCP cross-reference behavior, resolution logic, and examples
  • Tests: TestFindProductByName, TestParseOCPVersions, TestResolveRequiredPhases, TestNewPlatformAlignedPhasesValidator, TestBuildValidators

Test 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 warnings

Assisted-by: Claude
Signed-off-by: Kyle Walker kwalker@redhat.com

@kyle-walker kyle-walker requested a review from a team as a code owner July 2, 2026 17:27
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant