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

[BUG] - Recent release super broken #1325

Closed
tylerpotts opened this issue Jun 14, 2022 · 4 comments
Closed

[BUG] - Recent release super broken #1325

tylerpotts opened this issue Jun 14, 2022 · 4 comments
Labels
type: bug 🐛 Something isn't working

Comments

@tylerpotts
Copy link
Contributor

tylerpotts commented Jun 14, 2022

OS system and architecture in which you are running QHub

linux-64

Expected behavior

Pip/conda installing qhub v0.4.2 won't actually install the v0.4.2 source code

How to Reproduce the problem?

Run the following and cry inside:

wget https://github.com/Quansight/qhub/archive/refs/tags/v0.4.2.tar.gz
mv v0.4.2.tar.gz git_asset_v0.4.2.tar.gz
wget https://pypi.io/packages/source/qhub/qhub/qhub-0.4.2.tar.gz
mv v0.4.2.tar.gz pip_qhub-0.4.2.tar.gz 


sha256sum git_asset_v0.4.2.tar.gz 
9e0684816bffa88b8f76e8da7e23f51ba08311dbc6c7472bd0d9719efcc26e10  git_asset_v0.4.2.tar.gz

sha256sum pip_qhub-0.4.2.tar.gz 
41fc1bf55801b622c17fc9ca98fe2a593a6fd3b1b7fb6ea5b075e1a24c6c5580  pip_qhub-0.4.2.tar.gz

The code that got uploaded to pip is not actually the v0.4.2 release of the code. This consequently also pushed bad code to conda-forge as well, since the meta.yaml in the recipe pulls from pip.

I validated this by peaking into the source code that came from pip, and sure enough the kbatch validation code was absent from schema.py

Anything else?

What an insanity inducing bug 🤯

I discovered this because pedantic was throwing a validation error on:

kbatch:
    enabled: false
$ qhub deploy -c qhub-config.yaml --disable-prompt
Error: The schema validation of the qhub-config.yaml failed. The following error message may be helpful in determining what 
went wrong:

1 validation error for Main
kbatch
  extra fields not permitted (type=value_error.extra)

Yet the codebase clearly showed that kbatch was an allowed value. Little did I know that I wasn't actually using the latest version of the codebase.

It goes without saying that we need to do another minor release properly packaging the code.

@tylerpotts tylerpotts added the type: bug 🐛 Something isn't working label Jun 14, 2022
@tylerpotts
Copy link
Contributor Author

cc @costrouc @iameskild @viniciusdc

@aktech
Copy link
Member

aktech commented Jun 14, 2022

I don't think kbatch is released in 0.4.2. It's part of Future planning. We don't even have the documentation ready for kbatch either: #1322

The hash don't match due to the presence of PKG-INFO file in PyPi release and following diff in the setup.cfg (It's just an extra white space after =):

diff --git a/setup.cfg b/setup.cfg
index b98c9ea..a59e4f3 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,54 +7,54 @@ long_description = file: README.md
 long_description_content_type = text/markdown
 keywords = aws, gcp, do, azure, qhub
 license = BSD 3-Clause License
-classifiers =
-    Development Status :: 3 - Alpha
-    Intended Audience :: Developers
-    Topic :: Software Development :: Build Tools
-    Programming Language :: Python :: 3
-    Programming Language :: Python :: 3.7
-    Programming Language :: Python :: 3.8
-    Programming Language :: Python :: 3.9
-project_urls =
-    Bug Reports = https://github.com/quansight/qhub/issues
-    Source = https://github.com/quansight/qhub
+classifiers = 
+	Development Status :: 3 - Alpha
+	Intended Audience :: Developers
+	Topic :: Software Development :: Build Tools
+	Programming Language :: Python :: 3
+	Programming Language :: Python :: 3.7
+	Programming Language :: Python :: 3.8
+	Programming Language :: Python :: 3.9
+project_urls = 
+	Bug Reports = https://github.com/quansight/qhub/issues
+	Source = https://github.com/quansight/qhub
 
 [options]
 zip_safe = False
 include_package_data = True
 packages = qhub
-install_requires =
-    ruamel.yaml
-    cloudflare
-    auth0-python
-    pydantic
-    pynacl
-    bcrypt
-    kubernetes
-    azure-identity==1.6.1
-    azure-mgmt-containerservice==16.2.0
-    boto3
-    python-keycloak
-    importlib_metadata;python_version<"3.8"
+install_requires = 
+	ruamel.yaml
+	cloudflare
+	auth0-python
+	pydantic
+	pynacl
+	bcrypt
+	kubernetes
+	azure-identity==1.6.1
+	azure-mgmt-containerservice==16.2.0
+	boto3
+	python-keycloak
+	importlib_metadata;python_version<"3.8"
 
 [options.extras_require]
-dev =
-    flake8==3.8.4
-    black==22.3.0
-    twine
-    pytest
-    pytest-timeout
-    diagrams
-    jhub-client
-    pre-commit
-    kubernetes
-    dask-gateway
-    paramiko
-    escapism
+dev = 
+	flake8==3.8.4
+	black==22.3.0
+	twine
+	pytest
+	pytest-timeout
+	diagrams
+	jhub-client
+	pre-commit
+	kubernetes
+	dask-gateway
+	paramiko
+	escapism
 
 [options.entry_points]
-console_scripts =
-    qhub = qhub.__main__:main
+console_scripts = 
+	qhub = qhub.__main__:main
 
 [tool:pytest]
 norecursedirs = _build .nox .ipynb_checkpoints
@@ -63,17 +63,22 @@ norecursedirs = _build .nox .ipynb_checkpoints
 ignore = E203, E266, E501, W503
 max-line-length = 89
 builtins = c
-exclude =
-  .git,
-  __pycache__
-  docs/source/conf.py
-  qhub/template
-  build
-  dist
-  docs
-  home
+exclude = 
+	.git,
+	__pycache__
+	docs/source/conf.py
+	qhub/template
+	build
+	dist
+	docs
+	home
 
 [options.packages.find]
-exclude =
-    tests
-    tests_deployment
+exclude = 
+	tests
+	tests_deployment
+
+[egg_info]
+tag_build = 
+tag_date = 0
+

@tylerpotts
Copy link
Contributor Author

@aktech ah. Thanks for the clarification.

This looks like a PEBCAK error. The latest commit message on the release was Update RELEASE.md , which matched the latest commit message in main. I assumed the 0.4.2 release was coming from that latest commit in main, so I pip installed from main locally in case I had to manually make any changes. Little did I know that I was pip installing work that wasn't intended for release yet (IE #1258)

...sooooo nvm then. Thanks again

@iameskild
Copy link
Member

iameskild commented Jun 14, 2022

@tylerpotts sorry for the confusion, we cherry-picked a few of the critical commits and cut a release. kbatch and argo will be available in a forthcoming release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants