piqe-test-libraries / piqe-ocp-lib Goto Github PK
View Code? Open in Web Editor NEWPIQE OpenShift API Library
License: Apache License 2.0
PIQE OpenShift API Library
License: Apache License 2.0
A lot of code is slipping by without at least being formatted. This has been addressed in #49 but we need to catch it in PRs using automation as well.
Testing the libraries with Python 3.10, a warning is raised about setDaemon()
method being deprecated, from plumbum module
scenario/lib64/python3.10/site-packages/plumbum/commands/processes.py:270
/home/sgill/css/piqe-ocp-lib/scenario/lib64/python3.10/site-packages/plumbum/commands/processes.py:270: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
bgthd.setDaemon(True)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
workaround is to disable the warning
Downstream CI is failing with the following errors:
RuntimeError
Invalid hashes (sha256:bdbb3d96c4581f56d99a30d8d71391c11536930f13df92f6a7a7cca07a98c1de) for ruamel.yaml (0.17.10) using archive ruamel.yaml-0.17.10-py3-none-any.whl. Expected one of sha256:106bc8d6dc6a0ff7c9196a47570432036f41d556b779c6b4e618085f57e39e67, sha256:ffb9b703853e9e8b7861606dfdab1026cf02505bade0653d1880f4b2db47f815.
at /var/lib/jenkins/workspace/OCP_Test_Lib_Pull_Request@2/scenario/lib64/python3.9/site-packages/poetry/installation/executor.py:628 in _download_link
624│ )
625│ )
626│
627│ if archive_hashes.isdisjoint(hashes):
→ 628│ raise RuntimeError(
629│ "Invalid hashes ({}) for {} using archive {}. Expected one of {}.".format(
630│ ", ".join(sorted(archive_hashes)),
631│ package,
632│ archive.name,
• Installing unittest-xml-reporting (3.0.4)
Symtoms look similar to this poetry issue python-poetry/poetry#4523
What is odd is that the latest builds are failing with this error using poetry-1.1.11-py2.py3-none-any.whl and poetry_core-1.0.7-py2.py3-none-any.whl
But the last successful build that ran on October 28th installed the same poetry packages
RHEL CSB comes with python3.6 as default with pip 9.x.x being the version available. To follow the install instructions with the poetry config, it is required that users upgrade the pip version (which is spit out as a warning. Pip just fails out complaining about a missing setup.py
file otherwise.
python -m pip install --upgrade pip
It may be worth documenting the requirement, this was something @kasturinarra was running into but it wasn't immediately clear to us why. Otherwise, feel free to close this 🐱
Warnings are being thrown of different markers that are unknown, though it seems that tests are still being skipped (at least for the operator check). I saw these are warnings also showing up in Jenkins, so this isn't specific to the disconnected stack. Are these warnings expected and something else is happening?
============================================================== warnings summary ==============================================================
piqe_ocp_lib/tests/resources/test_ocp_machine_management.py:56
/home/bpratt/pit/git/piqe/piqe-ocp-lib/piqe_ocp_lib/tests/resources/test_ocp_machine_management.py:56: PytestUnknownMarkWarning: Unknown pytest.mark.skip_if_not_provider - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.skip_if_not_provider("Azure")
piqe_ocp_lib/tests/resources/test_ocp_machine_management.py:99
/home/bpratt/pit/git/piqe/piqe-ocp-lib/piqe_ocp_lib/tests/resources/test_ocp_machine_management.py:99: PytestUnknownMarkWarning: Unknown pytest.mark.skip_if_not_provider - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.skip_if_not_provider("Azure")
piqe_ocp_lib/api/resources/ocp_operators.py:210
/home/bpratt/pit/git/piqe/piqe-ocp-lib/piqe_ocp_lib/api/resources/ocp_operators.py:210: DeprecationWarning: Removed from OpenShift >= 4.6. Deprecated for versions [4.4, 4.5]
warnings.warn(
piqe_ocp_lib/api/resources/ocp_operators.py:296
/home/bpratt/pit/git/piqe/piqe-ocp-lib/piqe_ocp_lib/api/resources/ocp_operators.py:296: DeprecationWarning: Removed from OpenShift >= 4.5. Deprecated for version 4.4
warnings.warn(
piqe_ocp_lib/tests/resources/test_ocp_virtual_machine.py:13
/home/bpratt/pit/git/piqe/piqe-ocp-lib/piqe_ocp_lib/tests/resources/test_ocp_virtual_machine.py:13: PytestUnknownMarkWarning: Unknown pytest.mark.requiresoperator - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
pytestmark = pytest.mark.requiresoperator('kubevirt-hyperconverged')
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================== short test summary info ===========================================================
SKIPPED [1] piqe_ocp_lib/tests/resources/test_ocp_health_checker.py:95: MPQEENABLE-433 Health checker failures - OCP 4.5.30
SKIPPED [11] piqe_ocp_lib/tests/resources/test_ocp_machine_management.py:53: Skipped
SKIPPED [1] piqe_ocp_lib/tests/resources/test_ocp_nodes.py:178: MPQEENABLE-396 expected_retcode assertion fails
SKIPPED [1] piqe_ocp_lib/tests/resources/test_ocp_operators.py:132: Removed from openshift >= 4.6
SKIPPED [1] piqe_ocp_lib/tests/resources/test_ocp_operators.py:146: Removed from openshift >= 4.6
SKIPPED [1] piqe_ocp_lib/tests/resources/test_ocp_operators.py:153: Removed from openshift >= 4.6
SKIPPED [1] piqe_ocp_lib/tests/resources/test_ocp_operators.py:252: Skip until MPQEENABLE-365 is resolved
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_vm_subresources_client_base_url, because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_vm_subresources_client_run_action[start-http://foo.bar/start], because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_vm_subresources_client_run_action[stop-http://foo.bar/stop], because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_vm_subresources_client_run_action[restart-http://foo.bar/restart], because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_ocp_virtual_machine_custom_subresource_config, because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_ocp_virtual_machine_create, because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_ocp_virtual_machine_delete, because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_ocp_virtual_machine_get_status, because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_ocp_virtual_machine_run_action, because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_virtual_machine_spec_setter, because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_virtual_machine_status_property, because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_virtual_machine_repr, because operator: kubevirt-hyperconverged is required and not installed.
SKIPPED [1] piqe_ocp_lib/tests/conftest.py:86: Skipping test, test_virtual_machine_context, because operator: kubevirt-hyperconverged is required and not installed.
On a recent attempt to install operators to an OCP 4.7 cluster from the operator hub, the installation process for installation never completed. This happened with every operator I subscribed, but manually installing/subscribing the operator via the UI worked. I think the issue is related to a field that may be missing from the Subscription spec.
This is an example (simplified) of a manually-created Subscription object:
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: local-storage-operator
namespace: openshift-local-storage
spec:
channel: '4.7'
installPlanApproval: Automatic
name: local-storage-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
startingCSV: local-storage-operator.4.7.0-202105210300.p0
And here's the corresponding bits from create_subscription
:
piqe-ocp-lib/piqe_ocp_lib/api/resources/ocp_operators.py
Lines 421 to 432 in aa2d75d
That startingCSV
field is missing in the library-generated snippet, and is also referenced in the status
section of the Subscription of a working operator install, leading me to believe it may be a required field for installing some or all operators. Without this field, the "InstallPlan" that is created/related with this Subscription enters a perpetual "updating" state. The system event logs shows that operator images are successfully pulled into the cluster, but the operator never becomes active.
I assume the value for the startingCSV
field is somewhere in the operator metadata, but haven't dug far enough into it to find out.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.