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-11632: Skip invalid events yamls and continue #1429

Merged
merged 2 commits into from May 27, 2023

Conversation

ardaguclu
Copy link
Member

@ardaguclu ardaguclu commented May 25, 2023

Although it is rare, if events.yaml file is invalid, oc adm must-gather and oc adm inspect commands return non zero exit code because they fail when generating event-filter.html. Since we don't have control on events, we can warn user and continue process instead returning error.

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

@ardaguclu: This pull request references Jira Issue OCPBUGS-11632, 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.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @zhouying7780

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

In response to this:

Although it is rare, if event.yaml file is invalid, oc adm must-gather and oc adm inspect commands return non zero exit code because they fail when generating event-filter.html. Since we don't control on events, we can warn user and continue process instead returning error.

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 requested a review from zhouying7780 May 25, 2023 11:02
@ardaguclu
Copy link
Member Author

@ingvagabund could you PTAL?. Thanks.

@ardaguclu
Copy link
Member Author

/cc @kasturinarra

@openshift-ci-robot
Copy link

@ardaguclu: This pull request references Jira Issue OCPBUGS-11632, which is valid.

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

Requesting review from QA contact:
/cc @zhouying7780

In response to this:

Although it is rare, if events.yaml file is invalid, oc adm must-gather and oc adm inspect commands return non zero exit code because they fail when generating event-filter.html. Since we don't have control on events, we can warn user and continue process instead returning error.

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 May 25, 2023
@@ -191,7 +191,8 @@ func getAllEventsRecursive(rootDir string) (*corev1.EventList, error) {
}
events, err := readEvents(eventBytes)
if err != nil {
return fmt.Errorf("failed to read event err: %v", err)
klog.Warningf("skipping %s, failed to read event err: %v", string(eventBytes), err)
Copy link
Member

Choose a reason for hiding this comment

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

getAllEventsRecursive should be renamed then to reflect the fact the function will do best-effort instead. E.g. getEventsRecursive + mentioning the best-effort intention in the function description.

Still better to get at least something rather then nothing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for review @ingvagabund. You are right, I renamed function.

@ardaguclu
Copy link
Member Author

Unit test failures should be fixed by #1430

@ingvagabund
Copy link
Member

/lgtm

With the error there's no webpage generated so we are not making the situation worst. Actually, the webpage gets generated with at least a subset of the original events.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2023
@ardaguclu
Copy link
Member Author

Known flaky test(cmd/images.sh, I'll fix it soon);
/test e2e-agnostic-ovn-cmd

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ardaguclu, ingvagabund

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

@ardaguclu
Copy link
Member Author

/test e2e-metal-ipi-ovn-ipv6

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 68c710f and 2 for PR HEAD 6bfe6e5 in total

@ardaguclu
Copy link
Member Author

/hold
until unit tests are stable

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 25, 2023
@ardaguclu
Copy link
Member Author

/hold cancel
/retest

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 27, 2023
@ardaguclu
Copy link
Member Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 27, 2023

@ardaguclu: 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-robot openshift-merge-robot merged commit 9435591 into openshift:master May 27, 2023
12 checks passed
@openshift-ci-robot
Copy link

@ardaguclu: Jira Issue OCPBUGS-11632: All pull requests linked via external trackers have merged:

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

In response to this:

Although it is rare, if events.yaml file is invalid, oc adm must-gather and oc adm inspect commands return non zero exit code because they fail when generating event-filter.html. Since we don't have control on events, we can warn user and continue process instead returning error.

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.

@ardaguclu ardaguclu deleted the ocpbugs-11632 branch May 27, 2023 14:52
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

4 participants