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

Migrate from Zowe CLI package to Zowe SDKs #2730

Merged
merged 13 commits into from
Feb 28, 2024
Merged

Migrate from Zowe CLI package to Zowe SDKs #2730

merged 13 commits into from
Feb 28, 2024

Conversation

t1m0thyj
Copy link
Member

@t1m0thyj t1m0thyj commented Feb 20, 2024

Proposed changes

Resolves #2719

Had to temporarily add an override for @zowe/imperative in FTP extension's package.json, because we don't yet have a vNext version of the FTP plug-in with an Imperative vNext peer dependency.

Also adds a build script for updating Zowe SDKs: pnpm run update-sdks. In the future when v3 goes GA, we'll want to update the tag in this script from next to zowe-v3-lts 😋

Release Notes

Milestone: 3.0.0

Changelog: Migrated from @zowe/cli package to individual Zowe SDK packages.

Types of changes

What types of changes does your code introduce to Zowe Explorer?
Put an x in the boxes that apply

  • 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

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 reviewer

  • 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)

Further comments

Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: Patch coverage is 95.58824% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 93.43%. Comparing base (7f11560) to head (d6670af).

Files Patch % Lines
packages/zowe-explorer/src/Profiles.ts 85.29% 5 Missing ⚠️
...-explorer-api/src/profiles/ZoweExplorerZosmfApi.ts 96.39% 4 Missing ⚠️
...xplorer-ftp-extension/src/ZoweExplorerFtpJesApi.ts 86.66% 2 Missing ⚠️
packages/zowe-explorer/src/job/ZoweJobNode.ts 71.42% 2 Missing ⚠️
packages/zowe-explorer/src/ZoweExplorerExtender.ts 75.00% 1 Missing ⚠️
...kages/zowe-explorer/src/dataset/ZoweDatasetNode.ts 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2730      +/-   ##
==========================================
+ Coverage   93.41%   93.43%   +0.02%     
==========================================
  Files         109      109              
  Lines       10236    10241       +5     
  Branches     2184     2188       +4     
==========================================
+ Hits         9562     9569       +7     
+ Misses        673      671       -2     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
@t1m0thyj t1m0thyj marked this pull request as ready for review February 20, 2024 18:41
@t1m0thyj
Copy link
Member Author

t1m0thyj commented Feb 21, 2024

Since this PR introduces a lot more @zowe-scoped dependencies across multiple package.json files, would it be helpful to have a script in the repo that we could run to update them all to the latest version?

JillieBeanSim
JillieBeanSim previously approved these changes Feb 22, 2024
Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

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

Thanks @t1m0thyj LGTM!

Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
@t1m0thyj
Copy link
Member Author

Build is currently failing because we use a method marked as internal in Imperative, waiting on zowe/zowe-cli#2068 to be published

Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
zFernand0
zFernand0 previously approved these changes Feb 26, 2024
Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

LGTM! 😋

Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
traeok
traeok previously approved these changes Feb 27, 2024
Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @t1m0thyj 🎉

Comment on lines +13 to +19
import * as imperative from "@zowe/imperative";
import * as zosconsole from "@zowe/zos-console-for-zowe-sdk";
import * as zosfiles from "@zowe/zos-files-for-zowe-sdk";
import * as zosjobs from "@zowe/zos-jobs-for-zowe-sdk";
import * as zostso from "@zowe/zos-tso-for-zowe-sdk";
import * as zosuss from "@zowe/zos-uss-for-zowe-sdk";
import * as zosmf from "@zowe/zosmf-for-zowe-sdk";
Copy link
Member

@traeok traeok Feb 27, 2024

Choose a reason for hiding this comment

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

We might want to evaluate the amount of import * statements in production code. Nothing here to worry about as this is test code - was mostly used as an example - but would help to maintain runtime efficiency 😋

Granted, since we use a bundler this really doesn't apply to us, but it might provide indirect performance benefits for non-Webpacked extenders.

@t1m0thyj t1m0thyj requested a review from zFernand0 February 27, 2024 20:32
zFernand0
zFernand0 previously approved these changes Feb 27, 2024
Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

LGTM! 😋

@@ -76,6 +75,7 @@
"package": "pnpm run -r package",
"pretest:integration": "ts-node ./scripts/create-env.ts",
"posttest:integration": "ts-node ./scripts/clean-env.ts",
"preinstall": "npx only-allow pnpm"
"preinstall": "npx only-allow pnpm",
"update-sdks": "pnpm -r update \"@zowe/*@next\" \"!@zowe/zowe-explorer-api\""
Copy link
Member

Choose a reason for hiding this comment

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

❤️

@zFernand0
Copy link
Member

This shall be merged last 😋

Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
@t1m0thyj t1m0thyj dismissed stale reviews from zFernand0 and traeok via 9ad58a3 February 28, 2024 15:39
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

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

when I run pnpm run build on this branch it creates/updates 3 files with licenses but files have nothing else in them. Should they be removed or updated as seen?
Screenshot 2024-02-28 at 11 53 53 AM

Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
@t1m0thyj
Copy link
Member Author

t1m0thyj commented Feb 28, 2024

when I run pnpm run build on this branch it creates/updates 3 files with licenses but files have nothing else in them. Should they be removed or updated as seen?

@JillieBeanSim Thanks for catching this! I think what was happening was pnpm license added a trailing line and then pnpm pretty removed it 😆 The empty module mocks were kind of weird, so I removed them and updated tests to work without them.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

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

LGTM! thanks @t1m0thyj

Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

Thanks @t1m0thyj for updating the newly-merged changes to use the SDKs 😁

@t1m0thyj t1m0thyj merged commit ceaba7c into next Feb 28, 2024
15 of 17 checks passed
@t1m0thyj t1m0thyj deleted the dev/migrate-to-sdks branch February 28, 2024 19:03
@t1m0thyj t1m0thyj linked an issue Mar 5, 2024 that may be closed by this pull request
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.

V3: Migrate away from @zowe/cli to @zowe/*-for-zowe-sdk packages
4 participants