openshift / svt

Apache License 2.0
124 stars 105 forks source link

Rate limite some error message to be sent do slack to avoid too many … #708

Closed qiliRedHat closed 2 years ago

qiliRedHat commented 2 years ago

To fix #705 https://issues.redhat.com/browse/OCPQE-9017 Rate limit the following messages which may happen very frequently in some cases that will cause too many messages to be sent to slack channel.

  1. Cluster can't be connected - when cluster is broken or destroyed during the test. Result: Unable to connect to the server: dial tcp x.x.x.x:xxxx: i/o timeout Result: Unable to connect to the server: dial tcp: lookup api.xxx.qe-lrc.devcluster.openshift.com: no such host Result: Unable to connect to the server: dial tcp: lookup api.xxxx.qe.devcluster.openshift.com on x.x.x.x: server misbehaving

  2. Continuous login failure - when user login has problem during the test. error: You must be logged in to the server (Unauthorized)

  3. BZ 2038780 Result: Error from server (AlreadyExists): project.project.openshift.io "testuser-x-y" already exists

qiliRedHat commented 2 years ago

Test 'Unable to connect to the server' case, <200 messages in about 11 hours. - Passed https://coreos.slack.com/archives/C0266JJ4XM5/p1647268873773229

Test 'error: You must be logged in to the server (Unauthorized)' message limit. 2 messages every 5 minutes (will change to 1 hour after test). - Passed https://coreos.slack.com/archives/C0266JJ4XM5/p1647264141812289

Test 'Result: Error from server (AlreadyExists): project.project.openshift.io "testuser-x-y" already exists' - ongoing (need several days to reproduce BZ 2038780)

qiliRedHat commented 2 years ago

I didn't reproduce BZ 2038780 in the recent tests. So "testuser-x-y" already exists' slack message limit is not verified. But this does not block merging this pr, maybe the bug does not reproduced in 4.11, I can anyway verify it later if it happens again. @mffiedler If you don't have other comments, I think we can merge this pr now.

mffiedler commented 2 years ago

/approve /lgtm