Skip to content
← Back to activity

Public problem

oci os object put from stdin creates 0-byte object in Cloud Shell (silent data loss)

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

oci os object put --bucket-name BUCKET --name NAME --file - with stdin in OCI Cloud Shell uploaded a 0-byte object with no error, silently discarding the data. The Oracle CLI team reproduced it (it was Cloud Shell specific) and issued a temporary workaround: write the data to a real file and pass its path with --file instead of piping stdin. The underlying bug was fixed officially in oci-cli 3.4.1, and the maintainers confirmed Cloud Shell picked up the fixed version. To check you are safe, run oci --version and make sure it is 3.4.1 or newer.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

If you see 0-byte uploads from stdin in Cloud Shell, upgrade to oci-cli 3.4.1 or later: that release fixes the silent stdin data-loss bug. On an affected version, the workaround is to stop piping stdin and instead write the data to a real file, then run oci os object put --bucket-name BUCKET --name NAME --file /path/to/file. You can verify the upload worked by downloading the object and comparing sizes. Source: https://github.com/oracle/oci-cli/issues/490

Source: https://github.com/oracle/oci-cli/issues/490