Skip pre-tier-model versions in PLCC validators#27
Conversation
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 1:13 PM UTC · Completed 1:26 PM UTC |
ReviewFindingsMedium
Low
Labels: PR adds EOL version skipping feature to PLCC validators and has findings noting missing documentation updates. |
| return reasons | ||
| } | ||
|
|
||
| func isVersionEOL(v Version) bool { |
There was a problem hiding this comment.
[medium] constant-reuse-semantics
isVersionEOL compares Version.Type against PhaseEndOfLife, a constant defined for phase names. The constant value is 'End of Life' (capital L) while the actual API Version.Type value may be 'End of life' (lowercase l). The EqualFold comparison handles this mismatch but creates semantic coupling: PhaseEndOfLife is documented as a PLCC phase name constant yet is being used for a version type comparison.
Suggested fix: Define a separate VersionTypeEOL constant (e.g., const VersionTypeEOL = "End of life") even if the string value is similar, to decouple version type semantics from phase name semantics.
There was a problem hiding this comment.
Not sure, since the field is a string we would catch EOL strings with different capitalization. I would leave it as it is.
fgiudici
left a comment
There was a problem hiding this comment.
The PR looks good here! Thanks @kyle-walker !
Would be worth to update docs/VALIDATION_RULES.md and adding few more tests, but something we can take care later, fine to merge from my side!
|
@kyle-walker FYI: Converted to Draft - let's hold off on merging based on the concerns that were brought up in the weekly sync call. Francesco will start a thread in #wg-update-planner. |
|
I'm curious how this would change the actual FBC that is produced? We still need EoL versions to be present in the FBC so that we can inform customers they are using EoL versions. And I believe we have some semantic invariants that we've promised to consumers of the FBC-ified lifecycle data:
@perdasilva correct me if I'm wrong, but consumers will report a version as end of life if the current date is greater than the end date of the last phase. |
|
Just to echo, the thought here was primarily to avoid a large number of validation failures due to older definitions that didn't adhere to various modern standards. Since the majority of the failures that I was trying to avoid where specifically around tiering, and that only was introduced with 4.14, changing this to limit the Tier validations to be skipped for versions before that. |
3a45e93 to
a648c29
Compare
The three-tier lifecycle model (Platform Aligned / Platform Agnostic / Rolling Stream) was introduced with OCP 4.14 GA on 2023-10-31. Versions whose earliest phase predates this cutoff should not be held to tier requirements that did not exist when they were published. Add isPreTierModel(v) helper that checks whether a version's earliest parseable phase start date falls before TierModelCutoffDate. Apply the skip to all tier-specific validators (REQ-TIER-*, REQ-FIELD-02, CUSTOM-04) while preserving universal invariants (date validation, version name format, contiguity) for all versions regardless of age. Assisted-by: Claude
a648c29 to
4da8a16
Compare
|
/lgtm |
| earliest = t | ||
| } | ||
| } | ||
| return earliest.IsZero() || earliest.Before(TierModelCutoffDate) |
There was a problem hiding this comment.
NOTE: this means we will skip also versions that have no Phases with parsable dates BUT filters not part of the "isPreTierModel" check will catch them.
Skip tier-specific validation for pre-tier-model versions
The three-tier lifecycle model (Platform Aligned / Platform Agnostic /
Rolling Stream) was introduced with OCP 4.14 GA on 2023-10-31. Versions
whose earliest phase predates this cutoff should not be held to tier
requirements that did not exist when they were published.
Add isPreTierModel(v) helper that checks whether a version's earliest
parseable phase start date falls before TierModelCutoffDate. Apply the
skip to all tier-specific validators (REQ-TIER-*, REQ-FIELD-02,
CUSTOM-04) while preserving universal invariants (date validation,
version name format, contiguity) for all versions regardless of age.
Assisted-by: Claude
Signed-off-by: Kyle Walker kwalker@redhat.com