Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Support both v2.x and v1.x of mainline pachyderm #282

Open
albscui opened this issue May 27, 2021 · 0 comments
Open

Support both v2.x and v1.x of mainline pachyderm #282

albscui opened this issue May 27, 2021 · 0 comments

Comments

@albscui
Copy link

albscui commented May 27, 2021

We want python-pachyderm to support both v2.x and v1.x of mainline pachyderm, and in general, we want to support one backward version in addition to the most current version of mainline pachyderm, so vX.y and vX-1.y. This would give us the ability to release API breaking changes to python-pachyderm without locking major versions of python-pachyderm to major versions of mainline pachyderm.

To achieve this goal, we need the following:

  • ability to generate proto library code for both versions
  • separate execution paths to use different versions

One possibility to specify API version could involve something like:

import python_pachyderm as pach

client = pach.Client(api_version="2")

Behind the scenes, we would separate the two versions using different directories:

src/python_pachyderm/proto/v1
src/python_pachyderm/proto/v2

In the future, we could package up the protos as a separate Python package deployed on PyPI, and remove the generated code from this repo.

NOTE:

  • After some experimentation, it seems like we can import one version of the protos but not both at the same time. This should be acceptable behavior given that we do not expect the users to be interacting with multiple pachyderm clusters via the same python instance. However, if this is a false assumption, then we need to re-visit this design.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant