Bug 1935165

Summary: OCP 4.6 Build fails when filename contains an umlaut
Product: OpenShift Container Platform Reporter: harsharm
Component: BuildAssignee: Alice Rum <irum>
Status: CLOSED ERRATA QA Contact: wewang <wewang>
Severity: medium Docs Contact:
Priority: high    
Version: 4.6CC: agudi, alchan, aos-bugs, cedric.girard
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:51:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1955210    

Description harsharm 2021-03-04 13:33:12 UTC
Description of problem:

When launching the `oc start-build foo --from-dir=. --wait --follow` command and a file with an accented character in the name like 'é' is present in the directory, the build fails with the error "error: unable to extract binary build input, must be a zip, tar, or gzipped tar, or specified as a file: exit status 1".


Version-Release number of selected component (if applicable):


How reproducible:

❯ oc start-build foo --from-dir=. --wait --follow
Uploading directory "." as binary input for the build ...
.
Uploading finished
build.build.openshift.io/foo-57 started
Adding cluster TLS certificate authority to trust store
Receiving source from STDIN as archive ...
Adding cluster TLS certificate authority to trust store
Adding cluster TLS certificate authority to trust store
Caching blobs under "/var/cache/blobs".
error: build error: no FROM image in Dockerfile
error: the build test-build/foo-57 status is "Failed"

❯ touch é

❯ oc start-build foo --from-dir=. --wait --follow
Uploading directory "." as binary input for the build ...
.
Uploading finished
build.build.openshift.io/foo-58 started
Adding cluster TLS certificate authority to trust store
Receiving source from STDIN as archive ...
error: unable to extract binary build input, must be a zip, tar, or gzipped tar, or specified as a file: exit status 1
error: the build test-build/foo-58 status is "Failed"

Steps to Reproduce:
1. oc start-build foo --from-dir=. --wait --follow
2. touch é
3. oc start-build foo --from-dir=. --wait --follow

Actual results:
error: unable to extract binary build input, must be a zip, tar, or gzipped tar, or specified as a file: exit status 1
error: the build test-build/foo-58 status is "Failed"

Expected results:
Build Should not fail if there are such files/dir 

Additional info:
Similar as https://bugzilla.redhat.com/show_bug.cgi?id=1673806

Comment 1 Adam Kaplan 2021-03-04 14:06:52 UTC
What version(s) of the oc client are being used? Please provide the output of `oc version`.

Comment 2 Cedric Girard 2021-03-04 14:18:00 UTC
Different versions. I have been able to trigger it with 4.6.16 oc client.

Comment 13 errata-xmlrpc 2021-07-27 22:51:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438