Skip to content

Conversation

@asbjornu
Copy link
Member

@asbjornu asbjornu commented Mar 2, 2022

This PR is a rebased and cleaned up version of #2883.

Description

Implements infinite recursion protection in BranchConfigurationCalculator.GetBranchConfiguration.

Related Issue

Closes #2883. Resolves #2864.

Motivation and Context

Infinite loops and recursions are bad. This tries to avoid it to some extent.

How Has This Been Tested?

No new tests are added to provoke this, but I have no idea how to provoke the behavior described in #2864 and the added code is so simple I'm not sure they need any tests.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@asbjornu asbjornu force-pushed the feature/infinite-loop-protection branch 3 times, most recently from bfeb20c to a09810f Compare March 2, 2022 13:59
scphantm and others added 4 commits March 3, 2022 00:35
Refactor recursion protection from the public `GetBranchConfiguration`
method to an internal `GetBranchConfigurationInternal` method.
Add fallback for `null` in the configuration for the for `main` and
`develop` branch regular expressions.
@asbjornu asbjornu force-pushed the feature/infinite-loop-protection branch from a09810f to 3be6c8f Compare March 2, 2022 23:35
@asbjornu asbjornu requested a review from arturcic March 2, 2022 23:35
@arturcic arturcic merged commit 19a302b into GitTools:main Mar 3, 2022
@mergify
Copy link
Contributor

mergify bot commented Mar 3, 2022

Thank you @asbjornu for your contribution!

@asbjornu asbjornu deleted the feature/infinite-loop-protection branch March 3, 2022 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Azure Execute hangs for ~25 minutes and then fails with generic node error.

3 participants