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

Gracefully handle virtual /Repos/me folder #693

Merged
merged 3 commits into from
May 9, 2023

Conversation

kartikgupta-db
Copy link
Contributor

@kartikgupta-db kartikgupta-db commented May 8, 2023

Changes

The extension tries to find the root folder (/Repos/me or /Users/me/.ide) depending on what the sync destination type is (repos or workspace). The current root is stored in currentFsRoot. In case it fails in finding the currentFsRoot (/Repos/me and /Users/me can be virtual when a user hasn't interacted with these folders yet), it always tries to create it under /User/me. This can be an issue if currentFsRoot points to /Repos/me.

  • This PR fixes this behaviour, by only allowing creation of workspaceFsRoot (which always points to /Users/me/.ide) under /User/me and not currentFsRoot.
  • Also fix error reporting to show more verbose errors.

Creating a repo from the extension automatically handles generation of /Repos/me folder as well.

Fixes #683 #691 #688

Tests

  • Manually verified to work after the change.

@kartikgupta-db kartikgupta-db requested a review from fjakobs May 8, 2023 06:46
@kartikgupta-db kartikgupta-db temporarily deployed to azure-prod-usr May 8, 2023 06:46 — with GitHub Actions Inactive
@kartikgupta-db kartikgupta-db temporarily deployed to azure-prod-usr May 8, 2023 06:46 — with GitHub Actions Inactive
@kartikgupta-db kartikgupta-db temporarily deployed to azure-prod-usr May 8, 2023 06:46 — with GitHub Actions Inactive
@kartikgupta-db kartikgupta-db temporarily deployed to azure-prod-usr May 8, 2023 06:46 — with GitHub Actions Inactive
@kartikgupta-db kartikgupta-db temporarily deployed to azure-prod-usr May 8, 2023 06:46 — with GitHub Actions Inactive
@kartikgupta-db kartikgupta-db temporarily deployed to azure-prod-usr May 8, 2023 06:46 — with GitHub Actions Inactive
@kartikgupta-db kartikgupta-db temporarily deployed to azure-prod-usr May 8, 2023 06:46 — with GitHub Actions Inactive
@kartikgupta-db kartikgupta-db temporarily deployed to azure-prod-usr May 8, 2023 06:46 — with GitHub Actions Inactive
@codecov-commenter
Copy link

codecov-commenter commented May 8, 2023

Codecov Report

Merging #693 (50c1acf) into main (178d69a) will increase coverage by 0.19%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #693      +/-   ##
==========================================
+ Coverage   82.51%   82.71%   +0.19%     
==========================================
  Files          41       41              
  Lines        1510     1510              
  Branches      297      297              
==========================================
+ Hits         1246     1249       +3     
+ Misses        264      261       -3     
Flag Coverage Δ
integration 66.15% <ø> (+1.39%) ⬆️
unit 62.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
js-sdk 82.71% <ø> (+0.19%) ⬆️

@fjakobs fjakobs temporarily deployed to azure-prod-usr May 9, 2023 10:08 — with GitHub Actions Inactive
@fjakobs fjakobs temporarily deployed to azure-prod-usr May 9, 2023 10:08 — with GitHub Actions Inactive
@fjakobs fjakobs temporarily deployed to azure-prod-usr May 9, 2023 10:08 — with GitHub Actions Inactive
@fjakobs fjakobs temporarily deployed to azure-prod-usr May 9, 2023 10:08 — with GitHub Actions Inactive
@fjakobs fjakobs temporarily deployed to azure-prod-usr May 9, 2023 10:08 — with GitHub Actions Inactive
@fjakobs fjakobs temporarily deployed to azure-prod-usr May 9, 2023 10:09 — with GitHub Actions Inactive
@fjakobs fjakobs temporarily deployed to azure-prod-usr May 9, 2023 10:09 — with GitHub Actions Inactive
@fjakobs fjakobs temporarily deployed to azure-prod-usr May 9, 2023 10:09 — with GitHub Actions Inactive
@kartikgupta-db kartikgupta-db merged commit b1a234f into main May 9, 2023
@kartikgupta-db kartikgupta-db deleted the handle-virtual-repo-root branch May 9, 2023 10:09
@github-actions github-actions bot mentioned this pull request May 9, 2023
fjakobs added a commit that referenced this pull request May 10, 2023
## packages/databricks-vscode
## <small>0.3.13 (2023-05-09)</small>

* Gracefully handle virtual /Repos/me folder (#693)
([b1a234f](b1a234f)),
closes
[#693](#693)
[#683](#683)
[#691](#691)
[#688](#688)
* Update telemetry connection strings (#692)
([a5a9dbd](a5a9dbd)),
closes
[#692](#692)



## packages/databricks-sdk-js
## <small>0.3.13 (2023-05-09)</small>




## packages/databricks-vscode-types
## <small>0.3.13 (2023-05-09)</small>

---------

Co-authored-by: releasebot <noreply@github.com>
Co-authored-by: Fabian Jakobs <fabian.jakobs@databricks.com>
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.

[BUG] Gracefully handle virtual /Repos/username folders
3 participants