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: emtpy progrese_bar and add change the color style white into green after upload success. #4857

Merged
merged 6 commits into from Feb 24, 2024

Conversation

jiuker
Copy link
Contributor

@jiuker jiuker commented Feb 23, 2024

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

MacBook-Pro mc % ./mc put -s 32mb -P 2 /Users/workspace/go/src/minio/minio-server minio/mytest
...i/workspace/go/src/minio/minio-server: 127.30 MiB / 127.30 MiB ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 227.70 MiB/s 0s
MacBook-Pro mc % ./mc put -s 32mb -P 2 /Users/workspace/go/src/minio/minio-server minio/mytest1
mc: <ERROR> Bucket `mytest1` does not exist.
MacBook-Pro mc % ./mc put -s 32mb -P 2 /Users/workspace/go/src/minio/minio-server1 minio/mytest 
mc: <ERROR> Unable to upload. Requested path `/Users/workspace/go/src/minio/minio-server1` not found
MacBook-Pro mc % ./mc put -s 32mb -P 2 /Users/workspace/go/src/minio/minio-server /minio/mytest
mc: <ERROR> Unable to upload. Target is not s3.
MacBook-Pro mc % ./mc put -s 32mb -P 2 minio/minio-server minio/mytest 
mc: <ERROR> Unable to upload. Bucket `minio-server` does not exist.
MacBook-Pro mc % ./mc put -s 32mb -P 2 minio/mytest/minio-server minio/mytest
mc: <ERROR> Unable to upload. Source is not local filepath.
MacBook-Pro mc % 

if not. Will have an empty bar:

MacBook-Pro mc % ./mc put -s 32mb -P 2 minio/mytest/minio-server minio/mytest
mc: <ERROR> Unable to upload. Source is not local filepath.
 0 B / ? ━┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉━━ 0
MacBook-Pro mc % 

Feat:

  1. incomplete bar is white
  2. complete bar is green

Motivation and Context

How to test this PR?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

@jiuker jiuker changed the title fix: fix_pg_bar fix: emtpy progrese_bar and add change the color style white into green after upload success. Feb 23, 2024
Copy link
Contributor

@shtripat shtripat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

White bar is not visible on white terminals which are default.

We should chose color palette for the right terminal colors, white is actually worst of all.

We can never use white or black

cmd/progress-bar.go Outdated Show resolved Hide resolved
cmd/put-main.go Outdated Show resolved Hide resolved
cmd/put-main.go Outdated Show resolved Hide resolved
cmd/put-main.go Outdated Show resolved Hide resolved
cmd/get-main.go Outdated Show resolved Hide resolved
cmd/get-main.go Outdated Show resolved Hide resolved
cmd/get-main.go Outdated Show resolved Hide resolved
guozhi.li and others added 6 commits February 23, 2024 16:56
fix: add color
In some very rare cases the license can contain a nil uuid
(00000000-0000-0000-0000-000000000000). Do not validate it against the
cluster's deployment id during registration.
@harshavardhana harshavardhana merged commit f17313e into minio:master Feb 24, 2024
5 checks passed
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.

None yet

4 participants