assisted-test-infra icon indicating copy to clipboard operation
assisted-test-infra copied to clipboard

Add natsort package to requirements.txt

Open bkopilov opened this issue 9 months ago • 13 comments

The package allows us to sort complicated versions with numbers and naming. Using this package in custom ocp tests, getting a list of versions and sorting for last element .

bkopilov avatar May 01 '24 19:05 bkopilov

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bkopilov Once this PR has been reviewed and has the lgtm label, please assign omertuc for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar May 01 '24 19:05 openshift-ci[bot]

Hi @bkopilov. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

openshift-ci[bot] avatar May 01 '24 19:05 openshift-ci[bot]

@adriengentil , @danmanor

bkopilov avatar May 02 '24 05:05 bkopilov

/ok-te-test

danmanor avatar May 02 '24 07:05 danmanor

@bkopilov Why do you add the package but not use it ?

danmanor avatar May 02 '24 07:05 danmanor

@bkopilov Why do you add the package but not use it ?

I am using it in kni-assisted-installer-auto tests which run from podman containers.

bkopilov avatar May 02 '24 07:05 bkopilov

@bkopilov I don't understand, it is not used in this repo, so why add it here ?

danmanor avatar May 02 '24 07:05 danmanor

@bkopilov I don't understand, it is not used in this repo, so why add it here ?

Because here we controll what pip packages are installed on build image. Dockerfile.assisted-test-infra

RUN pip3 install --upgrade pip &&
pip3 install --no-cache-dir -I -r ./requirements.txt -r ./requirements-dev.txt &&
pip3 install --upgrade /build/pip/*

bkopilov avatar May 02 '24 08:05 bkopilov

I mean why not add it to kni-assisted-installer-auto ?

danmanor avatar May 02 '24 08:05 danmanor

/ok-to-test

danmanor avatar May 02 '24 08:05 danmanor

/retest

bkopilov avatar May 02 '24 10:05 bkopilov

@bkopilov: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-metal-assisted-kube-api-net-suite 95fa27e521fca45463c550a80e572c54e06b6594 link true /test e2e-metal-assisted-kube-api-net-suite
ci/prow/e2e-metal-assisted-kube-api-late-binding-single-node 95fa27e521fca45463c550a80e572c54e06b6594 link false /test e2e-metal-assisted-kube-api-late-binding-single-node
ci/prow/e2e-metal-assisted 95fa27e521fca45463c550a80e572c54e06b6594 link true /test e2e-metal-assisted
ci/prow/e2e-metal-single-node-live-iso 95fa27e521fca45463c550a80e572c54e06b6594 link true /test e2e-metal-single-node-live-iso

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

openshift-ci[bot] avatar May 02 '24 12:05 openshift-ci[bot]

/restest

bkopilov avatar May 05 '24 15:05 bkopilov

I mean why not add it to kni-assisted-installer-auto ?

I agree, if it's not used in test-infra I think the best it to add it as a dependency to kni-assisted-installer-auto

eliorerz avatar May 08 '24 09:05 eliorerz

I mean why not add it to kni-assisted-installer-auto ?

I agree, if it's not used in test-infra I think the best it to add it as a dependency to kni-assisted-installer-auto

Hi , the kni-assisted-installer run from the container (Centos9) the package is part of pip installation on the container. The Dockerfile.assisted-test-infra running the requirements.txt installation .

How can i install the python package from KNI ? Do you mean import pip pip.main(['install', "natsort"])

bkopilov avatar May 08 '24 13:05 bkopilov

I mean why not add it to kni-assisted-installer-auto ?

I agree, if it's not used in test-infra I think the best it to add it as a dependency to kni-assisted-installer-auto

Hi , the kni-assisted-installer run from the container (Centos9) the package is part of pip installation on the container. The Dockerfile.assisted-test-infra running the requirements.txt installation .

How can i install the python package from KNI ? Do you mean import pip pip.main(['install', "natsort"])

@eliorerz , @lalon4 , Not sure how can i force this package from kni tests , the image docker set by you before we run kni ... and i must update the container package where the code runs from ?

What do you suggest ? the make action is from test-infra... should i call to pip from KNI ?

bkopilov avatar May 28 '24 07:05 bkopilov

I mean why not add it to kni-assisted-installer-auto ?

I agree, if it's not used in test-infra I think the best it to add it as a dependency to kni-assisted-installer-auto

Hi , the kni-assisted-installer run from the container (Centos9) the package is part of pip installation on the container. The Dockerfile.assisted-test-infra running the requirements.txt installation . How can i install the python package from KNI ? Do you mean import pip pip.main(['install', "natsort"])

@eliorerz , @lalon4 , Not sure how can i force this package from kni tests , the image docker set by you before we run kni ... and i must update the container package where the code runs from ?

What do you suggest ? the make action is from test-infra... should i call to pip from KNI ?

I think that the best approach here is to add another step during kni-auto test-infra image build process, then build a qe-test-infra image using a new Dockerfile with all the dependencies you need.

eliorerz avatar May 29 '24 11:05 eliorerz

@eliorerz , Ok . i will close it and move the logic to kni-test-infra

bkopilov avatar May 30 '24 07:05 bkopilov

Moving the logic to kni-test

bkopilov avatar May 30 '24 07:05 bkopilov

/needs-rebase

bkopilov avatar Jun 05 '24 14:06 bkopilov

/retest

bkopilov avatar Jun 14 '24 06:06 bkopilov

/retest

bkopilov avatar Jun 14 '24 06:06 bkopilov

@bkopilov: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-metal-assisted-kube-api-late-binding-single-node 0a8e38032abe108602b23ece731ef56f63c319fa link false /test e2e-metal-assisted-kube-api-late-binding-single-node

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Jun 14 '24 06:06 openshift-ci[bot]

/retitle NO-ISSUE: Add natsort package to requirements.txt

eliorerz avatar Jun 24 '24 11:06 eliorerz

@bkopilov: This pull request explicitly references no jira issue.

In response to this:

The package allows us to sort complicated versions with numbers and naming. Using this package in custom ocp tests, getting a list of versions and sorting for last element .

Package info: https://pypi.org/project/natsort/

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Jun 24 '24 11:06 openshift-ci-robot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bkopilov, eliorerz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Jun 24 '24 11:06 openshift-ci[bot]

/retest-required

Remaining retests: 0 against base HEAD 2fddc7ac1b5643ca896155e1e9c9c6e05c6ae951 and 2 for PR HEAD 0a8e38032abe108602b23ece731ef56f63c319fa in total

openshift-ci-robot avatar Jun 24 '24 12:06 openshift-ci-robot