Skip to content

Some errors do not result in a non-zero exit code #304

@weisdd

Description

@weisdd

System info

OS: Alpine Linux 3.13.1
s5cmd version: v1.2.1-3fc01af

Observations

The host is resolvable and reachable, but credentials are not passed through envs:

/ $ s5cmd --log error --endpoint-url https://minio.localhost cp "s3://tmp/*" tmp/
ERROR session: fetching region failed: NoCredentialProviders: no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors
ERROR "cp s3://tmp/* tmp/": NoCredentialProviders: no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors
/ $ echo $?
0

The host was resolvable, unreachable:

/ $ s5cmd --log error --endpoint-url https://minio.localhost cp "s3://tmp/*" tmp/
ERROR session: fetching region failed: RequestError: send request failed
caused by: dial tcp 255.255.255.254:443: connect: connection refused
ERROR "cp s3://tmp/* tmp/": RequestError: send request failed caused by: Get "https://minio.localhost/tmp?list-type=2&prefix=": dial tcp 255.255.255.254:443: connect: connection refused
/ $ echo $?
0

The host is unresolvable:

/ $ s5cmd --log error --endpoint-url https://bvsdfdjsfs cp "s3://tmp/*" tmp/
ERROR session: fetching region failed: RequestError: send request failed
caused by: dial tcp: lookup bvsdfdjsfs on 127.0.0.1:53: no such host
ERROR "cp s3://tmp/* tmp/": RequestError: send request failed caused by: Get "https://bvsdfdjsfs/tmp?list-type=2&prefix=": dial tcp: lookup bvsdfdjsfs on 127.0.0.1:53: no such host
/ $ echo $?
0

All of that means that we can't be sure that pipelines fail in case there's something wrong with s3cmd cp.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions