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

OCPBUGS-19422: add test to look for errors in logs #2370

Conversation

dhellmann
Copy link
Contributor

This commit adds a new test to check for some common
permission-related errors that should never appear in the MicroShift
logs.

/assign @copejon @ggiguash @pmtk @pacevedom

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 19, 2023
@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Sep 19, 2023
@openshift-ci-robot
Copy link

@dhellmann: This pull request references Jira Issue OCPBUGS-19422, which is invalid:

  • expected the bug to target the "4.15.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This commit adds a new test to check for some common
permission-related errors that should never appear in the MicroShift
logs.

/assign @copejon @ggiguash @pmtk @pacevedom

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 19, 2023
@dhellmann
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Sep 19, 2023
@openshift-ci-robot
Copy link

@dhellmann: This pull request references Jira Issue OCPBUGS-19422, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

In response to this:

/jira refresh

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-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Sep 19, 2023
@dhellmann dhellmann force-pushed the OCPBUGS-19422-test-logs-for-permission-errors branch from 02ba54f to 258ae52 Compare September 20, 2023 12:20
Comment on lines 19 to 37
Should Not Find Forbidden
[Documentation] Logs should not say "forbidden"
Pattern Should Not Appear In Log Output ${CURSOR} forbidden

Should Not Find Cannot Patch Resource
[Documentation] Logs should not say "cannot patch resource"
Pattern Should Not Appear In Log Output ${CURSOR} cannot patch resource

Should Find Etcd Is Ready
[Documentation] Logs should say "etcd is ready"
Pattern Should Appear In Log Output ${CURSOR} etcd is ready

Should Find MicroShift Is Ready
[Documentation] Logs should say "microshift is ready"
Pattern Should Appear In Log Output ${CURSOR} microshift is ready
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to run these at the end of the other suites? Asking because I think it would be interesting as some sort of pre-suite-teardown instead of standalone tests. You would catch a wider variety of logs, as right now the test suite execution order is randomized.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Today I'm mostly interested in looking for errors just from starting the service itself, not things triggered by the tests. I expect any test that might trigger an error to do its own check (the keywords here are all reusable for that).

Copy link
Contributor

Choose a reason for hiding this comment

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

What about executing this one right after https://github.com/openshift/microshift/blob/main/test/bin/scenario.sh#L454-L461 ? That way you always ensure you are catching both the first start and the whole test. A test doing restarts might escape these checks because of randomization.

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'm trying to avoid the global invariant pattern. This suite checks that we don't generate a few specific errors unrelated to any tests. After we merge it, we will have the keywords in place to allow each test suite to check conditions relevant to it, so that if we start seeing failures we know why we're checking those messages.

@dhellmann dhellmann force-pushed the OCPBUGS-19422-test-logs-for-permission-errors branch from 258ae52 to 3e776c0 Compare September 20, 2023 21:50
This commit adds a new test to check for some common
permission-related errors that should never appear in the MicroShift
logs.
@dhellmann dhellmann force-pushed the OCPBUGS-19422-test-logs-for-permission-errors branch from 3e776c0 to 9176a2a Compare October 5, 2023 18:25
@ggiguash
Copy link
Contributor

ggiguash commented Oct 6, 2023

/test microshift-metal-tests

@ggiguash
Copy link
Contributor

ggiguash commented Oct 7, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2023
@openshift-ci-robot
Copy link

@dhellmann: This pull request references Jira Issue OCPBUGS-19422, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

In response to this:

This commit adds a new test to check for some common
permission-related errors that should never appear in the MicroShift
logs.

/assign @copejon @ggiguash @pmtk @pacevedom

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
Copy link
Contributor

openshift-ci bot commented Oct 7, 2023

[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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 7, 2023

@dhellmann: 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-ci openshift-ci bot merged commit a700069 into openshift:main Oct 7, 2023
4 checks passed
@openshift-ci-robot
Copy link

@dhellmann: Jira Issue OCPBUGS-19422: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-19422 has been moved to the MODIFIED state.

In response to this:

This commit adds a new test to check for some common
permission-related errors that should never appear in the MicroShift
logs.

/assign @copejon @ggiguash @pmtk @pacevedom

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.

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-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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

6 participants