Skip to content

Parse NOTICE.xml with lxml XML parser - #64

Merged
soimkim merged 3 commits into
mainfrom
fix
Jul 31, 2026
Merged

soimkim merged 3 commits into
mainfrom
fix

Conversation

@soimkim

@soimkim soimkim commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

No description provided.

soimkim added 3 commits July 31, 2026 09:38
Avoid BeautifulSoup XMLParsedAsHTMLWarning when reading .repo/manifest.xml.
Avoid BeautifulSoup XMLParsedAsHTMLWarning for Android NOTICE.xml files.
Keep chunk-level warnings in get_oss_info_from_db; lower per-request
_post_binary_match detail to debug.
@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

XML parsing now uses XML-specific handling for manifest and NOTICE files, while binary match request failures are logged at debug level without changing control flow or return values.

Changes

XML parser updates

Layer / File(s) Summary
XML-specific parsing
src/fosslight_android/android_binary_analysis.py, src/fosslight_android/check_notice_file.py
Manifest and NOTICE XML parsing now use BeautifulSoup’s lxml-xml parser.

Request failure logging

Layer / File(s) Summary
Binary match request diagnostics
src/fosslight_android/_binary_db_controller.py
HTTP errors, unreachable URLs, and other request failures now log at debug level; response handling and return values remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: bjk7119

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, so it does not convey meaningful information about the changeset. Add a brief description summarizing the XML parser updates and related request logging change.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the primary change of parsing NOTICE.xml with the lxml XML parser.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@soimkim soimkim changed the title Fix Parse NOTICE.xml with lxml XML parser Jul 31, 2026
@soimkim soimkim self-assigned this Jul 31, 2026
@soimkim soimkim added the bug fix [PR] Fix the bug label Jul 31, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/fosslight_android/_binary_db_controller.py`:
- Around line 173-175: Update the URLError handling in get_oss_info_from_db so
unreachable KB host failures remain visible at warning level instead of debug.
Preserve the existing unreachable=True return behavior and exception detail,
changing only the logging level for this specific failure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b0ca887f-6748-454f-b6e9-64a604945f4d

📥 Commits

Reviewing files that changed from the base of the PR and between fbd0cd1 and ef36f58.

📒 Files selected for processing (3)
  • src/fosslight_android/_binary_db_controller.py
  • src/fosslight_android/android_binary_analysis.py
  • src/fosslight_android/check_notice_file.py

Comment thread src/fosslight_android/_binary_db_controller.py
@soimkim
soimkim merged commit a9bb910 into main Jul 31, 2026
5 of 7 checks passed
@soimkim
soimkim deleted the fix branch July 31, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix [PR] Fix the bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant