DavidIsaacBPS commented on PR #8313:
URL: https://github.com/apache/opendal/pull/8313#issuecomment-6865868898

   >> Why does "Add is safer than Modify"? Can you elaborate?
   
   I mean that adding SharePoint as a separate service introduces less 
technical risk than modifying the existing OneDrive service to handle 
SharePoint.  The current implementation is an *addition* of a new service, and 
makes no *modification* to existing services/OneDrive.  So there's no chance of 
breaking the existing service.  
   
   SharePoint and OneDrive are completely different services (gotta love 
Microsoft), particularly when it comes to file identification and security.  
Integrating SharePoint into the existing OneDrive service will result in 
changes to *every* OneDrive source code file.  
   
   >> "It can be merged now if you have a higher risk tolerance... I don't 
understand this.
   
   I can integrate SharePoint into the OneDrive service...just say the word.  
But I wouldn't recommend it.  *Every* OneDrive source code file will change and 
some of those may be breaking/non-backward-compatible changes.  I would not 
want to do this unless you have facilities to rigorously regression test the 
new OneDrive implementation.   
   
   Here is a summary of the SharePoint changes that would impact the OneDrive 
implementation if we were to integrate them:
   
   Area | OneDrive | SharePoint | Impact on OneDrive if merged
   -- | -- | -- | --
   Base URL | Hard-coded .../me/drive/root (core.rs:56), built synchronously | 
folder_url is resolved once through /shares/u!<b64>/driveItem into a drive id 
and item id, then addressed as /drives/{id}/items/{id}:/path | The URL builder 
becomes async. Every core method that builds a URL changes signature, and 
reader, writer, lister and deleter follow.
   Config | root, tokens, client_id/client_secret, deprecated enable_versioning 
| Adds folder_url and tenant_id, and from_uri builds the URL from 
sharepoint://host/path | OnedriveConfig gains two fields, which is non-breaking 
because it is #[non_exhaustive]. from_uri currently reads the URI path as root, 
so a SharePoint URI form needs a way to tell the two apart.
   OAuth | Fixed /common/ endpoint, scope Files.ReadWrite | Endpoint uses 
tenant_id, scope Sites.ReadWrite.All | Endpoint and scope must depend on mode. 
The personal-OneDrive request has to stay identical, or existing refresh tokens 
could break.
   Capabilities | Declares if_none_match, if_match, stat_with_version and 
list_with_versions | Deliberately leaves those out (library metadata can change 
eTag, version support depends on library settings) | The capability set has to 
be built per mode so OneDrive doesn't lose any.
   Lister paths | Derives entry paths from parentReference.path minus 
/drive/root: | Uses the listed directory as the prefix, because that path isn't 
relative to the anchor folder | Unifying on SharePoint's approach changes a 
working OneDrive code path.
   Graph model | e_tag and parentReference.path/id are required | They are 
Option, plus an anchor item type | Using the tolerant model touches OneDrive's 
etag handling in the writer, stat and lister.
   Cargo | — | Adds base64, plus dev dependencies | base64 becomes a OneDrive 
dependency, and the connection_check example moves or merges.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to