-
Notifications
You must be signed in to change notification settings - Fork 94
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
Multiple issues: Fixed errors with updating optional profile fields #1120
Conversation
Hey @katelynienaber I was testing this PR, while creating a profile I still get Then I edited the same profile leaving those same values blank and still got |
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.
see comment above for issues I ran into.
the changes requested are:
Should we use this same way of thinking during create?
Also, would like to see the default value for encoding used or leave it out of the yaml
Finally, shouldn't it leave response timeout out of the yaml if value = 0?
Hey @JillieBeanSim, thanks for reviewing! :D Give it a shot now. Should we use this same way of thinking during create? Also, would like to see the default value for encoding used or leave it out of the yaml Finally, shouldn't it leave response timeout out of the yaml if value = 0? |
@katelynienaber Let's think of another way and not implement a hack. We can check zowe/cli code as to how they implmented this. @JillieBeanSim When you say "same way of thinking during create", Are you thinking of re-factoring that process? Code-wise or UX-wise or both? If yes, do you a design that we can look into? |
@JillieBeanSim Ok, now we have a not-hacky solution :) @jellypuno pointed out that this option could allow passing optional parameters, and it works (at least for me) Please check again when you have time ^^" |
@jellypuno I was only thinking of the way it was saved to the yaml, ie. no empty strings and Thanks for looking into my questions and concerns @katelynienaber & @jellypuno I will retest the PR today. |
@katelynienaber the functionality works well now and as expected for create and update of profiles without optional user/pass and for the empty encoding and response timeout values. I do see this message pop up sometimes after editing a profile that doesn't have the values mentioned. Not sure but I believe this error is being handled in @jellypuno PR #1100 I know I ran into it there as well. If this is correct @jellypuno let me know and I will approve this PR |
Merge this after Jelly's PR #1100! |
@JillieBeanSim I think this issue was fixed in @jellypuno's PR, could you check it out again? I don't see it in mine. |
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.
This PR is looking good to me. All unit and expected integration tests are passing. I am able to create and edit profiles without specifying username, password, encoding, and/or timeout, and the yaml is created/updated without empty fields, which is really great. I do sometimes see the error that @JillieBeanSim mentioned in her comment above, ... but I can also get it to happen in v1.11.1 the same way (but not reliably). We may want to look into it as a separate issue.
Another issue I encountered while testing, which I also see in 1.11.1 (and thus not a blocker for this PR) is that I get prompted for credentials immediately upon finishing creation or editing of a profile without username/password. I suppose this behavior has been around for a while, but somehow I only just now noticed it, and it feels unexpected since I am not trying to use the profile to access anything yet; I'm just udpating/creating it. Again, this could be investigated as a separate issue. I just wanted to mention it here so others are aware that it isn't a new behavior with this PR.
Thanks @katelynienaber for the fixes in this PR! It was such a pain to deal with empty profile fields when troubleshooting/testing other profile-related PRs, and I am happy to see that getting resolved.
@lauren-li @JillieBeanSim It's fine with me if you want to wait on this one, it wasn't promised in the PI goals :D We should bring it up with @zdmullen and @jellypuno as well. Billie if you already have something in progress to fix this error you can have it XD I am glad to jump on if you need me and ofc review too. |
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
2b7408c
to
75cbda5
Compare
PR #1120 linked issue: Always allow prompting
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.
This PR works great now with #1178 added in. I don't see any of the issues we were seeing before. Thanks @katelynienaber for doing this work. All expected tests and checks are passing
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.
This looks good to me now! All unit and expected integration tests are passing. Omitting credentials when creating and updating a profile in Zowe Explorer now omits the respective fields instead of creating empty strings. With the merging-in of PR #1178, this works much more seamlessly than before (i.e. no new "error" pop-ups). This PR also appears to be "backwards compatible" with the existing credential-less profiles, in that those profiles are still able to be used, and updating them with empty credentials will just completely remove the blank user
and password
fields.
Thanks @katelynienaber for your hard work on this PR!
Proposed changes
This is one change that fixes several issues.
Fix for issue Editing Base Path on a ZE Connection Profile Doesn't Save it #989: There has been a bugfix! 😃 Which means in Zowe Explorer we can now pass an
IUpdateProfile
object toCliProfileManager.update()
...and we don't have to change the profile object key names to resemble CLI command params. This was the cause of Editing Base Path on a ZE Connection Profile Doesn't Save it #989.Fix for issue Enhance Optional Profiles #1095: I set
merge: false
in the profile, so only the new values will be kept, not the old (ie. now we don't have to store an empty string as a placeholder for an optional field).Fix for issue Default responseTimeout=0 Causes Zowe CLI Error #1016: There are two new conditions in our
updateProfile()
function, which will remove theresponseTimeout
field if it was set to 0, and any other field if it was set to an empty string. And because of fix 2 (above), Default responseTimeout=0 Causes Zowe CLI Error #1016 should not reoccur.Linked issues (bugs):
#989
#1016
#1095
Other linked issues (to-dos that are no longer needed):
#1038
#1090
Release Notes
Milestone: 1.12
Changelog: Fixed errors with updating optional profile fields
Types of changes
What types of changes does your code introduce to Zowe Explorer?
Put an
x
in the boxes that applyChecklist
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 revieweryarn workspace vscode-extension-for-zowe vscode:prepublish
has been executed