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

TSO fix for using config file #1801

Merged
merged 5 commits into from
May 13, 2022
Merged

TSO fix for using config file #1801

merged 5 commits into from
May 13, 2022

Conversation

JillieBeanSim
Copy link
Contributor

@JillieBeanSim JillieBeanSim commented May 12, 2022

Proposed changes

addresses issue #1786

User shouldn't be prompted for account number if it is already included in the config file under the TSO profile.

Release Notes

Milestone:

Changelog: Bugfix: Fix issue with user being prompted for account number while issuing TSO command when config file already includes the account number for TSO profile.

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

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com>
@JillieBeanSim JillieBeanSim marked this pull request as ready for review May 13, 2022 12:33
@JillieBeanSim JillieBeanSim added v2-profiles relating specifically to v2 profile management Command(TSO/MVS) labels May 13, 2022
Copy link
Contributor

@rudyflores rudyflores left a comment

Choose a reason for hiding this comment

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

LGTM! I tested this PR by following the recreation steps from the user, the tests are passing as well!

Thanks for this fix @JillieBeanSim !

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 and make sense.
I added a comment about the usage of getProfileInfo (from globals)

Comment on lines +52 to +55
let mProfileInfo = await globals.PROFILESCACHE.getProfileInfo();
if (!mProfileInfo) {
mProfileInfo = await Profiles.getInstance().getProfileInfo();
}
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious if there is a better way to implement this.

Maybe modifying the getProfileInfo to return the instance stored in the class if defined
If not, then create a new one ?
(This may have other implications though)

I guess I can see myself forgetting that the globals instance can be undefined.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey Fernando, I know we spoke of possibly creating an instance in the future of getProfileInfo() to improve performance. I wonder if we need to create a new story to handle that since here with the globals it is actually an instance of ProfilesCache that is created during activation. Not sure why the call is failing in this case but not others though.

@JillieBeanSim JillieBeanSim merged commit 056655f into master May 13, 2022
@JillieBeanSim JillieBeanSim deleted the tso-acct-issue branch May 13, 2022 17:17
@zFernand0 zFernand0 mentioned this pull request Jul 5, 2022
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2-profiles relating specifically to v2 profile management
Projects
None yet
3 participants