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

[Issue #845] Do not show undefined spool files for a job #1584

Merged
merged 2 commits into from Nov 25, 2021

Conversation

roman-kupriyanov
Copy link
Contributor

Proposed changes

Resolves an issue #845 by skipping all the objects which are returned from GetSpoolFiles API call and do not correspond to the proper zowe.IJobFile type. As a result there will be no more undefined:undefined(undefined) items in the spool files tree.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Updates to Documentation or Tests (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • PR title follows Conventional Commits Guidelines
  • PR Description is included
  • gif or screenshot is included if visual changes are made
  • yarn workspace vscode-extension-for-zowe vscode:prepublish has been executed
  • All checks have passed (DCO, Jenkins and Code Coverage)
  • I have added unit test and it is passing
  • I have added integration test and it is passing
  • There is coverage for the code that I have added
  • I have tested it manually and there are no regressions found
  • I have added necessary documentation (if appropriate)
  • Any PR dependencies have been merged and published (if appropriate)

Signed-off-by: Roman Kupriyanov <roman.kupriyanov@broadcom.com>
Copy link
Contributor

@jellypuno jellypuno left a comment

Choose a reason for hiding this comment

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

As per discussion, please add the text " There are no JES spool messages to display" when I click on the arrow. Thank you and well done on your first PR! 🎉

@roman-kupriyanov
Copy link
Contributor Author

As per discussion, please add the text " There are no JES spool messages to display" when I click on the arrow. Thank you and well done on your first PR! 🎉

Thank you, Jelly! 😊

That would be a great addition for the UX in general. Nice idea! Will add it..

Signed-off-by: Roman Kupriyanov <roman.kupriyanov@broadcom.com>
@uzust01
Copy link

uzust01 commented Nov 24, 2021

Looks good! Thanks, Roman.

@nickImbirev
Copy link
Contributor

I'm not sure, that the proposed behaviour will solve the problem. In the end, the user will still try to submit the job with the '&' in the job name (in the beginning) and they will not be able to see any spool files for it. I would consider this as a bug :(

But I do understand, that there is additional contribution required from the SDK authors. Maybe we can at least submit a GH issue for them? And make additional issue in our repo to fix the ?, & and other problematic symbols in our URI serialisation process?

@jellypuno
Copy link
Contributor

jellypuno commented Nov 25, 2021

And make additional issue in our repo to fix the ?, & and other problematic symbols in our URI serialisation process

@nickImbirev I do not understand what do you mean by this. If mainframe is accepting ?, & in their JCLs, we are going to accept that as well.

I agree that we should open an issue against the SDK or the CLI team because if you fire the APIs the records are available. I am not sure why they are giving us an empty response.

image

FIles:
image

Records:
image

ISPF:
image

@jellypuno
Copy link
Contributor

@roman-kupriyanov I am going to accept this as a solution for the issue but I agree with @nickImbirev that we should open a GH issue about the response that we are getting from the SDK. As seen in the screenshots, The z/OSMF response contains the records that we need. We need investigate why the SDK is not giving that to us. Can you please open an issue in the zowe/cli repo?

@roman-kupriyanov
Copy link
Contributor Author

Can you please open an issue in the zowe/cli repo?

Yes, sure, I was about to propose the same today.

A root cause for that is in the z/OSMF request URL, where &,? are the special symbols to organize the query part of that URL and it is constructed inside @zowe/cli API's for GetSpoolFiles call, out of our control on on the ZE level at the moment. From z/OSMF perspective though, alternatively, you can use a Job correlator value to do the same call and it does not contain any special characters, which breaks URL. Also, it is specified in those response fields files-url and records-url, which is why those links are working perfectly. @zowe/cli does not provide "the Job correlator way" of making calls to z/OSMF, except using jobname/jobid, which will be broken each time they contain &,? or any other special symbols:
https://github.com/zowe/zowe-cli/blob/0cc2ed46de784876172d79d16c1548e2b3fb23c1/packages/zosjobs/src/GetJobs.ts#L253

In sum, I assume, an issue about adding the alternative way of calls for @zowe/cli is what may help us with this issue in general. So I will create it 😉

@jellypuno
Copy link
Contributor

@roman-kupriyanov That is a good point. Yes. suggest that alternative way 👍

@jellypuno jellypuno merged commit 6fa2b36 into zowe:master Nov 25, 2021
@roman-kupriyanov roman-kupriyanov deleted the fix-undef-spool-files branch November 25, 2021 16:33
@crawr crawr added this to the 1.21.0 milestone Nov 30, 2021
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.

Job with name ??????? causes "undefined:undefined(undefined)" in jobs tab Invalid Job Spool Display
5 participants