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] [zos_submit_job] Option return_output when set to false continues to access job output #1041

Closed
2 tasks done
ddimatos opened this issue Oct 31, 2023 · 1 comment · Fixed by #1058
Closed
2 tasks done
Assignees
Labels
Bug Something isn't working as designed. Port Backward This item is being backported as well, see issue notes Post plan issue Added to a quarter after planning wsa completed, thus unaplanned.

Comments

@ddimatos
Copy link
Collaborator

ddimatos commented Oct 31, 2023

Is there an existing issue for this?

  • There are no existing issues.

Are the dependencies a supported version?

  • The dependencies are supported.

IBM Z Open Automation Utilities

v1.2.5

IBM Enterprise Python

v3.9.x

IBM z/OS Ansible core Version

v1.6.0

ansible-version

v2.14.x

z/OS version

v2.5

Ansible module

zos_job_submit

Bug description

It was reported that when using zos_job_submit with option return_output=false that the module continues to invoke code that performs job output reads (jobs.read_output). I have not reviewed the code to understand why we access jobs.read_output, the fist thing would be to see if there is anything specific the code needs to operate minimally or is this an unnecessary invocation.

I can see the value in avoiding this call if its not necessary because it is added overhead but more so,

Note: This could also serve as a work around to the known issue of reading chars that don't correspond to UTF-8 (which will be fixed in Q1 2024) by not reading non-UTF8 content. Although it could help, its only note and not the actual issue being highlighted here.

This was reported by @jbyibm
Internal thread: https://.slack.com/archives/CSLEJ8VGV/p1697623287742339?thread_ts=1697595176.094609&cid=CSLEJ8VGV

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 Oct 31, 2023
@ddimatos ddimatos added the Needs Triage Issue need assessment by a team member(s) label Oct 31, 2023
@richp405 richp405 assigned richp405 and unassigned IBMAnsibleHelper Nov 2, 2023
@richp405
Copy link
Collaborator

richp405 commented Nov 9, 2023

zos_submit_job calls job:job_output, and deletes the values returned

    job_output_txt = job_output(
        job_id=job_submitted_id, owner=None, job_name=None, dd_name=None,
        duration=duration, timeout=wait_time_s, start_time=start_time)

job:job_output calls job:job_detail:

job_detail = _get_job_status(job_id=job_id, owner=owner, job_name=job_name,
dd_name=dd_name, duration=duration, timeout=timeout, start_time=start_time)

We added the ability to 'not' ask for data details in job:_get_job_status
def _get_job_status(job_id="", owner="", job_name="*", dd_name=None, dd_scan=True, duration=0, timeout=0, start_time=timer()):

But that setting wasn't back-propagated to submit_job or job_output.

It would be fairly trivial to pass this down the chain, so the contents wouldn't be queried. Small job.

@richp405 richp405 added the Post plan issue Added to a quarter after planning wsa completed, thus unaplanned. label Nov 9, 2023
@richp405 richp405 added this to the [Q4] [2023] Bugs milestone Nov 9, 2023
@richp405 richp405 added Port Backward This item is being backported as well, see issue notes and removed Needs Triage Issue need assessment by a team member(s) labels Nov 9, 2023
@richp405 richp405 moved this to 👀 Reviewing in IBM Ansible z/OS Core Collection Nov 10, 2023
@richp405 richp405 moved this from 👀 Reviewing to ✅ Done in IBM Ansible z/OS Core Collection Nov 15, 2023
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. Port Backward This item is being backported as well, see issue notes 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