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

Get version using restAPI #2242

Open
wants to merge 9 commits into
base: feature_branch/remove-experiment-tracking
Choose a base branch
from

Conversation

Huongg
Copy link
Contributor

@Huongg Huongg commented Jan 16, 2025

Description

Fixes #2221 , in order to remove graphql completely, we need to update the part of get version to restAPI.

I'm currently looking at strange failed test https://github.com/kedro-org/kedro-viz/actions/runs/12827700845/job/35770224311?pr=2242, if you have any idea why this has failed please let me know. Otherwise feel free to review the rest of the PR

QA notes

If you pull the branch and restart the build, everything should work fine. You can also log the response in checkKedroVizVersion() written inside wrapper.js. It should log 3 values is_outdated, installed, and latest

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added new entries to the RELEASE.md file
  • Added tests to cover my changes

Signed-off-by: Huong Nguyen <[email protected]>
def get_version_response():
"""API response for `/api/version`."""
installed_version = __version__
latest_version = "0.5.0" # how do i check the latest version?
Copy link
Contributor

Choose a reason for hiding this comment

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

from kedro_viz.integrations.pypi import get_latest_version, is_running_outdated_version

Copy link
Contributor

Choose a reason for hiding this comment

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

use the same logic as we do in graphql

latest_version = get_latest_version()
is_outdated=is_running_outdated_version(installed_version, latest_version),

Huong Nguyen added 8 commits January 17, 2025 16:13
Signed-off-by: Huong Nguyen <[email protected]>
Signed-off-by: Huong Nguyen <[email protected]>
Signed-off-by: Huong Nguyen <[email protected]>
Signed-off-by: Huong Nguyen <[email protected]>
Signed-off-by: Huong Nguyen <[email protected]>
Signed-off-by: Huong Nguyen <[email protected]>
Signed-off-by: Huong Nguyen <[email protected]>
@Huongg Huongg marked this pull request as ready for review January 17, 2025 11:57
@Huongg Huongg requested a review from SajidAlamQB January 17, 2025 11:58
@Huongg Huongg changed the title [WIP] - get version using restAPI Get version using restAPI Jan 17, 2025
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