Skip to content
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

Bugfix/8877/Fixes deletion of src on encoding error #321

Merged
merged 5 commits into from
Aug 22, 2022

Conversation

rexemin
Copy link
Collaborator

@rexemin rexemin commented Apr 27, 2022

The code failed while trying to copy files from a directory that needs to be converted, dirs_exist_ok=True should fix that. Additionally, I added two checks to always make sure that we don't accidentally delete source files when they're not temporary.

SUMMARY

Fixes NAZARE-8877: deletion of source files when encoding conversion fails.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

zos_copy

ADDITIONAL INFORMATION

The bugfix will also change test cases a bit to make sure the module doesn't delete source files when encoding conversion fails.

rexemin added 2 commits April 27, 2022 08:43
The code failed while trying to copy files from a directory that needs to be converted, dirs_exist_ok=True should fix that. Additionally, I added two checks to always make sure that we don't accidentally delete source files when they're not temporary.
@rexemin rexemin changed the title Fixed deletion of src on encoding error Bugfix/8877/Fixed deletion of src on encoding error May 2, 2022
Quick workaround for a failing test in zos_copy. The test has been fixed more permanently in v1.3.3 of the collection.
@rexemin rexemin marked this pull request as ready for review May 3, 2022 15:41
Copy link
Collaborator

@richp405 richp405 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned about an assertion based on file count. Remember our test environments are sometimes shared, so this could fire up errors that are just bad timing. Let's think about a different approach, like file enumeration instead of raw counts.

@ddimatos ddimatos changed the title Bugfix/8877/Fixed deletion of src on encoding error Bugfix/8877/Fixes deletion of src on encoding error Aug 22, 2022
 Conflicts:
	tests/functional/modules/test_zos_copy_func.py
@ddimatos
Copy link
Collaborator

image

Internal regression[ link/log](http://sprinkles1.fyre.ibm.com:8080/job/zosAnsible/1022/consoleText)

Copy link
Collaborator

@ddimatos ddimatos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for this change !!!
@rexemin

@ddimatos ddimatos merged commit 24c50e7 into dev Aug 22, 2022
@ddimatos ddimatos deleted the bugfix/8877/zos-copy-delete-encoding-fail branch August 22, 2022 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants