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

fix glooctl install: Replace deprecated distutils #10583

Merged
merged 7 commits into from
Jan 29, 2025

Conversation

puertomontt
Copy link

@puertomontt puertomontt commented Jan 27, 2025

Description

distutils package used in glooctl install script is deprecated. Currently trying to install will give an error:

curl -sL https://run.solo.io/gloo/install | sh
Using /opt/homebrew/bin/python3
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import sys; from distutils.version import StrictVersion, LooseVersion; from json import loads as l; releases = l(sys.stdin.read()); releases = [release['tag_name'] for release in releases];  filtered_releases = list(filter(lambda release_string: len(release_string) > 0 and StrictVersion.version_re.match(release_string[1:]) != None and StrictVersion(release_string[1:]) < StrictVersion('2.0.0') , releases)); filtered_releases.sort(key=LooseVersion, reverse=True); print('\n'.join(filtered_releases))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'distutils'

The replacement package recommended by Python is not installed by default. So we decided to drop the dependency on python and use jq instead.

API changes

Code changes

CI changes

Docs changes

Context

Interesting decisions

Testing steps

run the install script and verify latest non-beta version is installed
projects/gloo/cli/install.sh

Notes for reviewers

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@puertomontt puertomontt changed the title Puertomontt/glooctl install fix glooctl install: Replace deprecated distutils Jan 27, 2025
Copy link

Visit the preview URL for this PR (updated for commit 47c0eea):

https://gloo-edge--pr10583-puertomontt-glooctl-17hyq9cj.web.app

(expires Mon, 03 Feb 2025 17:35:38 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 77c2b86e287749579b7ff9cadb81e099042ef677

Co-authored-by: ashish b <[email protected]>
@soloio-bulldozer soloio-bulldozer bot merged commit 3b63ca6 into main Jan 29, 2025
19 checks passed
@soloio-bulldozer soloio-bulldozer bot deleted the puertomontt/glooctl-install branch January 29, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants