Repository navigation
Conversation
Contributor
Mend Scan ResultsStatus: SCA scan outputSAST scan output |
This branch has not been deployed
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.
Summary
See https://redhat.atlassian.net/browse/NCLSUP-1629
The pig module's repository generation (strategies like
BUILD_GROUP,BUILD_CONFIGS,BOM, etc.) has the Red Hat version qualifier (redhat) hardcoded in multiple places: PNC API queries, artifact filtering, community artifact removal, and version deduplication. This makes it impossible to use these strategies on non-Red Hat PNC instances (e.g. IBM PNC) where artifacts use a different qualifier likeibm.This PR adds a
versionQualifierfield toRepoGenerationData(default:"redhat") and threads it through all the relevant code paths.Changes
Config
RepoGenerationData: newversionQualifierfield (default"redhat"), included inmerge()Core logic
RepoManager:getRedhatArtifacts()replaced bygetProductArtifacts(): PNC dependency query uses qualifier from configfilterAndDownload(): artifact GAPV filter uses qualifier from confighasProdVersionSubdir(): accepts qualifier parameterfinalizeArtifacts(): delegates toisProductVersion(qualifier)repackage(): passes qualifier toremoveCommunityArtifacts()ResolvedGav:isRedHatVersion()replaced byisProductVersion(String qualifier)RepositoryUtils:isCommunity(): new overload accepting qualifierremoveCommunityArtifacts(): new overload accepting qualifierkeepOnlyLatestRedHatArtifacts()delegates to newkeepOnlyLatestProductArtifacts(dir, qualifier)RedHatArtifactVersionreplaced byProductArtifactVersionwithpatternFor(qualifier)instead of hardcoded regexRepoBuilder: passes qualifier tokeepOnlyLatestProductArtifacts()GAV: newisCommunity(String qualifier)overloadBackward compatibility
All public methods retain their original no-arg signatures, delegating to the new parameterized versions with
"redhat"as default. No breaking changes for existing callers.Tests
RepositoryUtilsTest:isCommunitywith"ibm"qualifier,ProductArtifactVersionparsing for"redhat"and"ibm", qualifier mismatchRepoGenerationDataTest: default qualifier value, merge override, merge with both defaultsChecklist: