[None][infra] Check license with both isPermissive and isProprietary flags#13921
Conversation
Signed-off-by: Yuanjing Xue <197832395+yuanjingx87@users.noreply.github.com>
50acbd8 to
e77a705
Compare
📝 WalkthroughWalkthroughThe pull request adds a helper function to evaluate license review requirements and integrates it into the ChangesLicense Review Helper Logic
🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@jenkins/scripts/pulse_in_pipeline_scanning/utils/common.py`:
- Around line 13-15: The function license_needs_review currently returns a
"needs review" boolean but its result is stored as is_permissive elsewhere;
change the function to return true when the license is permissive (and false for
NVIDIA proprietary) by returning result["isPermissive"] and not
is_nvidia_proprietary instead of the current not(...) expression, and update any
callers if they actually need a "needs review" value.
- Line 41: The loop using for lic, result in zip(licenses, resp["data"]) can
silently drop items if the response length differs from licenses; update the
iteration in the function that contains this loop to either (a) use zip(...,
strict=True) so Python raises a ValueError on length mismatch, or (b) add an
explicit length check comparing len(licenses) and len(resp["data"]) before the
loop and raise a clear error if they differ; ensure you update the code around
the for lic, result in zip(licenses, resp["data"]) statement and handle the
raised error appropriately so incomplete compliance decisions cannot be returned
silently.
🪄 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: Enterprise
Run ID: 81960237-8c14-447b-9e57-9539d0b5bc11
📒 Files selected for processing (1)
jenkins/scripts/pulse_in_pipeline_scanning/utils/common.py
Signed-off-by: Yuanjing Xue <197832395+yuanjingx87@users.noreply.github.com>
|
/bot skip --comment "No need to run CI" |
|
PR_Github #48003 [ skip ] triggered by Bot. Commit: |
|
PR_Github #48003 [ skip ] completed with state |
…flags (NVIDIA#13921) Signed-off-by: Yuanjing Xue <197832395+yuanjingx87@users.noreply.github.com>
Summary by CodeRabbit
Description
Checking if the license is permissive with both isPermissive and isProprietary flags.
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.