fix: handle unencoded spaces in catalog paths and prevent NPE on miss… - #163
fix: handle unencoded spaces in catalog paths and prevent NPE on miss…#163alaurie wants to merge 3 commits into
Conversation
…ing keys - Sanitize URLs and fallback to raw download stream to avoid URISyntaxException on repository paths containing spaces - Add null checks for aliases and templates during catalog deserialization - Catch IllegalArgumentException in processing loop to safely skip malformed catalog paths - Fix search query extension filter syntax
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Just realised I ran the Palantir formatter on it when I saved in Intellij so its moved a bunch of stuff around. That ok, or want to do it with how it was? @maxandersen |
|
Ran a local test and completed. Found 292 repo's. |
|
Fixes #164 |
|
@alurie let's please keep the formatting out of it :) |
|
@maxandersen fixed the formatting issue up now. Tested locally again and still works. |
Summary of Changes
This PR fixes a workflow failure (
URISyntaxException) caused by repositories containing unencoded spaces in their file paths (e.g.,.../Apache Camel/...), and addresses several edge cases around GitHub content fetching and JSON deserialization.Changes Made
GHContent.read()invocation with a two-tier approach:%20) ingetDownloadUrl()and opens the stream directly viaURI.create().ghContent.getOwner().getFileContent(...)if direct streaming fails.IllegalArgumentExceptionto the main loop's catch block to prevent unhandled URI parser exceptions from crashing the catalog aggregation run.aliasesandtemplatesentries after Gson deserialization, preventing crashes on catalog files that omit either block..extension(".json")to.extension("json").PagedSearchIterablepaging infetchCatalogsWithRetry()to catch generic exceptions alongsideGHException.Verification
NullPointerException.