openshift / svt

Apache License 2.0
124 stars 105 forks source link

add -n and -p to func task and label namespace with group name #790

Closed qiliRedHat closed 3 months ago

qiliRedHat commented 3 months ago

https://issues.redhat.com/browse/OCPQE-24491

openshift-ci[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiliRedHat

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: - ~~[OWNERS](https://github.com/openshift/svt/blob/master/OWNERS)~~ [qiliRedHat] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
qiliRedHat commented 3 months ago

@liquan PTAL

qiliRedHat commented 3 months ago

Test Result: 10 hours long run passed

2024-08-08 00:42:58,914 - INFO - Reliability test results:
[Function]               |     Total|    Passed|    Failed|Failure Rate|
-----------------------------------------------------------------------
[check_operators]        |        57|        57|         0|      0.0%|
[oc_task]                |        57|        57|         0|      0.0%|
[kubectl_task]           |        57|        57|         0|      0.0%|
[delete_all_projects]    |       240|       240|         0|      0.0%|
[verify_project_deletion]|       948|       948|         0|      0.0%|
[new_project]            |       479|       479|         0|      0.0%|
[check_all_projects]     |       234|       234|         0|      0.0%|
[cronjob.sh -n 10]       |         1|         1|         0|      0.0%|
[cronjob.sh -c]          |        55|        55|         0|      0.0%|
[new_app]                |       478|       478|         0|      0.0%|
[load_app]               |      6000|      6000|         0|      0.0%|
[build]                  |       234|       234|         0|      0.0%|
[check_pods]             |       468|       468|         0|      0.0%|
[delete_project]         |       479|       479|         0|      0.0%|
[scale_deployment]       |       264|       264|         0|      0.0%|
[cronjob.sh -d]          |         1|         1|         0|      0.0%|
-----------------------------------------------------------------------

Negative tests passed Invalid func type task config:

  groups:
    - name: test1
      ser_name: <admin_username>
      tasks:
        - func 
    - name: test2
      ser_name: <admin_username>
      tasks:
        - func apply -n 2 invalid
    - name: test2
      ser_name: <admin_username>
      tasks:
        - func apply -n 2 -p
    - name: test3
      ser_name: <admin_username>
      tasks:
        - func apply_nonamespace -p
    - name: test4
      ser_name: <admin_username>
      tasks:
        - func check_operators invalid

Error logs are expected:

2024-08-08 10:21:11,189 - ERROR - '[User: ] [Task: func apply_nonamespace -p]: the task needs a parameter after '-p'. Result is: '-3'.

2024-08-08 10:21:11,192 - ERROR - '[User: ] [Task: func apply -n 2 invalid]: the task needs only a number after '-n'. Result is: '-3'.

2024-08-08 10:21:11,192 - ERROR - '[User: ] [Task: func apply -n 2 -p]: the task needs a parameter after '-p'. Result is: '-3'.

2024-08-08 10:21:11,194 - ERROR - '[User: ] [Task: func check_operators invalid]: the task needs either '-n' or '-p' after the func name. Result is: '-3'.

2024-08-08 10:21:11,210 - ERROR - func
 127 : /bin/sh: func: command not found
qiliRedHat commented 3 months ago

/retest all

qiliRedHat commented 3 months ago

/retest all

openshift-ci[bot] commented 3 months ago

@qiliRedHat: The /retest command does not accept any targets. The following commands are available to trigger required jobs:

Use /test all to run the following jobs that were automatically triggered:

In response to [this](https://github.com/openshift/svt/pull/790#issuecomment-2274858440): >/retest all Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
qiliRedHat commented 3 months ago

/retest-required

liqcui commented 3 months ago

/lgtm

openshift-ci-robot commented 3 months ago

/retest-required

Remaining retests: 0 against base HEAD fb8b61a06fbe9cd92db124c9e762194af8e8310f and 2 for PR HEAD 421e1317be564a929f67b37e37a829167739e8c0 in total

qiliRedHat commented 3 months ago

/retest-required

qiliRedHat commented 3 months ago

Required jobs failed due to Prow CI issue https://redhat-internal.slack.com/archives/CBN38N3MW/p1723099702584469

qiliRedHat commented 3 months ago

/retest-required

openshift-ci[bot] commented 3 months ago

@qiliRedHat: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).