chore(deps): update rust crate schemars to v1 - #2287
Conversation
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6fac5faff
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ] } | ||
| rustls-webpki = { version = "0.103", default-features = false } | ||
| schemars = { version = "0.8", default-features = false } | ||
| schemars = { version = "1.0", default-features = false } |
There was a problem hiding this comment.
Keep schemars aligned with typify's schema API
When the config crate builds, lib/datadog-agent/config/build/datadog_config_gen.rs deserializes into schemars::schema::RootSchema and passes that value to typify::TypeSpace::add_root_schema; typify 0.7.0 still depends on and accepts schemars 0.8.22. This bump makes the workspace schemars resolve to 1.2.2 instead, where the old schema::RootSchema API is gone and no longer matches typify's 0.8 type, so datadog-agent-config cannot compile/regenerate the typed configuration model. Keep schemars on 0.8 or update typify and the build code together.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The schemars 1.x upgrade removes the RootSchema API used by configuration generation, while typify 0.7 still requires schemars 0.8’s type. This makes datadog-agent-config uncompilable and blocks production artifact builds.
📊 Validated against 9 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit b6fac5f · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
| ] } | ||
| rustls-webpki = { version = "0.103", default-features = false } | ||
| schemars = { version = "0.8", default-features = false } | ||
| schemars = { version = "1.0", default-features = false } |
There was a problem hiding this comment.
Upgrade removes the RootSchema API required by config generation
Every build containing datadog-agent-config fails, preventing production artifacts from being compiled.
Assertion details
- Input: Compile
datadog-agent-configwith the PR's resolved schemars 1.2.2 dependency. - Expected: The dependency upgrade must leave
datadog-agent-configbuildable while preserving typify-based configuration generation. - Actual: Compilation fails before configuration generation: schemars 1.2.2 reports E0425 because
RootSchemano longer exists and E0603 becauseschemais private. Using v1's publicSchemainstead also fails because typify 0.7.0 requires schemars 0.8.22'sRootSchema. A complete fix must retain schemars 0.8 or jointly move typify and the generator to compatible v1 APIs.
Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
Regression Detector (Agent Data Plane)Optimization Goals:
|
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
|
Closing with #2289 to track a dependency hell that needs some focus work. |
Renovate Ignore NotificationBecause you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR. |
This PR contains the following updates:
0.8→1.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Cargo major update — Before merging, verify the workspace compiles and check upstream release notes for removed features or API changes.
Release Notes
GREsau/schemars (schemars)
v1.2.2Compare Source
v1.2.1Compare Source
Fixed
transformattributes are now applied after the schema is otherwise fully constructed. In particular, they're now applied after all other attributes are processed. (#505)v1.2.0Compare Source
Added
Changed
HashMap/BTreeMapwith enum keys are now more specific (#452)v1.1.0Compare Source
Added
#[must_use]so that they report a lint warning when the returned value is unused, as this likely indicates a mistake.Fixed
Option<>. (#464 / #483)v1.0.5Compare Source
Fixed
schema.pointer_mut()to resolve URI fragment identifiers like#/$defs/foo, matching current behaviour ofschema.pointer()(#478 / #479)v1.0.4Compare Source
Fixed
JsonSchemaimpl on atomic types being ignored on non-nightly compilers due to a buggycfgcheck (#453)syn(#450)v1.0.3Compare Source
Fixed
transparent(or newtype) struct and its field (#446)json_schema!()macro compatibility when used from pre-2021 rust editions (#447)v1.0.2Compare Source
Fixed
v1.0.1Compare Source
Fixed
JsonSchemawithno_stdbroken due tostd::borrow::ToOwnedtrait not being in scope (#441)v1.0.0Compare Source
This is a major release with many additions, fixes and changes since 0.8 (but not many since 0.9). While the basic usage (deriving
JsonSchemaand usingschema_for!()orSchemaGenerator) is mostly unchanged, you may wish to consult the migration guide which covers some of the most significant changes.Changes since 1.0.0-rc.2:
Added
#[schemars(bound = ...)]attributes are now used from fields as well as containersSchema::pointer(...)method now works when given a JSON pointer in URI Fragment representation with a leading#character. In particular, this means that you can now lookup a schema from a$refvalue using that method.Fixed
$refvalue (#436)SchemaGenerator::subschema_for, reducing LLVM line count and improving compile times (#439)v0.9.0Compare Source
This version is identical to
1.0.0-alpha.18, but is available for those who are unable to unwilling to use a pre-release version.Those upgrading from Schemars 0.8 may want to consult the migration guide, which also applies when migrating from 0.8 to 0.9.
Configuration
📅 Schedule: (UTC)
* 0-3 * * 1)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.