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

Fix duplicate format option on slowlogs command #1785

Merged
merged 11 commits into from
Apr 22, 2024

Conversation

maxschmeling
Copy link
Contributor

@maxschmeling maxschmeling commented Apr 19, 2024

Description

The slowlogs command currently prints two --format options:

  Usage: vip slowlogs [options]

  Options:
    -a, --app             Specify the app
    -d, --debug           Activate debug output
    -e, --env             Specify the environment
    -f, --format [value]  Format results (defaults to "table")
    -F, --format [value]  Output the log lines in CSV or JSON format (defaults to "text")
    -h, --help            Output the help for the (sub)command
    -l, --limit <n>       The maximum number of log lines (defaults to 500)
    -v, --version         Output the version number

and this is because the format: true option is provided in that commands setup while also providing a "custom" format option. It also shows text as a default when that's not a valid option at all.

Changelog Description

Updated the "logs" and "slowlogs" commands to use the "table" output format by default, rather than the non-existent "text" format. This makes the help text for these commands less confusing, and makes them more consistent with the rest of the CLI.

Pull request checklist

New release checklist

Steps to Test

Outline the steps to test and verify the PR here.

Example:

  1. Check out PR.
  2. Run npm run build
  3. Run node ./dist/bin/vip-slowlogs.js @{app}.{env} --help
  4. Verify only one format option with -f as a shorthand

Copy link
Contributor

github-actions bot commented Apr 19, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

@yolih
Copy link
Contributor

yolih commented Apr 19, 2024

Tested locally, and your updates are huge improvements! 🎉
-f, --format [value] Output the log lines in CSV or JSON format (defaults to "table")
Thank you!

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@maxschmeling maxschmeling merged commit 4da0b36 into trunk Apr 22, 2024
17 checks passed
@maxschmeling maxschmeling deleted the fix/BB8-11235-format-option-confusion-on-slowlogs branch April 22, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants