Skip to content

feat(resource): support custom generated record names - #432

Merged
rapids-bot[bot] merged 2 commits into
rapidsai:mainfrom
johanpel:resource-builder-record-names
Jul 22, 2026
Merged

feat(resource): support custom generated record names#432
rapids-bot[bot] merged 2 commits into
rapidsai:mainfrom
johanpel:resource-builder-record-names

Conversation

@johanpel

Copy link
Copy Markdown
Contributor

Description

Allow ResourceBuilder to use explicit usage and bounds record names through with_record_names. new retains the default {Resource}Usage and {Resource}Bounds naming scheme.

Also expose Resource::constraint_data for consistent constraint serialization.

Written by Codex.

Related issues

This is useful because in #427 it can be leveraged to provide custom names for these record types.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Resource construction and constraint encoding

Layer / File(s) Summary
Configurable record names and build validation
crates/resource/src/builder.rs
ResourceBuilder supports default or explicit usage and bounds record names, validates duplicates for bounded resources, updates BuildError, and adjusts tests.
Constraint payload encoding
crates/resource/src/lib.rs
Resource::constraint_data() serializes resources to JSON and returns serialization errors.

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

Possibly related PRs

  • rapidsai/quent#387: Changes the related ResourceBuilder record-name handling and BuildError behavior.

Suggested reviewers: mbrobbel, dhruv9vats

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding custom record-name support for resources.
Description check ✅ Passed The description covers the change and related issue, but omits the template's Testing and Screenshots sections.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

coderabbitai[bot]

This comment was marked as spam.

@johanpel

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit fd9ef1a into rapidsai:main Jul 22, 2026
10 of 11 checks passed
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