-
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
add tagging for upload.bufferToUssFile #2378
Conversation
Signed-off-by: jace-roell <[email protected]>
Signed-off-by: jace-roell <[email protected]>
Signed-off-by: jace-roell <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2378 +/- ##
==========================================
- Coverage 91.27% 91.27% -0.01%
==========================================
Files 638 638
Lines 18141 18146 +5
Branches 3914 3915 +1
==========================================
+ Hits 16559 16563 +4
- Misses 1581 1582 +1
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: jace-roell <[email protected]>
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.
Changes make sense to me, thanks Jace for the fix!
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.
Requesting an edit to the changelog : )
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.
Took me a few minutes to figure out testing steps since Upload.bufferToUssFile
is not exposed on any CLI command 😓
Still testing since I ran into a small hiccup 😋
Full testing script
/* Save this file as `test.mjs` and run `node test.mjs` */
import { ProfileInfo } from "@zowe/imperative";
import { Upload } from "@zowe/zos-files-for-zowe-sdk";
import * as fs from "fs";
(async () => {
// Load connection info from default z/OSMF profile
const profInfo = new ProfileInfo("zowe");
await profInfo.readProfilesFromDisk();
const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf");
const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true });
const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs);
const localFile = "package.json";
const localFileContents = fs.readFileSync(localFile).toString();
const remoteLocation = "/u/users/fernando/test-file1.txt";
const options = { binary: true };
// const response = await Upload.fileToUssFile(session, localFile, remoteLocation, options);
const response = await Upload.bufferToUssFile(session, remoteLocation, Buffer.from(localFileContents), options);
console.log(response);
})().catch((err) => {
console.error(err);
process.exit(1);
});
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! 😋
When I tested it, I had a version of master cached in the build.
My mistake.
Files get tagged as expected 🙏
Besides the changelog updates requested by Ana, I think that my comments are mostly nice-to-have(s). |
Signed-off-by: jace-roell <[email protected]>
Signed-off-by: jace-roell <[email protected]>
Signed-off-by: jace-roell <[email protected]>
Signed-off-by: jace-roell <[email protected]>
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.
Requesting a minor edit to the changelog
Signed-off-by: jace-roell <[email protected]>
Signed-off-by: jace-roell <[email protected]>
Quality Gate passedIssues Measures |
What It Does
Add file tagging to
Upload.bufferToUssFile
Review Checklist
I certify that I have: