Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLI] mcap list metadata doesn't show the metadata table with huge amount of data in a single entry #1189

Closed
aneuwald-ctw opened this issue Jun 26, 2024 · 1 comment · Fixed by #1191
Labels
bug Something isn't working

Comments

@aneuwald-ctw
Copy link

Description

  • Version: v0.0.46 (CLI)
  • Platform: macOS

Steps To Reproduce

  1. Have a mcap without metadata
  2. Run mcap list metadata your_file.mcap
  3. See a empty table of metadata.
  4. Create and give execution permission to this script (or do your own):
#!/bin/bash

# Function to generate the key-value pairs
generate_key_value_pairs() {
  local n=$1
  local pairs=""
  for ((i=1; i<=n; i++)); do
    if [[ $i -eq $n ]]; then
      pairs+="key$i=value$i"
    else
      pairs+="key$i=value$i,"
    fi
  done
  echo $pairs
}

# Check if the correct number of arguments is provided
if [ "$#" -ne 2 ]; then
  echo "Usage: $0 N file.mcap"
  exit 1
fi

# Number of key-value pairs and the file
N=$1
METADATA_NAME=$2
FILE=$3

# Generate the key-value pairs
KEY_VALUE_PAIRS=$(generate_key_value_pairs $N)

# Construct and run the command
COMMAND="mcap add metadata -k \"$KEY_VALUE_PAIRS\" -n $METADATA_NAME $FILE"
echo "Running command: $COMMAND"
eval $COMMAND
  1. Run it like: ./script.sh 10000 name_of_metadata your_file.mcap

  2. Run mcap list metadata your_file.mcap

It doesn't show nothing:
image

Expected Behavior

It was expected it shows the table with the metadata, at least it could trim it and show only a part of it.

Running mcap get metadata -n name_of_metadata your_file.mcapor mcap get metadata -n name_of_metadata your_file.mcap | wc -l shows that it really added, but the mcap list metadata shows nothing.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant