-
Notifications
You must be signed in to change notification settings - Fork 81
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
Support disconnected environment for Pipeline SDK tests #1730
Conversation
Robot Results
|
@diegolovison just to be sure - do I understand correctly that since we're compiling the pipeline code here ourselves, this change will be still needed even once the https://issues.redhat.com/browse/RHOAIENG-6376 is fixed, correct? |
# the run_robot_test.sh is sending the --variablefile ${TEST_VARIABLES_FILE} | ||
# there is no way to double-check if a the key is presented there | ||
# the workaround is the following | ||
# https://issues.redhat.com/browse/RHOAIENG-6376 |
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 run_robot_test.sh is sending the --variablefile ${TEST_VARIABLES_FILE} | |
# there is no way to double-check if a the key is presented there | |
# the workaround is the following | |
# https://issues.redhat.com/browse/RHOAIENG-6376 | |
# The run_robot_test.sh is sending the --variablefile ${TEST_VARIABLES_FILE} | |
# which may contain the `PIP_INDEX_URL` and `PIP_TRUSTED_HOST` variables, | |
# e.g. for disconnected testing. In such case we need to pass them to the | |
# `Create Run From Pipeline Func` so that it knows when to amend the pipeline | |
# code for the https://issues.redhat.com/browse/RHOAIENG-6376 issue. |
Yes. |
# `PIP_INDEX_URL` or `PIP_TRUSTED_HOST was definied. The only way is by calling Run Keyword And Return Status | ||
# Log If it returns true, means that we are running the test in a disconnected environment. | ||
${pip_index_url_definied} Run Keyword And Return Status Log ${PIP_INDEX_URL} |
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.
that is not the only way, but there is a built-in function in RF: https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Get%20Variable%20Value
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.
It will end up in the same situation. Logging or getting will return an error if the variable doesn't exists.
The real way to solve is by checking if the variable exists and I didn't find any function.
Quality Gate passedIssues Measures |
file_content = file.read() | ||
file_content = file_content.replace( | ||
"python3 -m pip install", | ||
f"python3 -m pip install --index-url {pip_index_url} --trusted-host {pip_trusted_host}", |
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.
Hi @diegolovison , could we remove --trusted-host {pip_trusted_host}
?
We would like to cover also self-signed certs.
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.
No. This is related to kubeflow/pipelines#10720
Support disconnected environment for Pipeline SDK tests.
Tested on the disconnected environment by setting
PIP_INDEX_URL
.Tested on a cluster with access to the internet without
PIP_INDEX_URL
.