opendal icon indicating copy to clipboard operation
opendal copied to clipboard

idea: Move root out of backend to operator instead

Open Xuanwo opened this issue 1 year ago • 3 comments

Every services need to handle root, which most of the time is duplicated. Maybe we can move root of backend and handling at operato level?

Benefits:

  • Operator can implement something like cd/change_root so users don't need to build a new one.
  • Services don't need to handle root logic again and again.

Most services should work smoothly, but we need to handle Windows paths carefully, as they will require a format like C:\\path\\to\\data.

Xuanwo avatar Jun 20 '24 02:06 Xuanwo

IMO it is better to build an absolute path at the operator level and pass it to the service backends. It delivers a clear path which may reduce path-related bugs when implementing a backend.

yuchanns avatar Jun 20 '24 03:06 yuchanns

IMO it is better to build an absolute path at the operator level and pass it to the service backends. It delivers a clear path which may reduce path-related bugs when implementing a backend.

That's exactly what this idea want to address

Xuanwo avatar Jun 20 '24 04:06 Xuanwo

We will need an RFC to start working on this. It will introduce significant breaking changes for our users, as most of them are familiar with the pattern that sets the root during configuration.

Xuanwo avatar Aug 24 '24 13:08 Xuanwo

Not interested anymore.

Xuanwo avatar Mar 11 '25 08:03 Xuanwo