SUSE / DeepSea

A collection of Salt files for deploying, managing and automating Ceph.
GNU General Public License v3.0
160 stars 75 forks source link

'make pyc' target should fail if unable to compile #1770

Closed mgfritch closed 4 years ago

mgfritch commented 4 years ago

Description:

The make pyc target was succeeding even though py_complie failed to generate valid bytecode:

# make pyc
#make sure to create bytecode with the correct version
find srv/ -name '*.py' -exec python3 -m py_compile {} \;
  File "srv/modules/runners/cmd.py", line 10
    undef run(**kwargs):
            ^
SyntaxError: invalid syntax

find cli/ -name '*.py' -exec python3 -m py_compile {} \;

# echo $?
0

This is also causing the make install target to succeed despite the failed pyc dependency.

New behavior of make pyc is as follows:

# make pyc
#make sure to create bytecode with the correct version
find srv/ -name '*.py' -exec python3 -m py_compile {} +
  File "srv/modules/runners/cmd.py", line 10
    undef run(**kwargs):
            ^
SyntaxError: invalid syntax

make: *** [Makefile:67: pyc] Error 1

# echo $?
2

Checklist:

mgfritch commented 4 years ago

@susebot run teuthology

mgfritch commented 4 years ago

Additionally, there was a time when the python bytecode was included in the DeepSea rpm, however this is no longer the case.

Other than a basic sanity check, the make pyc target really doesn't do much .. maybe this target should be removed ?

susebot commented 4 years ago

Commit dcda30e4c974299846758052cc3ef211d895d68a is NOT OK for suite deepsea:tier2. Check tests results in the Jenkins job: http://ci.ses.suse.de:8080/job/pr-deepsea/315/

jschmid1 commented 4 years ago

looks good, please create a backport for the SES6 branch. We have a wiki that you can follow https://github.com/SUSE/DeepSea/wiki/Backporting

susebot commented 4 years ago

Commit dcda30e4c974299846758052cc3ef211d895d68a is NOT OK for suite deepsea:tier2. Check tests results in the Jenkins job: https://ceph-ci.suse.de/job/pr-deepsea/3/

mgfritch commented 4 years ago

@susebot run teuthology

susebot commented 4 years ago

Commit dcda30e4c974299846758052cc3ef211d895d68a is OK for suite deepsea:tier2. Check tests results in the Jenkins job: http://ci.ses.suse.de:8080/job/pr-deepsea/329/