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

Mitigate context deadline exceeded issue #775

Merged
merged 1 commit into from
May 10, 2021
Merged

Mitigate context deadline exceeded issue #775

merged 1 commit into from
May 10, 2021

Conversation

HeavyWombat
Copy link
Contributor

Changes

With the default implementation of repo.List, the timeout seems to be rather
short and there are intermittent context deadline exceeded errors when running
the unit tests under load, or when repeating them over and over again.

Mitigate the error by switching to the list function that accepts a context. It
was added recently and privides the possibility to define a different timeout.

Refactor related code to make it more compact by removing superfluous returns.

In order to be able to test and reproduce it, I used Ginkgo with the -untilItFails
and it started to be flaky after about 20 to 25 repetitions. With the code updates,
I was able to run it without issues for over 100 times, before canceling the test run.

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

Fixed issue with Git validation by using the existing context with its timeout to be used for Git validations actions as well. Since this timeout is greater than the default timeout, it is less likely to fail unexpectedly in high load situations.

With the default implementation of `repo.List`, the timeout seems to be rather
short and there are intermittent context deadline exceeded errors when running
the unit tests under load, or when repeating them over and over again.

Mitigate the error by switching to the list function that accepts a context. It
was added recently and privides the possibility to define a different timeout.

Refactor related code to make it more compact by removing superfluous returns.
@openshift-ci-robot openshift-ci-robot added the release-note Label for when a PR has specified a release note label May 7, 2021
@HeavyWombat HeavyWombat requested a review from qu1queee May 7, 2021 18:40
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from heavywombat after the PR has been reviewed.

The full list of commands accepted by this bot can be found 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

@HeavyWombat HeavyWombat requested review from SaschaSchwarze0 and gabemontero and removed request for sbose78, gabemontero and SaschaSchwarze0 May 7, 2021 18:40
@HeavyWombat HeavyWombat added the kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. label May 7, 2021
Copy link
Contributor

@qu1queee qu1queee left a comment

Choose a reason for hiding this comment

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

thanks

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 10, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 10, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qu1queee

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 10, 2021
@openshift-merge-robot openshift-merge-robot merged commit ef91a2a into shipwright-io:master May 10, 2021
@HeavyWombat HeavyWombat deleted the mitigate/context-deadline-exceeded-in-git-tests branch May 17, 2021 16:16
@adambkaplan adambkaplan added this to the release-v0.5.0 milestone Jun 10, 2021
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. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm Indicates that a PR is ready to be merged. release-note Label for when a PR has specified a release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants