Skip to content
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 subdirectories for junit files and junit_class_name #490

Merged
merged 1 commit into from
Oct 17, 2019

Conversation

jlewi
Copy link
Contributor

@jlewi jlewi commented Oct 17, 2019

Support subdirectories for junit files and grouping in test grid by name

  • We want to support putting junit files in subdirectories e.g.
    junit/junit_workflow1/junit_test1.xml
    junit/junit_workflow2/junit_test1.xml

    • prow_artifacts.py needs to fetch the junit files from GCS in order to
      determine if there were any test failures to properly set the prow job
      status

    • The code however was making an assumption that all results were in
      the artifacts dir and not subdirectories

  • run_e2e_workflow.py should set a keyword argument test_target_name
    to the name of the workflow (as set in prow_config.yaml) for each of
    the python functions creating argo workflows.

    • We want to use the junit attribute classname to group tests coming
      from the same workflow. To do that we need to know the name of the workflow.

    • We also use this as a prefix for the test name to support grouping
      hierarchically

  • Related to Support grouping in testgrid #489

  • Update kfunittests to Use a junit subdirectory to make sure subdirectories are properly handled.

  • Update docs

  • update toc.

  • Convert test_py_lint to use pytest. Do this because we want to be able to test the use of junit features.

  • Add a separate mkdir step.


This change is Reviewable

jlewi pushed a commit to jlewi/kubeflow that referenced this pull request Oct 17, 2019
@jlewi
Copy link
Contributor Author

jlewi commented Oct 17, 2019

/assign @zhenghuiwang

@jlewi
Copy link
Contributor Author

jlewi commented Oct 17, 2019

/test all

* We want to support putting junit files in subdirectories e.g.
  junit/junit_workflow1/junit_test1.xml
  junit/junit_workflow2/junit_test1.xml

  * prow_artifacts.py needs to fetch the junit files from GCS in order to
    determine if there were any test failures to properly set the prow job
    status

  * The code however was making an assumption that all results were in
    the artifacts dir and not subdirectories

* run_e2e_workflow.py should set a keyword argument test_target_name
  to the name of the workflow (as set in prow_config.yaml) for each of
  the python functions creating argo workflows.

  * We want to use the junit attribute classname to group tests coming
    from the same workflow. To do that we need to know the name of the workflow.

  * We also use this as a prefix for the test name to support grouping
    hierarchically

* Related to kubeflow#489

* Update kfunittests to Use a junit subdirectory to make sure subdirectories are properly handled.

* Update docs

* update toc.

* Convert test_py_lint to use pytest. Do this because we want to be able to test the use of junit features.

* Add a separate mkdir step.
@jlewi
Copy link
Contributor Author

jlewi commented Oct 17, 2019

On the latest run the name for the pylint test was

py-unittests/test_py_lint

So overriding the test name in the junit appears to work. No results are showing up in the test grid at all so I can't verify that's working. That seems unrelated to this PR.

@zhenghuiwang
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zhenghuiwang

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

@k8s-ci-robot k8s-ci-robot merged commit 16ea186 into kubeflow:master Oct 17, 2019
jlewi pushed a commit to jlewi/testing that referenced this pull request Oct 18, 2019
…rid by name (kubeflow#490)"

This reverts commit 16ea186.

The commit breaks kfctl_e2e_workflow.py tests because we introduced an
extra argument.
k8s-ci-robot pushed a commit that referenced this pull request Oct 18, 2019
…rid by name (#490)" (#493)

This reverts commit 16ea186.

The commit breaks kfctl_e2e_workflow.py tests because we introduced an
extra argument.
jlewi pushed a commit to jlewi/testing that referenced this pull request Oct 18, 2019
…n test grid by name (kubeflow#490)" (kubeflow#493)"

This reverts commit 81326be.

* Relates to kubeflow#489

* Roll forward the orginal change now that kfctl_create_e2e_workflow.py
  has been updated.
jlewi pushed a commit to jlewi/testing that referenced this pull request Oct 18, 2019
…n test grid by name (kubeflow#490)" (kubeflow#493)"

This reverts commit 81326be.

* Relates to kubeflow#489

* Roll forward the orginal change now that kfctl_create_e2e_workflow.py
  has been updated to handle the extra argument.

add a leading /
k8s-ci-robot pushed a commit that referenced this pull request Oct 18, 2019
…n test grid by name (#490)" (#493)" (#494)

This reverts commit 81326be.

* Relates to #489

* Roll forward the orginal change now that kfctl_create_e2e_workflow.py
  has been updated to handle the extra argument.

add a leading /
jlewi pushed a commit to jlewi/kubeflow that referenced this pull request Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants