-
Notifications
You must be signed in to change notification settings - Fork 313
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
Add IT tests to test installation according to docs #1193
Conversation
As a followup to elastic#1185 this commit adds a few IT tests to validate the Rally installation steps in the docs. We also remove hardcoded Python versions from the installation section of docs instead relying on a checked-in variable to ease maintainance in the future.
The CI build has failed with:
I think we need to add:
in the |
Hm
Hm I think something else is wrong as actually I don't have 3.8.7 in my local pyenv's and still it's working fine. Will investigate
|
I pushed e008198 so that standard |
@danielmitterdorfer I refactored as per our offline discussion in 3374548 to not introduce a new |
also fix prereq bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I left a couple of suggestions.
it/__init__.py
Outdated
return os.system(command_line) | ||
|
||
|
||
def command_in_docker(command_line, python_version="3.8.7"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should not have a default argument here so we always need to specify a version explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
it/installation_test.py
Outdated
import it | ||
|
||
_CI_VARS = ".ci/variables.json" | ||
_FALLBACK_MIN_PY_VER = "3.8.7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also be 3.8.8? Should we read this from _CI_VARS
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, this is what we did before this refactoring in 3374548#diff-c0d0ee48d5c24db80722a8fef4cb274fea04db4fb2cd8c4147697758de4e9192L31-L38, will bring this back.
Makefile
Outdated
@@ -21,8 +21,8 @@ PYENV_REGEX = .pyenv/shims | |||
PY_BIN = python3 | |||
# https://github.com/pypa/pip/issues/5599 | |||
PIP_WRAPPER = $(PY_BIN) -m pip | |||
PY38 = $(shell jq '.python_versions.PY38' .ci/variables.json) | |||
PY39 = $(shell jq '.python_versions.PY39' .ci/variables.json) | |||
export MIN_PY_VER = $(shell jq -r '.python_versions.PY38' .ci/variables.json) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just alias this? i.e. something like:
export PY38 = $(shell jq -r '.python_versions.PY38' .ci/variables.json)
export MIN_PY_VER = $(PY38)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can; what is the purpose if we won't be using PY38
though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea behind this is that we derive the version variables always consistently. We should use the variable PY38
though when installing Python versions in make install
. MIN_PY_VER
can be used anywhere where we don't need to refer to a specific version but we want to convey the intent that we're looking for the minimum supported one.
CI failed specifically with |
Hm another CI failure this time with
but it's not reproducible locally with exactly the same @elasticmachine please test this |
@elasticmachine test this please |
@danielmitterdorfer CI is green (at last!) could you take another pass when you have time? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great that we have a test for this now. Thanks for iterating. LGTM
@danielmitterdorfer thanks a lot for the review! |
PR elastic#1193 introduced a bug with readthedocs.org in relying on presenting the MIN_PY_VER env var via the Makefile. However the Makefile isn't invoked during automated build of readthedocs. This commit fixes automatic builds of our docs again.
PR #1193 introduced a bug with readthedocs.org in relying on presenting the MIN_PY_VER env var via the Makefile. However the Makefile isn't invoked during automated build of readthedocs. This commit fixes automatic builds of our docs again.
As a followup to #1185 this commit adds a few IT tests to validate the
Rally installation steps in the docs.