-
Notifications
You must be signed in to change notification settings - Fork 552
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
Add string/json output string mc pipe #5065
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds a string message and json output to mc pipe. The implementation is heavily inspired by the one in mc cp, just adapted to the different semantics of pipe.
klauspost
approved these changes
Oct 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
harshavardhana
approved these changes
Oct 20, 2024
Looks great thanks for the contribution |
Great, thank you! |
3 tasks
flydt
added a commit
to flydt/mc
that referenced
this pull request
Nov 16, 2024
* remove s390x support * Add basic RPC metrics via `mc support top rpc` (minio#5060) Example: ``` λ mc support top rpc myminio SERVER CONCTD PING OUT Q RECONNS STR IN STR OUT MSG IN MSG OUT To 127.0.0.1:9001 5 0.5ms 0 0 -> 20 0 -> 60007 60089 From 127.0.0.1:9001 5 0.5ms 0 0 -> 0 20 -> 60089 60002 To 127.0.0.1:9002 5 0.0ms 0 0 -> 0 4 -> 34209 33937 From 127.0.0.1:9002 5 0.5ms 0 0 -> 4 0 -> 33938 34209 To 127.0.0.1:9003 5 0.0ms 0 0 -> 0 4 -> 99379 101165 From 127.0.0.1:9003 5 0.0ms 0 0 -> 4 0 -> 101166 99379 To 127.0.0.1:9004 5 0.5ms 0 0 -> 0 4 -> 33784 33029 From 127.0.0.1:9004 5 0.0ms 0 0 -> 4 0 -> 33030 33784 To 127.0.0.1:9005 5 0.0ms 0 0 -> 0 4 -> 33515 33135 From 127.0.0.1:9005 5 0.5ms 0 0 -> 4 0 -> 33136 33515 To 127.0.0.1:9006 5 0.0ms 0 0 -> 0 4 -> 33627 33161 From 127.0.0.1:9006 5 0.0ms 0 0 -> 4 0 -> 33162 33627 ``` There is already server support for metrics. * Report errors and better file names for mc support inspect (minio#5062) Check the returned stream for errors and show them. Don't upload/keep pointless data Use the request alias to create a better file name... Example: ``` λ mc support inspect play/testbucket/testdat/** mc: <ERROR> Unable to download file data. GetRawData: No files matched the given pattern. ``` Previously the error would just be ignored. ``` λ mc support inspect --airgap play/testbucket/testdata/** File data successfully downloaded as inspect-play_testbucket_testdata.enc ``` Previously all files would be called `inspect-data.enc`, which would just be difficult to distinguish. * Add support rpc JSON replay. (minio#5064) Add realtime replay of captured JSON data. Example: ``` λ mc support top rpc --json myminio >rpc.json λ mc support top rpc -in=rpc.json ``` * Add string/json output string mc pipe (minio#5065) This commit adds a string message and json output to mc pipe. The implementation is heavily inspired by the one in mc cp, just adapted to the different semantics of pipe. * Mark batch job status properly (minio#5066) Client side overall status was always shown as `in-progress` even if job was successful or failed. Signed-off-by: Shubhendu Ram Tripathi <[email protected]> * Make the profiler easier to use (minio#5068) * Bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1 (minio#5074) Bumps [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt) from 4.5.0 to 4.5.1. - [Release notes](https://github.com/golang-jwt/jwt/releases) - [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md) - [Commits](golang-jwt/jwt@v4.5.0...v4.5.1) --- updated-dependencies: - dependency-name: github.com/golang-jwt/jwt/v4 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Only warn if less than 28 days to cert expires (minio#5077) Fixes minio#5076 as much as reasonable. * lint: Fix new detected lint complaints (minio#5080) * heal: Simplify bucket healing status (minio#5079) Avoid using the drive count concept to pick a color for a bucket healing result. This was straightforward when we were healing a bucket per erasure set, but now it becomes more complex to show a result. Pick green if everything is okay, yellow if a bucket is missing in a drive, red for any other drive state (unformatted, offline, ..), and grey for any weird situation. --------- Signed-off-by: Shubhendu Ram Tripathi <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Harshavardhana <[email protected]> Co-authored-by: Klaus Post <[email protected]> Co-authored-by: Michael Fenn <[email protected]> Co-authored-by: Shubhendu <[email protected]> Co-authored-by: dorman <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Anis Eleuch <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds a string message and json output to mc pipe. The implementation is heavily inspired by the one in mc cp, just adapted to the different semantics of pipe.
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.
Description
The
mc pipe
command doesn't currently do anything with the--json
global flag, and this PR implements that. Feel free to suggest any changes to make this more conformant with project style or other requirements.Motivation and Context
Comparing the number of bytes copied with the number of bytes expected is do a simple end-to-end check that an upload went as expected.
How to test this PR?
Pass
--json
tomc pipe
and observe the output:It also adds a plain text message due to the requirements of printMsg:
Types of changes
Checklist:
commit-id
orPR #
here)