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

Fix account refresh issue + enable extHostTreeView tests #25044

Merged
merged 6 commits into from
Nov 29, 2023

Conversation

cheenamalhotra
Copy link
Member

@cheenamalhotra cheenamalhotra commented Nov 24, 2023

Fixes #24994

Noticed an issue with extHostTreeViews (vs), where refresh intends to clear children, but because child nodes are not registered in cached parent node, they don't clear and we face the issue above.

For more details: PR microsoft/vscode#199061 addresses the same in VS Code.

Before:
refresh-issue

After:
refresh-fixed

@coveralls
Copy link

coveralls commented Nov 24, 2023

Pull Request Test Coverage Report for Build 7013341802

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 3 of 7 (42.86%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage remained the same at 41.566%

Changes Missing Coverage Covered Lines Changed/Added Lines %
extensions/azurecore/src/azureResource/tree/connectionDialogTreeProvider.ts 0 2 0.0%
extensions/azurecore/src/azureResource/tree/treeProvider.ts 3 5 60.0%
Files with Coverage Reduction New Missed Lines %
extensions/notebook/src/dialog/configurePython/configurePythonWizard.ts 1 46.46%
Totals Coverage Status
Change from base Build 6983798953: 0.0%
Covered Lines: 30792
Relevant Lines: 69378

💛 - Coveralls

Copy link
Contributor

@Charles-Gagnon Charles-Gagnon left a comment

Choose a reason for hiding this comment

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

How about a test as well? The VS Code people would probably like that too

src/vs/workbench/api/common/extHostTreeViews.ts Outdated Show resolved Hide resolved
src/vs/workbench/api/common/extHostTreeViews.ts Outdated Show resolved Hide resolved
src/vs/workbench/api/common/extHostTreeViews.ts Outdated Show resolved Hide resolved
@cheenamalhotra
Copy link
Member Author

cheenamalhotra commented Nov 28, 2023

How about a test as well? The VS Code people would probably like that too

I did attempt that, and noticed I had to expose new APIs or internal objects to test the same. We can reproduce the issue in tests, and see that cache doesn't contain the reference to child nodes, but to expose cache from public API seemed a little too much, so I didn't go for it.

@Charles-Gagnon
Copy link
Contributor

We can reproduce the issue in tests - can you make the tests fail when that happens? Having something that checks to make sure this doesn't regress would be great so we don't have to worry about it going forward.

@cheenamalhotra cheenamalhotra merged commit 5fbfe7e into main Nov 29, 2023
12 checks passed
@cheenamalhotra cheenamalhotra deleted the cheena/fix-account-refresh branch November 29, 2023 02:32
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.

Refreshing account in Azure tree leads to error
3 participants