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

USHIFT-2431: Add junit integration to CNCF tests #3108

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

ggiguash
Copy link
Contributor

@ggiguash ggiguash commented Mar 5, 2024

No description provided.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 5, 2024

@ggiguash: This pull request references USHIFT-2431 which is a valid jira issue.

In response to this:

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 openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 5, 2024
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 5, 2024
Copy link
Contributor

openshift-ci bot commented Mar 5, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 5, 2024
@ggiguash
Copy link
Contributor Author

ggiguash commented Mar 5, 2024

/test ?

Copy link
Contributor

openshift-ci bot commented Mar 5, 2024

@ggiguash: The following commands are available to trigger required jobs:

  • /test images
  • /test metal-periodic-test
  • /test metal-periodic-test-arm
  • /test microshift-metal-cache
  • /test microshift-metal-cache-arm
  • /test microshift-metal-tests
  • /test microshift-metal-tests-arm
  • /test ocp-conformance-rhel-eus
  • /test ocp-conformance-rhel-eus-arm
  • /test test-rpm
  • /test test-unit
  • /test verify

The following commands are available to trigger optional jobs:

  • /test test-rebase

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

  • pull-ci-openshift-microshift-main-images
  • pull-ci-openshift-microshift-main-metal-periodic-test
  • pull-ci-openshift-microshift-main-metal-periodic-test-arm
  • pull-ci-openshift-microshift-main-microshift-metal-tests
  • pull-ci-openshift-microshift-main-microshift-metal-tests-arm
  • pull-ci-openshift-microshift-main-test-unit
  • pull-ci-openshift-microshift-main-verify

In response to this:

/test ?

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.

@ggiguash
Copy link
Contributor Author

ggiguash commented Mar 5, 2024

/test metal-periodic-test

@ggiguash ggiguash marked this pull request as ready for review March 5, 2024 12:58
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 5, 2024
@openshift-ci openshift-ci bot requested review from dhellmann and pmtk March 5, 2024 13:02
start_junit
trap "close_junit" EXIT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The framework creates and closes the file, so you don't want these 2 lines. Calling start_junit again will overwrite any existing content and having the trap will cause the file to be closed twice so the syntax is not correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhellmann , it looks like the tests do not work without this change.
The reason is because the junit is initialized in run_tests function, which is never called for CNCF.
I have to return the code back

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is the plugin interface used by run_tests. If run_tests is not called, then these lines wouldn't do anything, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at scenario.sh, running tests is a separate action and it calls action_run function. This function is different from action_create because it does not directly call start_junit.

The latter is only called inside run_tests function (RF invocation), which is never used in the CNCF test because it's not written using RF.

One possible solution to this problem would be to move the following block to action_run instead of run_tests.

    start_junit
    trap "close_junit; sos_report" EXIT

Then, it will always be called regardless of what's executed in the scenario run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I uploaded this implementation - let me know what you think.

@ggiguash
Copy link
Contributor Author

ggiguash commented Mar 5, 2024

/assign @dhellmann @pacevedom

@ggiguash
Copy link
Contributor Author

ggiguash commented Mar 6, 2024

/test metal-periodic-test microshift-metal-tests

@dhellmann
Copy link
Contributor

/lgtm

I like the change to move the junit setup into the action function. It's much more consistent.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 6, 2024
Copy link
Contributor

openshift-ci bot commented Mar 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, ggiguash

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

Copy link
Contributor

openshift-ci bot commented Mar 6, 2024

@ggiguash: all tests passed!

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-merge-bot openshift-merge-bot bot merged commit dd78194 into openshift:main Mar 6, 2024
8 checks passed
@ggiguash ggiguash deleted the cncf_junit branch March 7, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants