Skip to content

Comments

NCL-9441 - Disable brew if only pnc lookup wanted#1616

Open
PolacekTomas wants to merge 2 commits intoproject-ncl:masterfrom
PolacekTomas:ncl-9441-disable-brew-lookups-in-build-finder
Open

NCL-9441 - Disable brew if only pnc lookup wanted#1616
PolacekTomas wants to merge 2 commits intoproject-ncl:masterfrom
PolacekTomas:ncl-9441-disable-brew-lookups-in-build-finder

Conversation

@PolacekTomas
Copy link

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2026

Codecov Report

❌ Patch coverage is 6.25000% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.34%. Comparing base (e18ba76) to head (089e654).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
...a/org/jboss/pnc/build/finder/core/BuildFinder.java 6.25% 30 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1616      +/-   ##
============================================
- Coverage     54.71%   54.34%   -0.37%     
  Complexity      703      703              
============================================
  Files            51       51              
  Lines          4178     4208      +30     
  Branches        540      547       +7     
============================================
+ Hits           2286     2287       +1     
- Misses         1635     1664      +29     
  Partials        257      257              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dwalluck
Copy link
Collaborator

dwalluck commented Jan 7, 2026

@PolacekTomas The intention was not to have to add a new option, but to remove koji from the config file, by changing

"build-systems" : [ "pnc", "koji" ],

to

"build-systems" : [ "pnc" ],

although it's true that the code to implement this is missing.

There's already a clear on lines

localchecksumMap.clear();
checksums.clear();

so I wonder if we change just line

to

} else if (config.getBuildSystems().contains(BuildSystem.koji) {

and surround lines

kojiBuildsNew = findBuilds(md5BasedNotFoundCheckumMap);
allBuilds.putAll(kojiBuildsNew);
LOGGER.debug(
"Searching again in Brew the not found checksums with a SHA256-based map, to find the missed files (e.g. signed binaries)");
LOGGER.debug(
"Swapping the MD5-based not found checksum map to a SHA256-based checksum map for finding more builds in Brew!");
Map<Checksum, Collection<String>> sha256BasedNotFoundCheckumMap = BuildFinderUtils
.swapEntriesWithPreferredChecksum(
notFoundChecksums,
analyzer.getFiles(),
ChecksumType.sha256);
LOGGER.debug("Original MD5-based not found checksum map: {}", notFoundChecksums);
LOGGER.debug("New SHA256-based not found checksum map: {}", sha256BasedNotFoundCheckumMap);
// In case the same checksum has already been processed, remove them from the new checksum map
sha256BasedNotFoundCheckumMap.keySet().removeAll(notFoundChecksums.keySet());
LOGGER.debug(
"New SHA256-based not found checksum map after the removal of already processed checksums: {}",
sha256BasedNotFoundCheckumMap);
kojiBuildsNew = findBuilds(sha256BasedNotFoundCheckumMap);
LOGGER.debug("Found more Brew builds which were missed initially: {}", kojiBuildsNew);
allBuilds.putAll(kojiBuildsNew);

with

if (config.getBuildSystems().contains(BuildSystem.koji) {

}

as well.

Hopefully, this is a simpler way to implement this by using the existing build-systems option.

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.

3 participants