Closed tiantn closed 2 months ago
Hi @tiantn, thanks for looking into this issue!
Rather than changing the stepname on the default response, could we update
getSpoolFiles
to return an empty array whenever we cannot fetch spool files? This would be consistent with "no spool files available" and avoids adding special handling for this kind of response from the FTP extension. With the current changes, we'd have to add a check within Zowe Explorer's job tree to validate thestepname
, which I'd like to avoid if possible.
Thank you @traeok! I updated it to return an empty array.
@tiantn , I didn't try it yet, but wonder the empty array returned will make Zowe explorer shows nothing when user clicks to expand the active job, or Zowe explorer handled the empty array already, like showing a node with "No spool available"?
@tiantn , I didn't try it yet, but wonder the empty array returned will make Zowe explorer shows nothing when user clicks to expand the active job, or Zowe explorer handled the empty array already, like showing a node with "No spool available"?
@std4lqi Zowe Explorer handles the empty array as successful API call with empty return and displays the node with "No spool available" as @traeok mentioned.
Attention: Patch coverage is 33.33333%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 93.47%. Comparing base (
f415f38
) to head (694b4a7
).
Files | Patch % | Lines |
---|---|---|
...xplorer-ftp-extension/src/ZoweExplorerFtpJesApi.ts | 0.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
we have handling in ZE for the empty array with the spool.length check displaying "There are no JES spool messages to display" for the empty array of spool files for job. If see error may have a bug on ZE side.
we have handling in ZE for the empty array with the spool.length check displaying "There are no JES spool messages to display" for the empty array of spool files for job
While we do handle that scenario in getChildren
, the ZoweSpoolNode
constructor will still try to call encodeJobFile
with an undefined spool object when constructing the placeholder node - this causes the error message above to appear when calling getChildren
on the active job.
Since the issue is specific to Zowe Explorer's core logic, I don't mind pushing the fix to this PR, but I wanted to mention this first before doing so. Whatever works best for @tiantn works for me - I can pull and test the change once it's added, or I can push up the necessary changes to get this merged 😁
@tiantn , I didn't try it yet, but wonder the empty array returned will make Zowe explorer shows nothing when user clicks to expand the active job, or Zowe explorer handled the empty array already, like showing a node with "No spool available"?
Hi @std4lqi , like the screenshot in @traeok ‘s comments below. Now it will show an error message. Seems Zowe explorer need additional update.
we have handling in ZE for the empty array with the spool.length check displaying "There are no JES spool messages to display" for the empty array of spool files for job
While we do handle that scenario in
getChildren
, theZoweSpoolNode
constructor will still try to callencodeJobFile
with an undefined spool object when constructing the placeholder node - this causes the error message above to appear when callinggetChildren
on the active job.Since the issue is specific to Zowe Explorer's core logic, I don't mind pushing the fix to this PR, but I wanted to mention this first before doing so. Whatever works best for @tiantn works for me - I can pull and test the change once it's added, or I can push up the necessary changes to get this merged 😁
Thank you @traeok , @JillieBeanSim , I am not very familiar with Zowe Explorer's core logic. But if any thing I can do please let me know. 😄
Thank you @traeok , @JillieBeanSim , I am not very familiar with Zowe Explorer's core logic. But if any thing I can do please let me know. 😄
No worries @tiantn, I've pushed up a small change to this PR that will fix the behavior I mentioned - hope that's okay 😋 Thanks again for the fix!
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
Proposed changes
Release Notes
Milestone:
Changelog:
Types of changes
What types of changes does your code introduce to Zowe Explorer? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the revieweryarn workspace vscode-extension-for-zowe vscode:prepublish
has been executedFurther comments
Fix issue #2832