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

[Issue #1449] Update removeJob command to refresh the profiles cache separately from refreshing a tree #1524

Merged
merged 17 commits into from Nov 29, 2021

Conversation

nickImbirev
Copy link
Contributor

@nickImbirev nickImbirev commented Oct 8, 2021

Proposed changes

Resolves the issue #1449 by changing semantics of the refreshAll util function. Now, we need to refresh the profiles cache independently from any tree provider.

Screen.Recording.2021-10-08.at.15.44.12.mov

Types of changes

  • 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

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

Signed-off-by: Nikolai Imbirev <nikolay.imbirev@broadcom.com>
Nikolai Imbirev added 4 commits October 12, 2021 18:04
Signed-off-by: Nikolai Imbirev <nikolay.imbirev@broadcom.com>
Signed-off-by: Nikolai Imbirev <nikolay.imbirev@broadcom.com>
Signed-off-by: Nikolai Imbirev <nikolay.imbirev@broadcom.com>
Signed-off-by: Nikolai Imbirev <nikolay.imbirev@broadcom.com>
@nickImbirev nickImbirev marked this pull request as ready for review October 13, 2021 14:26
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.

@nickImbirev I don't see the tree refreshing and removing the deleted job(s) after confirmation. I have to right click the session and select refresh for the deleted jobs to be removed from the tree.

@nickImbirev
Copy link
Contributor Author

@nickImbirev I don't see the tree refreshing and removing the deleted job(s) after confirmation. I have to right click the session and select refresh for the deleted jobs to be removed from the tree.

Hey @JillieBeanSim ! Thank you for the review!

Yeah, I can see, that such behaviour is possible, I do not think, it is somehow related to my changes, it is just because sometimes refresh action become fulfilled faster, than something was deleted in the backend (in Jes in this particular case). That's why sometimes you have deleted jobs in the treeView, but they will go away after the addition refresh.

But I saw such a behaviour even with the previous implementation. I think, previous behaviour to refresh everything after deletion was slower, so backend could be updated with the higher probability.

If we want to fix it completely - we need to fix it in the Zowe SDK or even in the Zosmf backend part, because we are just consuming their APIs.

I asked @jellypuno to test it as well, just to make sure, this behaviour is not operating system dependent.

Does it make sense?

@jellypuno
Copy link
Contributor

jellypuno commented Oct 21, 2021

@JillieBeanSim @nickImbirev This works for me. The profilesCache are not reset. I didn't have to enter my credentials again.

deleteJob

jellypuno
jellypuno previously approved these changes Oct 21, 2021
Copy link
Contributor

@jellypuno jellypuno left a comment

Choose a reason for hiding this comment

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

lgtm!

@JillieBeanSim
Copy link
Contributor

@jellypuno @nickImbirev this is what I am seeing testing this. Errors pop up if deleted when opened by clicking the job id link plus what I mentioned above. I will also test against main to see if any of it is pre-existing (I don't remember seeing this issue) or if it's a regression
job-deletion

@nickImbirev
Copy link
Contributor Author

@jellypuno @nickImbirev this is what I am seeing testing this. Errors pop up if deleted when opened by clicking the job id link plus what I mentioned above. I will also test against main to see if any of it is pre-existing (I don't remember seeing this issue) or if it's a regression

This is quite interesting, I cannot reproduce such an error on my local environment. But I can see, that the refresh sometimes may return already deleted job (apparently, the deletion was not completed on Zosmf side for some reason).

I can investigate this more, but honestly, I do not know where to dig, because we are consuming Zowe SDK API directly in our refresh and delete commands... I think, we have no such a behaviour before, because we refreshed everything during the deletion, so it took time for user to click on the node after it and the changes were synced in Zosmf side.

@JillieBeanSim what do you think about the possible solution to refresh everything in job treeView (like it was before), but keeping user's unsaved credentials? In that case, we can say that in 99% of cases, removed jobs will not be part of the tree, but users will have to reopen their sessions again manually.

@JillieBeanSim
Copy link
Contributor

JillieBeanSim commented Oct 21, 2021

@nickImbirev if you can refresh the whole tree and keep the credentials for the profiles without, that would be preferable to these regressions that I didn't see on master branch when retesting the scenario. That would fix the issue at hand and we could create a new issue to figure out how to refresh the tree without closing it at another time

@lauren-li
Copy link
Contributor

what do you think about the possible solution to refresh everything in job treeView (like it was before), but keeping user's unsaved credentials?

@nickImbirev I know this question wasn't for me, but after trying out this PR, I agree with your proposed approach here, as well. This way, it is just an improvement over the current release, without introducing new problems for end-users. As @JillieBeanSim suggested, we can use a separate issue to continue researching how to properly update/display the tree upon job deletion.

@nickImbirev nickImbirev removed this from the 1.20.0 Release milestone Oct 22, 2021
@nickImbirev
Copy link
Contributor Author

I will update the approach slightly to follow @JillieBeanSim and @lauren-li suggestions

@nickImbirev nickImbirev added bug Something isn't working and removed in progress labels Nov 16, 2021
@nickImbirev nickImbirev changed the title [Issue #1449] Change removeJob command to refresh required sessions only [Issue #1449] Update removeJob command to refresh the profiles cache separately from refreshing a tree Nov 16, 2021
Signed-off-by: Nikolai Imbirev <nikolay.imbirev@broadcom.com>
@jellypuno jellypuno self-requested a review November 23, 2021 16:04
jellypuno
jellypuno previously approved these changes Nov 23, 2021
Copy link
Contributor

@jellypuno jellypuno left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks @nickImbirev

Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.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.

LGTM! thanks @nickImbirev for the fix

I do see some broken integration tests but also on Master branch. Created issue for that
#1595

I also see some files show up in Source Control that deal with the new FTP unit tests that should be ignored. Created issue for that too
#1594

@jellypuno jellypuno merged commit bc6001c into master Nov 29, 2021
@jellypuno jellypuno deleted the fix-job-deletion-command-refreshing branch November 29, 2021 14:35
@crawr crawr added this to the 1.21.0 milestone Nov 30, 2021
@lauren-li lauren-li mentioned this pull request Dec 7, 2021
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deletion of Job removes cached credentials for profile used if not saved in profile
5 participants