-
Notifications
You must be signed in to change notification settings - Fork 86
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
Implementation of new "like" parameter for data set creation #766
Conversation
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments.
Also, please don't source test files:
******/zosfile/download/a1595240/a775092.txt
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Fixed! Also changed ID. Will check to see if I left it anywhere... |
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Codecov Report
@@ Coverage Diff @@
## master #766 +/- ##
==========================================
+ Coverage 91.75% 91.78% +0.02%
==========================================
Files 344 344
Lines 5035 4818 -217
Branches 747 638 -109
==========================================
- Hits 4620 4422 -198
+ Misses 413 394 -19
Partials 2 2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this parameter! Left a few comments related to tests.
Also I'm having a problem when calling the create dataset API like this:
await Create.dataSet(session, CreateDataSetTypeEnum.DATA_SET_LIKE, "DSNAME.NEW", { like: "DSNAME.OLD" });
An error 500 is returned:
RestClientError: z/OSMF REST API Error:
Rest API failure with HTTP(S) status 500
category: 1
rc: 4
reason: 13
message: primary
I think the problem may be with the payload being sent:
Resource: /zosmf/restfiles/ds/DSNAME.NEW
Request: POST
Headers: [{"X-CSRF-ZOSMF-HEADER":true}]
Payload: '{"like":"DSNAME.OLD","secondary":1}'
Seems like the secondary
property is getting set in the payload but shouldn't be. Since secondary
is set, z/OSMF expects that primary
should also be set.
packages/zosfiles/__tests__/__system__/api/methods/invoke/DefineVSAM.ams.temp
Outdated
Show resolved
Hide resolved
packages/zosfiles/__tests__/__system__/api/methods/upload/testfiles/upload.txt
Outdated
Show resolved
Hide resolved
packages/zosfiles/__tests__/api/methods/create/Create.unit.test.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
I have gotten to the easier comments, now I will take a look at this one... |
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Okay I think I have also gotten to the accidental setting of the secondary parameter... |
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing earlier comments 👍 Pushed a commit to wrap the system test in a TestEnvironment.
The API is working for me now. I was still getting error 500 after you removed the "secondary" property, then realized I was testing on a system that doesn't have the "allocate like" APAR installed. 😢
Will approve once the question about required values on ICreateDataSetOptions
is addressed 🙂
packages/zosfiles/src/api/methods/create/doc/ICreateDataSetOptions.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
…n class Create Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the ICreateDataSetLikeOptions
interface and Create.dataSetLike
method, they look good 🙂 Left a few comments.
packages/zosfiles/src/api/methods/create/doc/ICreateDataSetOptions.ts
Outdated
Show resolved
Hide resolved
packages/zosfiles/src/api/methods/create/doc/ICreateDataSetLikeOptions.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
packages/zosfiles/__tests__/__system__/api/methods/create/Create.system.test.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
packages/zosfiles/__tests__/api/methods/create/Create.unit.test.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
packages/zosfiles/__tests__/__system__/api/methods/create/Create.system.test.ts
Show resolved
Hide resolved
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: Katelyn Nienaber <katelyn.nienaber@broadcom.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs 85.7% Coverage The version of Java (1.8.0_212) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. |
woohoo! |
Solves linked issue: #754
The changes in this PR will allow calling of zowe.Create.dataSet with the new "like" REST parameter implemented in zOSMF v2.4.
I am not absolutely certain this doesn't belong in Imperative. Please let me know if it should be moved.