Skip to content

Conversation

@AndreMarcel99
Copy link
Collaborator

@AndreMarcel99 AndreMarcel99 commented Oct 28, 2025

SUMMARY

Create a role that execute zos_job_query to parsing the response to return job_status and if is running or not as boolean value. Fixes #1625

ISSUE TYPE
  • Role Pull Request
  • Bugfix Pull Request
COMPONENT NAME

Role that get first value of zos_job_query expecting to be the job_id set by the user.
Delete unnecessary parsing on zos_job_query that remove the current estatus of the job.
Also adding test method for roles on pytest.

Screenshot 2025-10-27 at 6 55 51 p m

richp405
richp405 previously approved these changes Oct 28, 2025
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.

Nice simple role. One minor typo in the readme. A question: should you mention the role in the changelog, or not, since it is a role, not main code?

richp405
richp405 previously approved these changes Oct 30, 2025
Copy link
Collaborator

@fernandofloresg fernandofloresg left a comment

Choose a reason for hiding this comment

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

requested few changs

if "AC" in status_raw:
# the job is active
ret_code["msg"] = None
ret_code["msg_code"] = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

if this is not set, will it still be returned as None or not returned at all ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it would make sense to set them as none at the start of the function

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It returns as None, but right better to be safe

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here we cover that case of been None

André Marcel Gutiérrez Benítez and others added 4 commits November 7, 2025 14:27
@AndreMarcel99
Copy link
Collaborator Author

Screenshot 2025-11-07 at 2 35 03 p m Screenshot 2025-11-07 at 2 35 31 p m

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.

[Role] A role that can respond with a simple reply if a Job is running or not.

4 participants