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

[vNext] Update SDKs and address breaking changes #2932

Merged
merged 24 commits into from
Jul 23, 2024
Merged

[vNext] Update SDKs and address breaking changes #2932

merged 24 commits into from
Jul 23, 2024

Conversation

JillieBeanSim
Copy link
Contributor

@JillieBeanSim JillieBeanSim commented Jun 4, 2024

Proposed changes

Update Zowe SDKs to 8.0.0-next.202407051717 and address breaking changes
#2918

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 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: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
@JillieBeanSim JillieBeanSim added this to the v3 pre-releases milestone Jun 4, 2024
@JillieBeanSim JillieBeanSim self-assigned this Jun 4, 2024
@JillieBeanSim JillieBeanSim marked this pull request as draft June 4, 2024 14:21
@JillieBeanSim JillieBeanSim linked an issue Jun 4, 2024 that may be closed by this pull request
JillieBeanSim and others added 3 commits June 4, 2024 10:38
Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Copy link

codecov bot commented Jun 4, 2024

Codecov Report

Attention: Patch coverage is 96.29630% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.74%. Comparing base (320ac3f) to head (4f1c8aa).

Files Patch % Lines
packages/zowe-explorer/src/utils/ProfilesUtils.ts 95.65% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2932      +/-   ##
==========================================
- Coverage   92.74%   92.74%   -0.01%     
==========================================
  Files         107      107              
  Lines       10889    10882       -7     
  Branches     2354     2369      +15     
==========================================
- Hits        10099    10092       -7     
  Misses        788      788              
  Partials        2        2              

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

Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
@JillieBeanSim
Copy link
Contributor Author

JillieBeanSim commented Jun 6, 2024

@t1m0thyj I will be opening an issue in @zowe/cli for an issue I see where the converted configuration file isn't being written (tested on mac and windows with same results) and also if the code to delete the @zowe/secure-credential-store plugin isn't going to be public imperative should handle the check and removal in it's APIs

issue: zowe/zowe-cli#2170

@zFernand0 I tested the config file creation with this PR and still see that the base profile is missing

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

t1m0thyj commented Jun 7, 2024

@t1m0thyj I will be opening an issue in @zowe/cli for an issue I see where the converted configuration file isn't being written (tested on mac and windows with same results) and also if the code to delete the @zowe/secure-credential-store plugin isn't going to be public imperative should handle the check and removal in it's APIs

issue: zowe/zowe-cli#2170

@zFernand0 I tested the config file creation with this PR and still see that the base profile is missing

@JillieBeanSim Regarding the first issue, @gejohnston is investigating it.

Regarding the base profile missing, I pushed a commit that should fix this. It seems kind of redundant that the ConfigBuilder requires base profile definition to be passed in twice. Perhaps we could enhance the Zowe SDKs so that the old code would work 😋

JillieBeanSim and others added 8 commits June 19, 2024 14:15
Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
@JillieBeanSim JillieBeanSim marked this pull request as ready for review July 9, 2024 12:59
@JillieBeanSim JillieBeanSim requested a review from traeok July 9, 2024 12:59
zFernand0
zFernand0 previously approved these changes Jul 11, 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! 😋

Copy link
Member

@t1m0thyj t1m0thyj left a comment

Choose a reason for hiding this comment

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

Looks pretty good, thanks @JillieBeanSim! Left a few comments

@@ -80,6 +81,7 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum
### Bug fixes

- Fixed ECONNRESET error when trying to upload or create an empty data set member. [#2350](https://github.com/zowe/vscode-extension-for-zowe/issues/2350)
- Update Zowe SDKs to `8.0.0-next.202407051717` for technical currency. [#2918](https://github.com/zowe/zowe-explorer-vscode/issues/2918)
Copy link
Member

Choose a reason for hiding this comment

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

Should we remove this line (seems redundant) and update line 13 above to have latest timestamp (8.0.0-next.202407051717)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can keep the pre-release version updates in CHANGELOGs, this may help extenders know the compatible CLI/SDK dependency version per Zowe Explorer pre-release. We will create a nice clean CHANGELOG for the GA

packages/zowe-explorer-api/src/globals/Interfaces.ts Outdated Show resolved Hide resolved
@@ -571,4 +562,46 @@ export class ProfilesUtils {
}
throw new Error(vscode.l10n.t("Tree Item is not a Zowe Explorer item."));
}

private static async convertV1Profs(): Promise<void> {
Copy link
Member

Choose a reason for hiding this comment

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

Noticed the logic for building a response message after converting v1 profiles has moved from ProfilesCache in ZE API to here. Do we think that extenders who wish to convert profiles don't need this code and plan to leave it up to them to process the response themselves?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe we should keep the original response in the API call return so Extenders can manipulate the information how they wish.

@awharn
Copy link
Member

awharn commented Jul 12, 2024

I tested some of the conversion functionality on Linux, and some of the output looks a bit odd once the conversion is complete. More specifically, the output appears to be very squished together. Not asking for a change, just raising a bit of awareness in case this wasn't seen in other operating systems.

image

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

Pushed a commit that should make the message easier to read 😋
image

@JillieBeanSim @zFernand0 I also ended up changing ProfilesCache.convertV1ProfToConfig to be a static method that takes an additional parameter. This seemed necessary because Constants.PROFILES_CACHE is not yet initialized at the time of converting profiles when ZE loads. Should I document this as a breaking change, or revert it?

@zFernand0
Copy link
Member

zFernand0 commented Jul 15, 2024

JillieBeanSim zFernand0 I also ended up changing ProfilesCache.convertV1ProfToConfig to be a static method that takes an additional parameter. This seemed necessary because Constants.PROFILES_CACHE is not yet initialized at the time of converting profiles when ZE loads. Should I document this as a breaking change, or revert it?

Thanks for addressing the format of these messages. Curious if you had a chance to try and switch the order of these two calls in the activate function?

    await ProfilesUtils.initializeZoweProfiles((msg) => ZoweExplorerExtender.showZoweConfigError(msg));
    await Profiles.createInstance(ZoweLogger.imperativeLogger);

If the above is possible (to some degree), then I think we don't need to add this "breaking change".

Note: we may have to break down the initializeZoweProfiles method because there may be things that need to occur before the creation of the ProfilesCache instance 😋 If that's the case, I think the change is small enough that it may not be worth causing much disruption in out activation phase 😋

@zFernand0 zFernand0 self-requested a review July 15, 2024 13:37
t1m0thyj and others added 6 commits July 17, 2024 09:38
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
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.

changes LGTM! 😋
one small change requested just to clean some of the indentation/logic 😋

packages/zowe-explorer/src/utils/ProfilesUtils.ts Outdated Show resolved Hide resolved
traeok
traeok previously approved these changes Jul 22, 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 Billie! I left a comment about using Object.defineProperty but nothing that must be changed for this PR.

I agree with Fernando's request to remove the nested then in favor of using the value returned from Gui.infoMessage. If the change marks my review as stale, I'll re-approve.

Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
Copy link

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! 😋
Thanks for addressing the feedback 🙏🏽

@traeok traeok merged commit 3ba345a into next Jul 23, 2024
22 checks passed
@traeok traeok deleted the update-sdks branch July 23, 2024 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
5 participants