Consolidate Dependabot, fix #595 (mimalloc + indexmap), add feature-matrix CI#627
Merged
anakrish merged 4 commits intomicrosoft:mainfrom Mar 24, 2026
Merged
Consolidate Dependabot, fix #595 (mimalloc + indexmap), add feature-matrix CI#627anakrish merged 4 commits intomicrosoft:mainfrom
anakrish merged 4 commits intomicrosoft:mainfrom
Conversation
Consolidate all 9 separate cargo ecosystem entries into a single entry using the 'directories' key. This ensures Dependabot creates one PR per dependency update across the root workspace and all bindings, preventing version skew that caused build failures. Also add semantic commit-message prefixes to all ecosystem entries: - build(deps) for cargo, gomod, maven, nuget, pip, bundler - ci(deps) for github-actions Rename the cargo group to 'rust-dependencies' and the github-actions group to 'github-actions' for clarity. Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
Address microsoft#595: the vendored mimalloc allocator should not be imposed on library consumers. Remove allocator-memory-limits and mimalloc from the full-opa feature so that users of regorus as a library can choose their own global allocator. Bindings (ffi, java, python, ruby) that ship as standalone artifacts continue to opt in to regorus/allocator-memory-limits explicitly so they retain the performant allocator. Also propagate indexmap/std via the std feature (using the indexmap?/std weak-dependency syntax) so that users enabling std + rvm without default features no longer hit 'IndexMap takes 3 generic arguments' errors. Closes microsoft#595 Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
PR CI (xtask): add cargo check for 5 non-default feature combos in run_ci_suite(). These run on every PR and catch compile failures from feature-gating issues (e.g. microsoft#595) with near-zero overhead. Weekly workflow: new feature-matrix.yml runs cargo build + cargo test across 9 feature combinations every Monday. Uses a GitHub Actions matrix with fail-fast: false so all combos are tested even if one fails. Combinations tested weekly: - std,arc (minimal library) - std,arc,rvm (common library usage) - std,arc,full-opa (full-opa without mimalloc) - std,arc,full-opa,allocator-memory-limits (binding-style) - std,arc,rvm,regex,time,semver,cache (cherry-picked builtins) - std,arc,rvm,coverage,cache (observability) - std,arc,full-opa,azure_policy (Azure Policy) - std,arc,full-opa,azure-rbac (Azure RBAC) - arc,opa-no-std (no_std codepath) Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
There was a problem hiding this comment.
Pull request overview
This PR improves dependency/feature management and CI coverage for the Rust workspace and bindings, addressing feature-gating regressions (notably #595) and reducing Dependabot PR skew across multiple Cargo.lock files.
Changes:
- Consolidates Dependabot configuration so Rust dependency bumps are coordinated across the workspace and bindings, and adds consistent commit-message prefixes.
- Adjusts crate feature wiring: removes
mimallocfrom thefull-opadefault path, propagatesindexmap/stdviastd, and makes bindings explicitly opt intoallocator-memory-limits. - Adds intermediate feature-subset compilation checks in PR CI and introduces a weekly feature-matrix workflow to build/test multiple feature combinations.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
xtask/src/tasks/ci/mod.rs |
Adds fast cargo check runs for key non-default feature combinations in PR CI. |
Cargo.toml |
Removes mimalloc from full-opa and propagates indexmap/std through the std feature. |
bindings/java/Cargo.toml |
Explicitly opts Java binding default features into regorus/allocator-memory-limits. |
bindings/python/Cargo.toml |
Explicitly opts Python binding default features into regorus/allocator-memory-limits. |
bindings/ruby/ext/regorusrb/Cargo.toml |
Explicitly opts Ruby native extension default features into regorus/allocator-memory-limits. |
.github/workflows/feature-matrix.yml |
Adds a weekly scheduled (and dispatchable) matrix build/test across feature combinations. |
.github/dependabot.yml |
Consolidates Cargo update entries and adds bundler/github-actions updates with commit prefixes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… feature The set_global_memory_limit function is only available when the allocator-memory-limits feature is enabled. After removing mimalloc from the default feature set, the rvm_benchmark failed to compile. Add #[cfg(feature = "allocator-memory-limits")] guards around the call sites and the MEMORY_LIMIT_BYTES constant. Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dpokluda
approved these changes
Mar 24, 2026
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.
Summary
This PR addresses several small but impactful issues around dependency management, feature gating, and CI coverage.
1. Consolidate Dependabot cargo entries
Problem: Dependabot had 9 separate
cargoecosystem entries (one per directory), creating independent PRs that bumped a dependency in oneCargo.lockbut not others. This version skew caused most Dependabot PRs to fail CI.Fix: Consolidate all cargo directories into a single entry using the
directorieskey. Dependabot now creates one PR per dependency update that covers the root workspace and all bindings simultaneously. Also addedbundlerandgithub-actionsentries, and semanticcommit-messageprefixes (build(deps)/ci(deps)) to all ecosystem entries.2. Remove mimalloc from default features (fixes #595)
Problem: The
full-opafeature (part ofdefault) pulled inmimallocandallocator-memory-limits, forcing a vendored global allocator on all library consumers. This conflicted with users who set their own#[global_allocator]and caused build issues with outdatedlibmimalloc-sysversions.Fix: Remove
allocator-memory-limitsandmimallocfrom thefull-opafeature. Bindings that ship as standalone artifacts (ffi, java, python, ruby) now explicitly opt in toregorus/allocator-memory-limitsin their ownCargo.toml, so they retain the performant allocator.Additionally, propagate
indexmap/stdvia thestdfeature using weak-dependency syntax (indexmap?/std). This fixes theIndexMap<String, usize>compile error when users enablestd + rvmwithout default features.3. Feature-combination CI checks
Problem: CI only tested
--all-featuresand--no-default-features— it never tested intermediate combinations likestd,arc,rvm(the exact #595 scenario).Fix:
cargo check --no-default-featuresruns torun_ci_suite()covering the most important non-default combinations.feature-matrix.ymlrunscargo build+cargo testacross 9 feature combinations every Saturday, using a GitHub Actions matrix withfail-fast: false. Also manually triggerable viaworkflow_dispatch.Closes #595