← Back to Pull requests

chore(deps): bump mlua to 0.12 #27241

Closed
unknown closed this pull request without merging on Nov 17, 2026 21:26 UTC
View on GitHub
unknown unknown commented on Nov 17, 2026 19:25 UTC
Author

Summary

Bump mlua from 0.11 to 0.12.2 to match VRL (vectordotdev/vrl#2040).

VRL main now uses mlua 0.12, while Vector still uses 0.11. Both versions link the native lua library, so Cargo refuses to resolve them together. This breaks VRL's Vector compatibility CI check on every PR.

  • Bump mlua to 0.12.2 and update the locked vrl to current main, which includes the matching fix for log timestamps (vectordotdev/vrl#2066).

  • mlua 0.12 removed Error::ToLuaConversionError:

  • - Return LuaError::external(...) for unsupported trace events.
    - Drop the matching arm in mlua_error_code.
  • mlua 0.12 rejects fractional numbers for Rust integer types under Lua 5.4, where 0.11 truncated them. Add a LuaInt<T> wrapper that truncates before converting, and use it for integer metric fields (interval_ms, timestamp fields, sample_rates, histogram counts, summary count, sketch count/k/n). Scripts such as interval_ms = 1000 / 3 keep working.

  • Remove the RUSTSEC-2026-0173 ignore from deny.toml. mlua 0.12 no longer pulls in proc-macro-error2.

  • Drop proc-macro-error2 and proc-macro-error-attr2 from LICENSE-3rdparty.csv.
  • The internal error_code for that trace-event case changes from error_converting_value_to_lua to external_error.

    References

  • Related: https://github.com/vectordotdev/vrl/pull/2040

  • Related: https://github.com/vectordotdev/vrl/pull/2066
  • Vector configuration

    NA

    How did you test this PR?

    Fractional integer fields (new tests in lib/vector-core/src/event/lua/metric.rs and log.rs)

    | Input | Expected |
    | --- | --- |
    | interval_ms = 1000 / 3 | 333 |
    | Metric timestamp with nanosec = 1e9 / 3 | 333333333 |
    | Log timestamp from os.date("!*t", 1584297428) with nanosec = 1e9 / 3 | 2020-03-15T18:37:08.333333333Z |
    | sample_rates = { 10 / 4 } | 2 |
    | interval_ms = "333.9" | 333 |
    | interval_ms = -1.5 | Error |

    With truncation temporarily disabled, the metric truncation tests fail. The out-of-range test passes either way, so it only shows that rejecting bad values was not loosened. The log timestamp test fails with number → u32: out of range against the previously locked vrl, and passes with vectordotdev/vrl#2066.

    Everything else

  • make test FEATURES="transforms-lua" SCOPE="lua": all 77 tests pass, including the existing Lua transform and event-conversion tests.

  • cargo clippy with transforms-lua: no warnings.

  • cargo check --locked --workspace --all-targets with default features passes, which covers the vrl 0.38 → 0.39 lock update.

  • make check-deny: no new errors compared to master.

  • dd-rust-license-tool check with 1.0.7, the version CI uses, passes.
  • Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.

  • For a new deprecation announcement, follow the deprecation policy and add a deprecation.d/ notice instead.
  • No. A maintainer will apply the no-changelog label to this PR.
  • Diff: 395 lines (+296 / -99) across 4 files Reviewer: pront Review duration: 120m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 395 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.358
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #27241"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 43.2% (MEDIUM) · Higher = larger blast radius
    43.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.1% · Safe to merge
    17.1%