chore(deps): update rust crate comfy-table to v8 - #2349
Conversation
There was a problem hiding this comment.
Comfy-table v8 removes Table::load_preset, but the primary agent-data-plane binary still calls it from its unconditionally compiled DogStatsD CLI module. Migrate the call to load_style or retain v7; otherwise the production artifact cannot compile.
🤖 Datadog Autotest · Commit f808f91 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
| test-strategy = { version = "0.4", default-features = false } | ||
| opentelemetry-semantic-conventions = { version = "0.32.0", default-features = false } | ||
| comfy-table = { version = "7", default-features = false } | ||
| comfy-table = { version = "8", default-features = false } |
There was a problem hiding this comment.
Migrate the removed
load_preset API
The primary agent-data-plane production artifact cannot be compiled.
Assertion details
- Input: Any compilation of the
agent-data-planepackage with comfy-table 8.0.0. - Expected: Migrate
get_stylized_tabletoload_style, or revert both Cargo files to comfy-table v7. - Actual: The PR resolves comfy-table 8.0.0 while
bin/agent-data-plane/src/cli/dogstatsd.rsstill callsTable::load_preset. The supplied v8 release notes explicitly identify that method as removed, causing a missing-method compilation error.
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:
|
This PR contains the following updates:
7→8Warning
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
nukesor/comfy-table (comfy-table)
v8.0.0Compare Source
Breaking Changes
The following types and functions have been removed:
TableComponentenummodifiersmodule andTable::apply_modifierhave been removed.Table::current_style_as_presetTable::set_styleTable::styleTable::remove_styleTable::load_presetThe positional preset string format has been replaced with the new
TableStyle,LineStyleandContentLineStyletypes.The old approach of having "stringified" presets was too finicky and also implicitly bound to the order of variants in the old
TableComponentenum.It was just not a good design.
The new design, in comparison, has a nice and (hopefully) intuitive API to define a style.
On top of that, all functions on
TableStyleareconst, so custom styles can still be declared as constants:The new API looks as follows:
comfy_table::presets::*are nowTableStyleconstants.Table::load_style(style)has been added to load a preset or custom style.Table::style()andTable::style_mut()to get a handle to the style used by the table.The
muthandle can be used to change the style.TableStyle::with_rounded_corners/TableStyle::with_solid_inner_borders.TableStyle,LineStyleandContentLineStyleare public:The default truncation indicator is now
…instead of....This should make it more obvious that there's more text and consumes less visual space.
Fix
Various performance improvements that reduce table formatting time quite a bit:
17µs -> 11µs253µs -> 172µs20.8ms -> 6.15msMost of these improvements boil down to:
Fixed a non-critical bug that resulted in less-than optimal layouting when UTF-8 characters were involved.
No longer panic when rendering a
Tablethat contains a row withRow::max_height(0).Don't print multi-width truncation indicators, if they would be longer than the column.
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.