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

[Client][API] get control plane version #2874

Merged
merged 4 commits into from
Nov 5, 2024

Conversation

Future-Outlier
Copy link
Member

@Future-Outlier Future-Outlier commented Oct 29, 2024

Tracking issue

flyteorg/flyte#5318

Why are the changes needed?

provide version api for users.

What changes were proposed in this pull request?

add a method get_control_plane_version in class SynchronousFlyteClient(_RawSynchronousFlyteClient).

How was this patch tested?

local and integration test.

Setup process

from flytekit.configuration import PlatformConfig
from flytekit.clients.friendly import SynchronousFlyteClient as _SynchronousFlyteClient
config = PlatformConfig(endpoint="localhost:30080", insecure=True)
client = _SynchronousFlyteClient(config)
print("Control Plane Version:", client.get_control_plane_version())

Screenshots

Unknown version
image

Know Version
image

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

@Future-Outlier Future-Outlier changed the title Gate feature(msgpack IDL) by checking backend version [WIP] Gate feature(msgpack IDL) by checking backend version Oct 29, 2024
@Future-Outlier Future-Outlier changed the title [WIP] Gate feature(msgpack IDL) by checking backend version [API] Get Control Plane Version Oct 30, 2024
@Future-Outlier Future-Outlier changed the title [API] Get Control Plane Version [Client API] Get Control Plane Version Oct 30, 2024
@@ -1087,3 +1088,7 @@ def get_download_artifact_signed_url(
expires_in=expires_in_pb,
)
)

def get_control_plane_version(self) -> str:
Copy link
Member

Choose a reason for hiding this comment

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

could we add some comments for it

Copy link
Member Author

Choose a reason for hiding this comment

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

yes of course thank you!

Signed-off-by: Future-Outlier <[email protected]>
@Future-Outlier Future-Outlier enabled auto-merge (squash) October 31, 2024 02:26
@Future-Outlier Future-Outlier merged commit 4bef161 into master Nov 5, 2024
102 checks passed
@Future-Outlier Future-Outlier changed the title [Client API] Get Control Plane Version [flyteadmin][API] get control plane version Nov 5, 2024
@Future-Outlier Future-Outlier changed the title [flyteadmin][API] get control plane version [Client][API] get control plane version Nov 5, 2024
kumare3 pushed a commit that referenced this pull request Nov 8, 2024
* Gate feature by checking backend version

Signed-off-by: Future-Outlier <[email protected]>

* put context in comments or in serialization settings

Signed-off-by: Future-Outlier <[email protected]>

* get control plane version and add integration tests

Signed-off-by: Future-Outlier <[email protected]>

* Update Kevin's advice

Signed-off-by: Future-Outlier <[email protected]>

---------

Signed-off-by: Future-Outlier <[email protected]>
katrogan pushed a commit that referenced this pull request Nov 15, 2024
* Gate feature by checking backend version

Signed-off-by: Future-Outlier <[email protected]>

* put context in comments or in serialization settings

Signed-off-by: Future-Outlier <[email protected]>

* get control plane version and add integration tests

Signed-off-by: Future-Outlier <[email protected]>

* Update Kevin's advice

Signed-off-by: Future-Outlier <[email protected]>

---------

Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Katrina Rogan <[email protected]>
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.

2 participants