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

[Bug] [jobs.py] Enhance the code to catch a UnicodeDecodeError and provide reasonable message #1260

Closed
1 task done
ddimatos opened this issue Feb 27, 2024 · 0 comments · Fixed by #1261
Closed
1 task done
Assignees
Labels
Bug Something isn't working as designed. Post plan issue Added to a quarter after planning wsa completed, thus unaplanned.

Comments

@ddimatos
Copy link
Collaborator

Is there an existing issue for this?

  • There are no existing issues.

Bug description

The module utils jobs.py currently relies on ZOAU for its job processing, if a non-printable char is encountered it will break the Ansible module. This issue will add a try/expect clause around the code that could cause a module failure responding with a reasonable message to the user.

The related issues for this error are:

The logical place for this change is here:

  tmpcont = read_output(
       entry.id, single_dd["stepname"], single_dd["dataset"])

try:
tmpcont = read_output(
entry.id, single_dd["stepname"], single_dd["dataset"])
except UnicodeDecodeError as exc:
# DO something here, look at exc, see whats in it, not sure
# what we can do here at this point, read_output will likely
# only have a partial buffer read up to where the first non-printable
# was encountered.

IBM z/OS Ansible core Version

v1.8.0 (default)

IBM Z Open Automation Utilities

v1.2.5 (default)

IBM Enterprise Python

v3.11.x (default)

ansible-version

v2.16.x (default)

z/OS version

v2.5 (default)

Ansible module

No response

Playbook verbosity output.

No response

Ansible configuration.

No response

Contents of the inventory

No response

Contents of group_vars or host_vars

No response

@ddimatos ddimatos added the Bug Something isn't working as designed. label Feb 27, 2024
@ddimatos ddimatos added the Port Forward Forward port label Feb 27, 2024
@ddimatos ddimatos added the Post plan issue Added to a quarter after planning wsa completed, thus unaplanned. label Feb 27, 2024
@ddimatos ddimatos assigned rexemin and unassigned rexemin Feb 27, 2024
@ddimatos ddimatos added Port Backward This item is being backported as well, see issue notes and removed Port Forward Forward port labels Feb 27, 2024
@rexemin rexemin moved this from 📗In plan to 🏗 In progress in IBM Ansible z/OS Core Collection Feb 29, 2024
@rexemin rexemin moved this from 🏗 In progress to 🔍 Validation in IBM Ansible z/OS Core Collection Feb 29, 2024
@rexemin rexemin moved this from 🔍 Validation to ✅ Done in IBM Ansible z/OS Core Collection Mar 7, 2024
@ddimatos ddimatos added this to the [Q1] [2024] Bugs milestone Mar 14, 2024
@ddimatos ddimatos removed the Port Backward This item is being backported as well, see issue notes label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as designed. Post plan issue Added to a quarter after planning wsa completed, thus unaplanned.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants