-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not consider failure to sync fatal #238
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
script/scriptgen.py
Outdated
@@ -674,7 +674,7 @@ def gen_read_files(self, f): | |||
if self.assets and self.assets_flavor: | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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