Do not consider failure to sync fatal#238
Conversation
perlpunk
left a comment
There was a problem hiding this comment.
Hm, but this would ignore any error in read_files.sh?
I don't have a good idea how to find out the cause, but ignoring all errors might hide real problems in the future
|
So read_files.sh is doing and if one of the grep fails, the script fails. |
|
This should work: I tested it with a mocked rsync. |
b026de8 to
99d38cf
Compare
|
How would this look in reality? I would like to see two cases, one with error and one without. And what about the explicit log message we planned? |
|
This is a line from a genererated read_files.sh: And I would guess that some of the grep commands is failing, but we probably want to ignore the return value of grep here. |
| for k, v in self.asset_folders.items(): | ||
| self.p( | ||
| """rsync -4 --list-only $rsync_pwd_option PRODUCTPATH/{}/*{} | awk '{{ $1=$2=$3=$4=""; print substr($0,5); }}' >> __envsub/files_asset.lst""".format( | ||
| """rsync -4 --list-only $rsync_pwd_option PRODUCTPATH/{}/*{} | awk '{{ $1=$2=$3=$4=""; print substr($0,5); }}' >> __envsub/files_asset.lst || true""".format( |
There was a problem hiding this comment.
Discussed in jitsi. This may be the wrong part of the generator, see #238 (comment) - I will look into that after coming up with a fake rsync that produces successful or error output, and see how grep and awk respond to that.
There was a problem hiding this comment.
So it seems the read_files_repo value in cfg.py:23 is the basis for that rsync call and the p function in scriptgen.py actually replaces the target file that is being piped into i.e. __Envsub/files_repo.lst
We still log the error but we assume it is okay to fail. See: https://progress.opensuse.org/issues/112871
99d38cf to
f43a77d
Compare
Martchus
left a comment
There was a problem hiding this comment.
I'm guess I still don't get the full picture of how this repo works but the tests look like we've discussed (and you found an even better way to mock the commands).
We still log the error but we assume it is okay to fail.
See: https://progress.opensuse.org/issues/112871