List within the statURL function considers object name as a prefix
and lists objects that have the same prefix.
currently, it errors out if the object is a subset of another object.
This PR will fix this.
Fixes#2746
Currently if authorization header is missing, then request is not displayed
This resulted in just the response being displayed, in anonymous mode.
This PR fixes that issue.
With the move to go.mod, the latest humanize package is being used.
This introduces a space between size and the unit. Manually removing the space
to make it consistent with the older mc releases.
An error, such as, `Bad Request` when copying an object without supplied
keys is not reflected in the exit code.
This commit simplifies a bit the mirror code. It makes mirror before and
after starting to send the status to mj.status.
Currently, a single remove HEAD an object, but this latter can return
400 Bad Request when the object is encrypted and the user doesn't specify
any encryption key.
So when HEAD fail, this PR will use GET listing to find the object and
remove it if existent.
We can avoid calling HEAD in the first place and use only listing, but this
has some penality on the server.
rb was relying on client.List() to find all elements that needs to be
removed. However it doesn't include 'alias/bucket' in the listing
when 'alias/bucket' itself is passed as an argument in rb command.
This PR will always attempt to delete the passed argument as this is
what the user wants in the first place.
This PR also fixes teardown() in functional-tests.sh to remove
the bucket using rb instead rm since rm does not remove buckets
anymore.
Previously OlderThan and NewerThan was configured for day
which has been changed to Days, Hours and minutes.
Also, changed the `flag` in `find` command to be `newer-than` and `older-than` to be consistent with other commands.
Due to multi-user feature on Minio and mc adoption in
many different restrictive environments, most users disable
access to ListBuckets() calls. We can avoid such network
operations as they only add marginal value.
Add completion for rb command:
- Support filesystem paths
- S3 paths only supports this format: `alias/bucket/`, for that s3Complete{}
has deepLevel parameter to configure maximum path deep level.
Users of bash/zsh will have completion config enabled in the next
shell session start. This commit provides completion for commands
and all subcommands, their flags and completion of filesystems paths,
mc aliases, buckets and prefixes.
mc, via minio-go, can retries some requests for many reasons, such as, network
disconnect. This commit ensures that the progress bar does not show transfered
bytes greater then the total transfered bytes to avoid confusing users.
A bad synchornization between startMirror() and its caller mirror() happens when preparing the difference of objects between source & target returns an error: mirror() quits when it receives an error from startMirror() without give a chance for that latter to properly stop the parallel mirror manager.
This PR will:
1. Quit mirroring when listing returns an error: this means calculating diff needs to stop and no further action needs to be taken since it can be dangerous especially when --remove flag is passed.
2. Properly stop parallel mirroring manager before quitting.
Enable jq style color output in github.com/minio/mc/pkg/json
- Drop in replacement of encoding/json
- Bold struct keys in blue
- Strings in green
- Numbers in default color
- Indenting and spacing matches exact jq specifications
Additionally, color coding needs '\x1b[...m' to be whitelisted in encoding/json's parser
Mirror code depends on rm code which naturally prints delete messages,
this PR will make mirror uses its own delete code since it is simple
enough to do.
Also add size information to remove message
We don't use this fork of ours anymore and we don't need
to maintain it anymore as we haven't made any significant
changes to upstream code or fixed bugs.