Skip to content

fix(cloud-functions): reject floating-point request priorities - #1302

Open
cr7258 wants to merge 4 commits into
NVIDIA:mainfrom
cr7258:fix/cloud-functions-reject-fractional-priority
Open

fix(cloud-functions): reject floating-point request priorities#1302
cr7258 wants to merge 4 commits into
NVIDIA:mainfrom
cr7258:fix/cloud-functions-reject-fractional-priority

Conversation

@cr7258

@cr7258 cr7258 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Reject floating-point JSON values for integer request-priority fields instead of silently coercing values such as 1.5 to 1.

Key Changes

  • Disable Jackson's float-to-integer coercion in the primary Cloud Functions JSON mapper.
  • Add REST regression coverage for floating-point defaultPriority and perAccountPriority updates.
  • Verify rejected updates leave the existing priority configuration unchanged.
  • Upload the SARIF file actually generated by each CodeQL matrix job for fork PR comments.

CI Fix

The CodeQL analysis succeeded, but the fork-only artifact step expected results/java-kotlin.sarif while the CodeQL action generated results/java.sarif. The upload path now accepts the SARIF file generated by the current matrix job.

Observed failure:

Run actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
Error: No files were found with the provided path: results/java-kotlin.sarif. No artifacts will be uploaded.

Failed CodeQL job

Summary by CodeRabbit

  • Bug Fixes

    • Invalid fractional LLM priority values are now rejected during updates.
    • Existing priority settings remain unchanged when an invalid value is submitted.
    • Priority values are consistently validated across default and account-specific configurations.
  • Tests

    • Added integration coverage for invalid fractional priority updates.

@cr7258
cr7258 requested a review from a team as a code owner August 28, 2026 06:49
@cr7258
cr7258 requested a review from huaweic-nv August 28, 2026 06:49
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 073e898c-4de9-4109-ba21-0b6c4d394993

📥 Commits

Reviewing files that changed from the base of the PR and between fe52980 and 2d4023d.

📒 Files selected for processing (1)
  • src/control-plane-services/cloud-functions/nvcf-core/src/main/java/com/nvidia/nvcf/rest/function/management/dto/PriorityDto.java

Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The PR adds strict integer deserialization for LLM priority values, tests rejected fractional updates, and changes the fork PR CodeQL workflow to upload all SARIF result files.

Changes

Integer Validation

Layer / File(s) Summary
Strict LLM priority validation
src/control-plane-services/cloud-functions/nvcf-core/src/main/java/com/nvidia/nvcf/rest/function/management/dto/PriorityDto.java, src/control-plane-services/cloud-functions/nvcf-core/src/test/java/com/nvidia/nvcf/rest/function/management/FunctionWithLlmInvocationConfigPriorityTest.java
PriorityDto rejects floating-point values for default and per-account priorities. Update tests verify that rejected fractional values do not change stored priorities.

CodeQL Artifacts

Layer / File(s) Summary
Complete SARIF upload
.github/workflows/codeql.yml
The fork PR workflow uploads every SARIF file under results/.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 2d402

The change rejects fractional request priorities instead of silently coercing them and keeps existing configuration unchanged when updates are invalid; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: huaweic-nv, max-nv

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title follows Conventional Commits format with the required scope and accurately describes the primary bug fix: rejecting floating-point request priorities.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@cr7258 cr7258 changed the title fix(cloud-functions): reject fractional request priorities fix(cloud-functions): reject floating-point request priorities Aug 28, 2026
@cr7258
cr7258 requested a review from a team as a code owner August 28, 2026 07:19
@cr7258
cr7258 requested a review from Max-NV August 28, 2026 07:19
@cr7258
cr7258 requested a review from along-2017 August 29, 2026 01:09
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.

2 participants