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

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

Closed
scphantm opened this issue Sep 29, 2021 · 8 comments · Fixed by #3023
Closed

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

scphantm opened this issue Sep 29, 2021 · 8 comments · Fixed by #3023
Labels
Milestone

Comments

@scphantm
Copy link
Contributor

Describe the bug
i reported this here GitTools/actions#511 but havn't gotten any response, my logs and such are over there.

Heres the basic, when we are seeding a repo, the azure pipeline will hang on the GitVersion Execute task. we don't know why, but when it does happen, it will hang for about 30 minutes and then fail with a generic node error. What fixes it is simply creating a new PR with just a white space commit to it.

the bug is 2 fold

1 - why is it failing
2 - why is it failing in such a way that we can't debug.

Expected Behavior

It works

Actual Behavior

It hangs on the execute task until Node or Azure times out.

Possible Fix

putting in a white space commit makes it work again.

Steps to Reproduce

when we are seeding our repos, the initial commits cause the thing to hang. Simply adding a blank white space commit will clear the error.

Context

we have hundreds of repos and pipelines. This is killing us.

Your Environment

Azure Pipelines

  • Version Used:
  • Operating System and version (Windows 10, Ubuntu 18.04):
  • Link to your project:
  • Link to your CI build (if appropriate):
@scphantm scphantm added the bug label Sep 29, 2021
@scphantm
Copy link
Contributor Author

scphantm commented Oct 4, 2021

I just posted this in the other bug:

we are really having a problem with this. its bad enough where im getting pressure to pull the tool. we show about 15% of our pipelines fail because of this error. The problem case has expanded to include pipelines that have already worked correctly. meaning we did the empty commit mentioned above and got it to work, then the next PR, it fails.

Any ideas here? It really seems like node is either hanging because it doesn't like something in the repo, or, what i really think is happening is gitversion is failing for some reason and node isn't picking up the exit code or logs. possibly because the action has it always parsing json? if there is an error, is the return

https://github.com/GitTools/actions/blob/d957a15d75c7fc44255d91da910f7a2c0b0be42f/src/tasks/gitversion/main.ts#L49

here, able to capture and return an error? I know in testing locally, if gitversion generates an error, the output to the screen is not json. Its only json when things go correctly.

@scphantm
Copy link
Contributor Author

scphantm commented Oct 6, 2021

We did some more work on this. We eliminated the azure plugin and are running gitversion as a cli application now and we think we found the problem. The problem is with multiple source branches. If gitversion recognizes multiple source branches, it gets stuck in an infinite loop, here's a snip from the 1.8gb log file,

2021-10-06T00:03:29.6699547Z master, origin/master
2021-10-06T00:03:29.6701142Z           INFO [10/06/21 0:03:29:66] End: Finding branch source of 'DevMerge-develop_cls-AH' (Took: 0.77ms)
2021-10-06T00:03:29.6702947Z           INFO [10/06/21 0:03:29:66] Begin: Getting branches containing the commit 'be18378'.
2021-10-06T00:03:29.6703929Z             INFO [10/06/21 0:03:29:66] Trying to find direct branches.
2021-10-06T00:03:29.6705232Z             INFO [10/06/21 0:03:29:66] No direct branches found, searching through all branches.
2021-10-06T00:03:29.6706845Z             INFO [10/06/21 0:03:29:66] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.6709911Z             INFO [10/06/21 0:03:29:66] The branch 'master' has a matching commit.
2021-10-06T00:03:29.6711468Z             INFO [10/06/21 0:03:29:66] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.6713250Z             INFO [10/06/21 0:03:29:66] The branch 'origin/master' has a matching commit.
2021-10-06T00:03:29.6715037Z           INFO [10/06/21 0:03:29:66] End: Getting branches containing the commit 'be18378'. (Took: 2.94ms)
2021-10-06T00:03:29.6716820Z           INFO [10/06/21 0:03:29:66] Begin: Getting branches containing the commit 'f626232'.
2021-10-06T00:03:29.6717784Z             INFO [10/06/21 0:03:29:66] Trying to find direct branches.
2021-10-06T00:03:29.6718727Z             INFO [10/06/21 0:03:29:66] No direct branches found, searching through all branches.
2021-10-06T00:03:29.6720365Z             INFO [10/06/21 0:03:29:66] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.6721995Z             INFO [10/06/21 0:03:29:66] The branch 'master' has no matching commits.
2021-10-06T00:03:29.6723712Z             INFO [10/06/21 0:03:29:66] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.6725640Z             INFO [10/06/21 0:03:29:67] The branch 'origin/master' has no matching commits.
2021-10-06T00:03:29.6727354Z           INFO [10/06/21 0:03:29:67] End: Getting branches containing the commit 'f626232'. (Took: 0.34ms)
2021-10-06T00:03:29.6728707Z           INFO [10/06/21 0:03:29:67] Found possible parent branches: master, origin/master
2021-10-06T00:03:29.6730012Z           WARN [10/06/21 0:03:29:67] Failed to inherit Increment branch configuration, ended up with: master, origin/master
2021-10-06T00:03:29.6731108Z Falling back to develop branch config
2021-10-06T00:03:29.6732028Z           INFO [10/06/21 0:03:29:67] Begin: Attempting to inherit branch configuration from parent branch
2021-10-06T00:03:29.6748053Z             INFO [10/06/21 0:03:29:67] HEAD is merge commit, this is likely a pull request using DevMerge-develop_cls-AH as base
2021-10-06T00:03:29.6772376Z             INFO [10/06/21 0:03:29:67] Begin: Finding branch source of 'DevMerge-develop_cls-AH'
2021-10-06T00:03:29.6773609Z               INFO [10/06/21 0:03:29:67] Multiple source branches have been found, picking the first one (master).
2021-10-06T00:03:29.6774563Z This may result in incorrect commit counting.
2021-10-06T00:03:29.6775252Z Options were:
2021-10-06T00:03:29.6775847Z master, origin/master
2021-10-06T00:03:29.6777435Z             INFO [10/06/21 0:03:29:67] End: Finding branch source of 'DevMerge-develop_cls-AH' (Took: 0.09ms)
2021-10-06T00:03:29.6779210Z             INFO [10/06/21 0:03:29:67] Begin: Getting branches containing the commit 'be18378'.
2021-10-06T00:03:29.6783738Z               INFO [10/06/21 0:03:29:67] Trying to find direct branches.
2021-10-06T00:03:29.6785080Z               INFO [10/06/21 0:03:29:67] No direct branches found, searching through all branches.
2021-10-06T00:03:29.6786767Z               INFO [10/06/21 0:03:29:67] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.6788427Z               INFO [10/06/21 0:03:29:67] The branch 'master' has a matching commit.
2021-10-06T00:03:29.6790176Z               INFO [10/06/21 0:03:29:67] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.6791855Z               INFO [10/06/21 0:03:29:67] The branch 'origin/master' has a matching commit.
2021-10-06T00:03:29.6793986Z             INFO [10/06/21 0:03:29:67] End: Getting branches containing the commit 'be18378'. (Took: 0.35ms)
2021-10-06T00:03:29.6795724Z             INFO [10/06/21 0:03:29:67] Begin: Getting branches containing the commit 'f626232'.
2021-10-06T00:03:29.6796753Z               INFO [10/06/21 0:03:29:67] Trying to find direct branches.
2021-10-06T00:03:29.6797720Z               INFO [10/06/21 0:03:29:67] No direct branches found, searching through all branches.
2021-10-06T00:03:29.6799351Z               INFO [10/06/21 0:03:29:67] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.6803001Z               INFO [10/06/21 0:03:29:67] The branch 'master' has no matching commits.
2021-10-06T00:03:29.6804593Z               INFO [10/06/21 0:03:29:67] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.6806276Z               INFO [10/06/21 0:03:29:67] The branch 'origin/master' has no matching commits.
2021-10-06T00:03:29.6808122Z             INFO [10/06/21 0:03:29:67] End: Getting branches containing the commit 'f626232'. (Took: 0.32ms)
2021-10-06T00:03:29.6809363Z             INFO [10/06/21 0:03:29:67] Found possible parent branches: master, origin/master
2021-10-06T00:03:29.6810660Z             WARN [10/06/21 0:03:29:67] Failed to inherit Increment branch configuration, ended up with: master, origin/master
2021-10-06T00:03:29.6811669Z Falling back to develop branch config
2021-10-06T00:03:29.6812553Z             INFO [10/06/21 0:03:29:67] Begin: Attempting to inherit branch configuration from parent branch
2021-10-06T00:03:29.6814415Z               INFO [10/06/21 0:03:29:67] HEAD is merge commit, this is likely a pull request using DevMerge-develop_cls-AH as base
2021-10-06T00:03:29.6831618Z               INFO [10/06/21 0:03:29:68] Begin: Finding branch source of 'DevMerge-develop_cls-AH'
2021-10-06T00:03:29.6833116Z                 INFO [10/06/21 0:03:29:68] Multiple source branches have been found, picking the first one (master).
2021-10-06T00:03:29.6834157Z This may result in incorrect commit counting.
2021-10-06T00:03:29.6834870Z Options were:
2021-10-06T00:03:29.6835482Z master, origin/master
2021-10-06T00:03:29.6837159Z               INFO [10/06/21 0:03:29:68] End: Finding branch source of 'DevMerge-develop_cls-AH' (Took: 0.09ms)
2021-10-06T00:03:29.6838903Z               INFO [10/06/21 0:03:29:68] Begin: Getting branches containing the commit 'be18378'.
2021-10-06T00:03:29.6839965Z                 INFO [10/06/21 0:03:29:68] Trying to find direct branches.
2021-10-06T00:03:29.6840952Z                 INFO [10/06/21 0:03:29:68] No direct branches found, searching through all branches.
2021-10-06T00:03:29.6846185Z                 INFO [10/06/21 0:03:29:68] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.6847862Z                 INFO [10/06/21 0:03:29:68] The branch 'master' has a matching commit.
2021-10-06T00:03:29.6849489Z                 INFO [10/06/21 0:03:29:68] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.6851163Z                 INFO [10/06/21 0:03:29:68] The branch 'origin/master' has a matching commit.
2021-10-06T00:03:29.6852992Z               INFO [10/06/21 0:03:29:68] End: Getting branches containing the commit 'be18378'. (Took: 0.35ms)
2021-10-06T00:03:29.6854791Z               INFO [10/06/21 0:03:29:68] Begin: Getting branches containing the commit 'f626232'.
2021-10-06T00:03:29.6855843Z                 INFO [10/06/21 0:03:29:68] Trying to find direct branches.
2021-10-06T00:03:29.6856855Z                 INFO [10/06/21 0:03:29:68] No direct branches found, searching through all branches.
2021-10-06T00:03:29.6859410Z                 INFO [10/06/21 0:03:29:68] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.6864922Z                 INFO [10/06/21 0:03:29:68] The branch 'master' has no matching commits.
2021-10-06T00:03:29.6866714Z                 INFO [10/06/21 0:03:29:68] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.6871297Z                 INFO [10/06/21 0:03:29:68] The branch 'origin/master' has no matching commits.
2021-10-06T00:03:29.6873088Z               INFO [10/06/21 0:03:29:68] End: Getting branches containing the commit 'f626232'. (Took: 0.40ms)
2021-10-06T00:03:29.6874356Z               INFO [10/06/21 0:03:29:68] Found possible parent branches: master, origin/master
2021-10-06T00:03:29.6875673Z               WARN [10/06/21 0:03:29:68] Failed to inherit Increment branch configuration, ended up with: master, origin/master
2021-10-06T00:03:29.6876735Z Falling back to develop branch config
2021-10-06T00:03:29.6877679Z               INFO [10/06/21 0:03:29:68] Begin: Attempting to inherit branch configuration from parent branch
2021-10-06T00:03:29.6879572Z                 INFO [10/06/21 0:03:29:68] HEAD is merge commit, this is likely a pull request using DevMerge-develop_cls-AH as base
2021-10-06T00:03:29.6898319Z                 INFO [10/06/21 0:03:29:68] Begin: Finding branch source of 'DevMerge-develop_cls-AH'
2021-10-06T00:03:29.6899580Z                   INFO [10/06/21 0:03:29:68] Multiple source branches have been found, picking the first one (master).
2021-10-06T00:03:29.6900595Z This may result in incorrect commit counting.
2021-10-06T00:03:29.6901278Z Options were:
2021-10-06T00:03:29.6901885Z master, origin/master
2021-10-06T00:03:29.6903513Z                 INFO [10/06/21 0:03:29:68] End: Finding branch source of 'DevMerge-develop_cls-AH' (Took: 0.10ms)
2021-10-06T00:03:29.6905761Z                 INFO [10/06/21 0:03:29:68] Begin: Getting branches containing the commit 'be18378'.
2021-10-06T00:03:29.6906840Z                   INFO [10/06/21 0:03:29:68] Trying to find direct branches.
2021-10-06T00:03:29.6911352Z                   INFO [10/06/21 0:03:29:68] No direct branches found, searching through all branches.
2021-10-06T00:03:29.6913430Z                   INFO [10/06/21 0:03:29:68] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.6915078Z                   INFO [10/06/21 0:03:29:68] The branch 'master' has a matching commit.
2021-10-06T00:03:29.6916772Z                   INFO [10/06/21 0:03:29:68] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.6918483Z                   INFO [10/06/21 0:03:29:68] The branch 'origin/master' has a matching commit.
2021-10-06T00:03:29.6920289Z                 INFO [10/06/21 0:03:29:68] End: Getting branches containing the commit 'be18378'. (Took: 0.35ms)
2021-10-06T00:03:29.6922107Z                 INFO [10/06/21 0:03:29:68] Begin: Getting branches containing the commit 'f626232'.
2021-10-06T00:03:29.6923151Z                   INFO [10/06/21 0:03:29:68] Trying to find direct branches.
2021-10-06T00:03:29.6924137Z                   INFO [10/06/21 0:03:29:68] No direct branches found, searching through all branches.
2021-10-06T00:03:29.6925747Z                   INFO [10/06/21 0:03:29:68] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.6929250Z                   INFO [10/06/21 0:03:29:68] The branch 'master' has no matching commits.
2021-10-06T00:03:29.6931172Z                   INFO [10/06/21 0:03:29:68] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.6932968Z                   INFO [10/06/21 0:03:29:68] The branch 'origin/master' has no matching commits.
2021-10-06T00:03:29.6934900Z                 INFO [10/06/21 0:03:29:68] End: Getting branches containing the commit 'f626232'. (Took: 0.35ms)
2021-10-06T00:03:29.6936248Z                 INFO [10/06/21 0:03:29:68] Found possible parent branches: master, origin/master
2021-10-06T00:03:29.6937634Z                 WARN [10/06/21 0:03:29:69] Failed to inherit Increment branch configuration, ended up with: master, origin/master
2021-10-06T00:03:29.6938712Z Falling back to develop branch config
2021-10-06T00:03:29.6939637Z                 INFO [10/06/21 0:03:29:69] Begin: Attempting to inherit branch configuration from parent branch
2021-10-06T00:03:29.6941630Z                   INFO [10/06/21 0:03:29:69] HEAD is merge commit, this is likely a pull request using DevMerge-develop_cls-AH as base
2021-10-06T00:03:29.6960554Z                   INFO [10/06/21 0:03:29:69] Begin: Finding branch source of 'DevMerge-develop_cls-AH'
2021-10-06T00:03:29.6961840Z                     INFO [10/06/21 0:03:29:69] Multiple source branches have been found, picking the first one (master).
2021-10-06T00:03:29.6962827Z This may result in incorrect commit counting.
2021-10-06T00:03:29.6963506Z Options were:
2021-10-06T00:03:29.6964114Z master, origin/master
2021-10-06T00:03:29.6965731Z                   INFO [10/06/21 0:03:29:69] End: Finding branch source of 'DevMerge-develop_cls-AH' (Took: 0.10ms)
2021-10-06T00:03:29.6967574Z                   INFO [10/06/21 0:03:29:69] Begin: Getting branches containing the commit 'be18378'.
2021-10-06T00:03:29.6973067Z                     INFO [10/06/21 0:03:29:69] Trying to find direct branches.
2021-10-06T00:03:29.6974209Z                     INFO [10/06/21 0:03:29:69] No direct branches found, searching through all branches.
2021-10-06T00:03:29.6976015Z                     INFO [10/06/21 0:03:29:69] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.6977709Z                     INFO [10/06/21 0:03:29:69] The branch 'master' has a matching commit.
2021-10-06T00:03:29.6979365Z                     INFO [10/06/21 0:03:29:69] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.6981077Z                     INFO [10/06/21 0:03:29:69] The branch 'origin/master' has a matching commit.
2021-10-06T00:03:29.6982843Z                   INFO [10/06/21 0:03:29:69] End: Getting branches containing the commit 'be18378'. (Took: 0.35ms)
2021-10-06T00:03:29.6985041Z                   INFO [10/06/21 0:03:29:69] Begin: Getting branches containing the commit 'f626232'.
2021-10-06T00:03:29.6986138Z                     INFO [10/06/21 0:03:29:69] Trying to find direct branches.
2021-10-06T00:03:29.6990922Z                     INFO [10/06/21 0:03:29:69] No direct branches found, searching through all branches.
2021-10-06T00:03:29.6992709Z                     INFO [10/06/21 0:03:29:69] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.6994417Z                     INFO [10/06/21 0:03:29:69] The branch 'master' has no matching commits.
2021-10-06T00:03:29.6996103Z                     INFO [10/06/21 0:03:29:69] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.6997810Z                     INFO [10/06/21 0:03:29:69] The branch 'origin/master' has no matching commits.
2021-10-06T00:03:29.6999639Z                   INFO [10/06/21 0:03:29:69] End: Getting branches containing the commit 'f626232'. (Took: 0.38ms)
2021-10-06T00:03:29.7000875Z                   INFO [10/06/21 0:03:29:69] Found possible parent branches: master, origin/master
2021-10-06T00:03:29.7002157Z                   WARN [10/06/21 0:03:29:69] Failed to inherit Increment branch configuration, ended up with: master, origin/master
2021-10-06T00:03:29.7003166Z Falling back to develop branch config
2021-10-06T00:03:29.7004082Z                   INFO [10/06/21 0:03:29:69] Begin: Attempting to inherit branch configuration from parent branch
2021-10-06T00:03:29.7016807Z                     INFO [10/06/21 0:03:29:69] HEAD is merge commit, this is likely a pull request using DevMerge-develop_cls-AH as base
2021-10-06T00:03:29.7023221Z                     INFO [10/06/21 0:03:29:70] Begin: Finding branch source of 'DevMerge-develop_cls-AH'
2021-10-06T00:03:29.7026349Z                       INFO [10/06/21 0:03:29:70] Multiple source branches have been found, picking the first one (master).
2021-10-06T00:03:29.7027366Z This may result in incorrect commit counting.
2021-10-06T00:03:29.7028029Z Options were:
2021-10-06T00:03:29.7028605Z master, origin/master
2021-10-06T00:03:29.7030322Z                     INFO [10/06/21 0:03:29:70] End: Finding branch source of 'DevMerge-develop_cls-AH' (Took: 0.11ms)
2021-10-06T00:03:29.7032232Z                     INFO [10/06/21 0:03:29:70] Begin: Getting branches containing the commit 'be18378'.
2021-10-06T00:03:29.7033648Z                       INFO [10/06/21 0:03:29:70] Trying to find direct branches.
2021-10-06T00:03:29.7034686Z                       INFO [10/06/21 0:03:29:70] No direct branches found, searching through all branches.
2021-10-06T00:03:29.7036369Z                       INFO [10/06/21 0:03:29:70] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.7041375Z                       INFO [10/06/21 0:03:29:70] The branch 'master' has a matching commit.
2021-10-06T00:03:29.7044949Z                       INFO [10/06/21 0:03:29:70] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.7046741Z                       INFO [10/06/21 0:03:29:70] The branch 'origin/master' has a matching commit.
2021-10-06T00:03:29.7048579Z                     INFO [10/06/21 0:03:29:70] End: Getting branches containing the commit 'be18378'. (Took: 0.34ms)
2021-10-06T00:03:29.7050506Z                     INFO [10/06/21 0:03:29:70] Begin: Getting branches containing the commit 'f626232'.
2021-10-06T00:03:29.7051595Z                       INFO [10/06/21 0:03:29:70] Trying to find direct branches.
2021-10-06T00:03:29.7052613Z                       INFO [10/06/21 0:03:29:70] No direct branches found, searching through all branches.
2021-10-06T00:03:29.7054261Z                       INFO [10/06/21 0:03:29:70] Searching for commits reachable from 'master'.
2021-10-06T00:03:29.7055839Z                       INFO [10/06/21 0:03:29:70] The branch 'master' has no matching commits.
2021-10-06T00:03:29.7057450Z                       INFO [10/06/21 0:03:29:70] Searching for commits reachable from 'origin/master'.
2021-10-06T00:03:29.7059526Z                       INFO [10/06/21 0:03:29:70] The branch 'origin/master' has no matching commits.
2021-10-06T00:03:29.7064738Z                     INFO [10/06/21 0:03:29:70] End: Getting branches containing the commit 'f626232'. (Took: 0.80ms)
2021-10-06T00:03:29.7066932Z                     INFO [10/06/21 0:03:29:70] Found possible parent branches: master, origin/master
2021-10-06T00:03:29.7068327Z                     WARN [10/06/21 0:03:29:70] Failed to inherit Increment branch configuration, ended up with: master, origin/master
2021-10-06T00:03:29.7069400Z Falling back to develop branch config
2021-10-06T00:03:29.7070352Z                     INFO [10/06/21 0:03:29:70] Begin: Attempting to inherit branch configuration from parent branch
2021-10-06T00:03:29.7072331Z                       INFO [10/06/21 0:03:29:70] HEAD is merge commit, this is likely a pull request using DevMerge-develop_cls-AH as base
2021-10-06T00:03:29.7125300Z                       INFO [10/06/21 0:03:29:70] Begin: Finding branch source of 'DevMerge-develop_cls-AH'
2021-10-06T00:03:29.7126585Z                         INFO [10/06/21 0:03:29:70] Multiple source branches have been found, picking the first one (master).
2021-10-06T00:03:29.7127626Z This may result in incorrect commit counting.

this repeats over and over until node times out, then im guessing azure doesn't know what to do with a +gb file.

I changed my config file from this:

mode: Mainline
increment: Inherit
continuous-delivery-fallback-tag: ''
branches:
  main:
    regex: ^master$|^main$|^origin/master$|^origin/main$

  develop:
    mode: ContinuousDeployment
    tag: beta
    increment: Inherit

to this:

mode: Mainline
increment: Inherit
continuous-delivery-fallback-tag: ''
branches:
  main:
    regex: ^master$|^main$|^origin/master$|^origin/main$

  develop:
    mode: ContinuousDeployment
    tag: beta
    increment: Inherit

  qa:
    regex: ^qa$|^origin/qa$
    source-branches: [ 'main', 'master' ]
    mode: ContinuousDeployment
    tag: useBranchName
    increment: Inherit

  develop_exos:
    regex: ^develop_.*$|^origin/develop_.*$
    source-branches: [ 'main', 'master' ]
    mode: ContinuousDeployment
    tag: useBranchName
    increment: Inherit

  release:
    regex: ^release$|^origin/release$
    source-branches: [ 'main', 'master' ]
    mode: ContinuousDeployment
    tag: useBranchName
    increment: Inherit

  qa_exos:
    regex: ^qa_.*$|^origin/qa_.*$
    source-branches: [ 'main', 'master' ]
    mode: ContinuousDeployment
    tag: useBranchName
    increment: Inherit

  uat_exos:
    regex: ^uat_.*$|^origin/uat_.*$
    source-branches: [ 'main', 'master' ]
    mode: ContinuousDeployment
    tag: useBranchName
    increment: Inherit

  release_exos:
    regex: ^release_.*$|^origin/release_.*$
    source-branches: [ 'main', 'master' ]
    mode: ContinuousDeployment
    tag: useBranchName
    increment: Inherit
    
ignore:
  sha: []
merge-message-formats: {}

which seems to have cleared the error and got us running again. But the bug is, gitversion should have protections in it to prevent it from getting locked in infinite loops. Maybe a global configuration for a max levels to traverse?

@asbjornu
Copy link
Member

asbjornu commented Oct 11, 2021

Thanks for figuring this one out, @scphantm!

But the bug is, gitversion should have protections in it to prevent it from getting locked in infinite loops.

Agreed.

Maybe a global configuration for a max levels to traverse?

As long as there is protection from infinity and we can inject a warning explaining that infinity was avoided, perhaps pointing to documentation explaining what you just discovered and how to circumvent it with configuration, I would like to avoid configurability if possible.

A PR implementing infinity protection would be highly appreciated! 🙏🏼

@scphantm
Copy link
Contributor Author

I looked at the code before and kinda got lost. Where's the recursion at?

@scphantm
Copy link
Contributor Author

i submitted a patch, but @asbjornu is going to have to refactor it into the current code base as im not able to run dot net 6 in any of my environments yet.

@hymccord
Copy link
Contributor

Do you have a minimal repro? You said you were able to get the issue to occur locally finally.

@scphantm
Copy link
Contributor Author

i do not. just my production repo. i have been trying to simulate it, but spent enough time on this. the recursion happens in the method i put the recursion check on. what happens is it tries to inherit the version, until it comes down to returning 2 branches to search, master and remote/master. i couldn't follow the logic very well because i couldn't figure out where you were going, but when that happens, every time the loop runs, it always returns master and remote/master as the loops to check. it seems like master is just looping back on itself. But i don't understand what the algorithm is doing so i barely knew what i was looking at.

@asbjornu asbjornu added this to the 5.x milestone Mar 3, 2022
@arturcic arturcic modified the milestones: 5.x, 5.8.3 Mar 5, 2022
@github-actions
Copy link

github-actions bot commented Mar 5, 2022

🎉 This issue has been resolved in version 5.8.3 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants