Repository navigation
[code-quality] Normalize Ubuntu source manifest errors - #291
Merged
Pedro Henrique Penna (ppenna) merged 1 commit intoOct 1, 2026
Merged
Pedro Henrique Penna (ppenna) merged 1 commit into
Pedro Henrique Penna (ppenna) merged 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused implementation correctly normalizes the targeted failures without altering valid-manifest validation.
Review effort: Balanced
Findings: None
What changed in this PR
Normalizes Ubuntu source-manifest read and decoding failures as repository-standard ScriptError exceptions.
Changes:
- Wraps file, UTF-8, and JSON parsing failures.
- Adds malformed-JSON regression coverage.
| File | Description |
|---|---|
scripts/nvx_tools/collect_ubuntu_sources.py |
Normalizes manifest-loading errors. |
scripts/test_nvx_tools.py |
Tests malformed manifest handling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Pedro Henrique Penna (ppenna)
marked this pull request as ready for review
October 1, 2026 18:14
Pedro Henrique Penna (ppenna)
deleted the
code-quality/ubuntu-manifest-errors-3f62244662a1c8d1
branch
October 1, 2026 23:40
Pedro Henrique Penna (ppenna)
added a commit
that referenced
this pull request
Oct 2, 2026
dev moved from ae123d1 to 20353f8: bounded egress (#289), the shared git output runner (#287), Ubuntu manifest errors (#291), the perf gate history reset (#293), sandbox teardown through the init agent (#294), virtiofs symlinks with openvmm 2728f33ea (#302), the required CI result check (#305), and new performance baselines. - .github/actions/validate-nvx/action.yml: run dev's test_egress_policy.py and the time ABI's test_guest_time.py and test_time_abi.py. - scripts/nvx.py: keep the doctor parser import and dev's compile_policy_file import. - scripts/test_nvx_tools.py: keep both the re and select imports. - scripts/test_microvm_tests.py (no textual conflict): dev's L3/L4 egress dispatch test expects the Ubuntu guest's default memory, which 25bac37 raised from 256 to 512 MiB on this branch. The openvmm gitlink takes dev's 2728f33ea (microvm/v2.1); lockstep moves it to the time ABI head rebased onto it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Category-specific improvement
The Ubuntu source collector read package manifests with
json.loads()and allowed malformed JSON, unreadable files, or invalid UTF-8 to escape as raw Python tracebacks._source_requirements()now converts those reachable input failures into the repository-standardScriptError, while preserving the existing validation for valid manifests. A focused regression test covers malformed JSON.This is distinct from recent code-quality PRs: the merged package-lock fix covers
ubuntu.py, while this change coverscollect_ubuntu_sources.py; no open PR touches this function or concern. The active Alpine source-collector work was inspected and excluded because it overlaps a different file and candidate.Scope and validation
scripts/nvx_tools/collect_ubuntu_sources.py,scripts/test_nvx_tools.pyValidation passed:
python -m unittest scripts.test_nvx_tools.UbuntuSourceCollectionTests -vpython -m compileall -q scriptspython -m ruff check scriptspython -m pyright --pythonplatform Linuxpython -m pyright --pythonplatform Windowspython -m ruff format --check scriptspython -m unittest scripts/test_performance.py scripts/test_nvx_tools.py scripts/test_microvm_tests.py scripts/test_development_release.py -vgit diff --check