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

Mapping of extensions to repository paths in DevHome core #3230

Conversation

ssparach
Copy link
Contributor

@ssparach ssparach commented Jun 13, 2024

Summary of the pull request

This PR contains code changes for a root path to be validated in association with a given source control provider on Dev Home to be mapped accordingly. The CLSID for the extension point is used to map to the persisted registered repository root paths. The CLSID is chosen as it is compatible with both packaged and unpackaged extensions, this value is not recycled by unrelated applications and is explicitly defined.

**Note: The UI in this PR is subject to change **

References and relevant issues

Detailed description of the pull request / Additional comments

  • Declare git extension as an app extension for Dev Home
  • Find all extensions in Dev Home that support source control integration
    Note: This currently finds and binds the extension name to the UI. Per design, this is subject to change i.e. Dev Home may become responsible for recognizing the right extension and automatically mapping.
  • Validate if a given repository root path is valid for a source control extension before registration i.e. before mapping the source control provider to the root path
  • Find the activation guid (instead of hardcoded value) to activate and return ILocalRepositoryProvider from mapping done during add/register
  • Add validation for repository path in git extension
  • Searching inside 'repository store' is case insensitive

Validation steps performed

Build release msix
Run added unit tests
Test functionality of msix package on a VM

PR checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated

@ssparach ssparach marked this pull request as ready for review June 13, 2024 23:08
@ssparach ssparach force-pushed the user/ssparach/extensionMapping branch from 802f3d5 to 408ba52 Compare June 27, 2024 23:23
@ssparach ssparach force-pushed the user/ssparach/extensionMapping branch from 408ba52 to c3743ec Compare June 28, 2024 19:50
Copy link
Member

@DefaultRyan DefaultRyan left a comment

Choose a reason for hiding this comment

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

There are still some open comments from Darren as well.

@ssparach ssparach merged commit 20cb0f8 into feature/fileexplorer-sourcecontrol-integration Jul 10, 2024
4 checks passed
{
var lastTimeModified = System.IO.File.GetLastWriteTime(Path.Combine(RepoStoreOptions.RepoStoreFolderPath, RepoStoreOptions.RepoStoreFileName));
log.Information("Last Time Modified: {0}", lastTimeModified);
if (DateTime.Compare(LastRestore, lastTimeModified) < 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider changing both LastRestore and lastTimemodified to UTCtime for comparison. This can fail during daylight savings time.

A specific edge case, but can still happen.

ssparach added a commit that referenced this pull request Jul 31, 2024
* declare appextension for git, find all source control extensions, UI changes, SDK changes, get extension information to use for mapping

* changes to map extension to registered root paths, add validation to git implementation

* changes after testing

* use serilog in validation code

* reorder using

* use published SDK version

* address PR feedback

* address PR feedback

* address PR feedback

* Minor cleanup of RepositoryTracking.cs

---------

Co-authored-by: Ryan Shepherd <ryansh@microsoft.com>
ssparach added a commit that referenced this pull request Jul 31, 2024
* declare appextension for git, find all source control extensions, UI changes, SDK changes, get extension information to use for mapping

* changes to map extension to registered root paths, add validation to git implementation

* changes after testing

* use serilog in validation code

* reorder using

* use published SDK version

* address PR feedback

* address PR feedback

* address PR feedback

* Minor cleanup of RepositoryTracking.cs

---------

Co-authored-by: Ryan Shepherd <ryansh@microsoft.com>
ssparach added a commit that referenced this pull request Jul 31, 2024
* declare appextension for git, find all source control extensions, UI changes, SDK changes, get extension information to use for mapping

* changes to map extension to registered root paths, add validation to git implementation

* changes after testing

* use serilog in validation code

* reorder using

* use published SDK version

* address PR feedback

* address PR feedback

* address PR feedback

* Minor cleanup of RepositoryTracking.cs

---------

Co-authored-by: Ryan Shepherd <ryansh@microsoft.com>
ssparach added a commit that referenced this pull request Aug 1, 2024
* declare appextension for git, find all source control extensions, UI changes, SDK changes, get extension information to use for mapping

* changes to map extension to registered root paths, add validation to git implementation

* changes after testing

* use serilog in validation code

* reorder using

* use published SDK version

* address PR feedback

* address PR feedback

* address PR feedback

* Minor cleanup of RepositoryTracking.cs

---------

Co-authored-by: Ryan Shepherd <ryansh@microsoft.com>
ssparach added a commit that referenced this pull request Aug 2, 2024
* reset branch to 548d868

* Revert "reset branch to 548d868"

This reverts commit f30055f.

* Merged PR 10695071: Move to feature branch in preparation for GitHub

**Summary of the pull request**
This PR contains implementation changes for the File Explorer Source Control Integration experimental feature. This feature will allow File Explorer to obtain property information from source control technologies for display (image attached below):

**Detailed description of the pull request / Additional comments**
This PR contains the following changes:
- Reference official Dev Home SDK version (that defines APIs for File Explorer Source Control Integration)
- Declare FileExplorerSourceControlIntegration as an experimental feature
- The FileExplorerSourceControlIntegration project which creates a COM Server used to communicate information with File Explorer
- The FileExplorerGitIntegration project which allows Dev Home to come with an inbox extension that understands git
- Basic Unit Tests

**Validation steps performed**
SDK and MSIX local builds
Tested Git Integration File Explorer behavior inside VM

Related work items: #48431506

* Mapping of extensions to repository paths in DevHome core (#3230)

* declare appextension for git, find all source control extensions, UI changes, SDK changes, get extension information to use for mapping

* changes to map extension to registered root paths, add validation to git implementation

* changes after testing

* use serilog in validation code

* reorder using

* use published SDK version

* address PR feedback

* address PR feedback

* address PR feedback

* Minor cleanup of RepositoryTracking.cs

---------

Co-authored-by: Ryan Shepherd <ryansh@microsoft.com>

* save state

* save state

* save state

* save state

* save state

* implement button actions

* changes

* address PR feedback

* address PR feedback

* rebased user branch, made fixes, validated functionality on VM

* cleanup UI changes, tested on VM

* fix proj references to match dev home feed and unblock PR pipeline

---------

Co-authored-by: Ryan Shepherd <ryansh@microsoft.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.

3 participants