Skip to content

Fix z:python:test + add architecture docs - #1121

Open
zFernand0 wants to merge 17 commits into
zf/fix-pyfrom
zf/fix-py-test
Open

Fix z:python:test + add architecture docs#1121
zFernand0 wants to merge 17 commits into
zf/fix-pyfrom
zf/fix-py-test

Conversation

@zFernand0

@zFernand0 zFernand0 commented Aug 27, 2026

Copy link
Copy Markdown
Member

What It Does

  • removes unnecessary python related scripts
  • adds architecture documentation
  • adds python test results

How to Test

Check the:

Review Checklist
I certify that I have:

Additional Comments

Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
@github-project-automation github-project-automation Bot moved this to New Issues in Zowe CLI Squad Aug 27, 2026
@zowe-robot zowe-robot moved this from New Issues to In Progress in Zowe CLI Squad Aug 27, 2026
ctx.encoding_opts.data_type = codepage == "binary" ? eDataTypeBinary : eDataTypeText;
std::string encoded = codepage;
a2e_inplace(encoded);
strncpy(ctx.encoding_opts.codepage, encoded.c_str(), sizeof(ctx.encoding_opts.codepage) - 1);

std::string encoded = etag;
a2e_inplace(encoded);
strncpy(ctx.etag, encoded.c_str(), sizeof(ctx.etag) - 1);
@zFernand0 zFernand0 changed the title Zf/fix py test Fix z:python:test + add architecture docs Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
…d other info

Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
@zFernand0

Copy link
Copy Markdown
Member Author

🐍 Precompiled Python bindings

Built from fcba0af0 on z/OS.

📦 Download zbind_bin_dist-pr1121-fcba0af0.tar.gz

Hosted as an asset on the py-bindings-dev prerelease (dev artifact, not for distribution).

Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
…afterwards

Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Comment thread .github/workflows/zos-py-build.yml Fixed
Comment thread .github/workflows/zos-py-build.yml Fixed
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
@zFernand0

zFernand0 commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

Failing tests:

=========================== short test summary info ============================
FAILED test_zjb_utf8.py::TestJobFunctions::test_get_job_jcl_success - Runtime...
FAILED test_zjb_utf8.py::TestJobFunctions::test_delete_job_success - RuntimeE...
FAILED test_zjb_utf8.py::TestJobFunctions::test_job_workflow_integration - Ru...
========================= 3 failed, 6 passed in 6.53s ==========================

UPDATE:

  • All fixed

Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
run: npm run z:python:test

- name: Python Test Report
uses: dorny/test-reporter@v2
@zFernand0
zFernand0 marked this pull request as ready for review August 28, 2026 15:57
@zowe-robot zowe-robot moved this from In Progress to Review/QA in Zowe CLI Squad Aug 28, 2026
…into zf/fix-py-test

Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@traeok traeok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for all your work on this Fernando! Left a few suggestions

@$(MAKE) test-zds 2>&1 | tee -a $(RESULTS_FILE) || touch .tests_failed
@$(MAKE) test-zjb 2>&1 | tee -a $(RESULTS_FILE) || touch .tests_failed
@$(MAKE) test-zusf 2>&1 | tee -a $(RESULTS_FILE) || touch .tests_failed
@$(MAKE) merge-results

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: I see the comment above this implies that the teardown always runs even if a stage fails, but it looks like if merge-results fails, it would abort make test. Consider updating the @$(MAKE) merge-results line to follow the pattern of the previous lines, so a partial report is still generated if something fails.

Suggested change
@$(MAKE) merge-results
@$(MAKE) merge-results || touch .tests-failed

Then you may need to update the inline script for merge-results (see comment below)


# Combines the per-suite JUnit reports into a single file so CI only needs to retrieve/publish one report
merge-results:
@$(PY_ENV)/bin/python -c "import sys, xml.etree.ElementTree as ET; root = ET.Element('testsuites'); [root.append(s) for f in sys.argv[2:] for s in ET.parse(f).getroot()]; ET.ElementTree(root).write(sys.argv[1], xml_declaration=True, encoding='UTF-8')" $(JUNIT_ALL) $(JUNIT_ZDS) $(JUNIT_ZJB) $(JUNIT_ZUSF)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Following up on the suggestion above, consider updating this script so that sys.argv[2:] is validated using os.path.exists 👍

extra_postargs = list(extra_postargs) + [EBCDIC_CHAR_MODE]
return base_compile(obj, src, src_ext, cc_args, extra_postargs, pp_opts)

compiler._compile = _compile

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I know we can probably make some assumptions about the distutils APIs, but since this monkey-patched function is private, consider checking first with hasattr before overwriting it.

Suggested change
compiler._compile = _compile
if hasattr(compiler, "_compile"):
compiler._compile = _compile

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems like the time budget could be a bit tight here for timing out the workflow (currently, the workflow is set to time out after 20min) - should we consider increasing the timeout in this PR?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for making the updates to the USS functions to handle EBCDIC<->ASCII 😋
Should we add a changelog entry to capture this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Review/QA

Development

Successfully merging this pull request may close these issues.

4 participants