openshift/community.okd

Downstream collection build does not work properly on macOS

Closed this issue · 1 comments

SUMMARY

I wanted to note this in a new bug report just because I tend to run things directly on my Mac, and the ball of wax that is the downstream build process seems to be a breeding ground for Linux/bash-specific issues with sed especially.

When I run make downstream-test-sanity on my Mac, I get a few strange errors like:

ERROR: Found 3 pep8 issue(s) which need to be resolved:
ERROR: plugins/modules/k8s.py:442:1: E265: block comment should start with '# '
ERROR: plugins/modules/openshift_process.py:386:1: E265: block comment should start with '# '
ERROR: plugins/modules/openshift_route.py:475:1: E265: block comment should start with '# '

(And some others that made me scratch my head.) It looks like the sed commands near the end of f_handle_doc_fragments_workaround() in downstream.sh end up not rewriting the contents of the file on my Mac, but rather adding in the generated docs to the top, on top of the existing file...

Current workaround is to build the downstream artifact on a Linux OS instead of on macOS, or I guess install the more Linux-y-flavored sed on the Mac.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

Downstream build.

ANSIBLE VERSION

N/A

CONFIGURATION

N/A

OS / ENVIRONMENT

macOS Mojave

STEPS TO REPRODUCE
make downstream-test-sanity
EXPECTED RESULTS

Downstream sanity tests pass, as they do in CI.

ACTUAL RESULTS

Downstream sanity tests do not pass.

@geerlingguy I use macOS with gnu-sed and it works with it. We need to check and modify sed commands for BSD sed.

I will check this today.