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

Maximum task call exceeded when looping over tasks #1321

Closed
bogwro opened this issue Aug 31, 2023 · 2 comments
Closed

Maximum task call exceeded when looping over tasks #1321

bogwro opened this issue Aug 31, 2023 · 2 comments
Labels
area: loops Changes related to looping over tasks/commands. type: bug Something not working as intended.

Comments

@bogwro
Copy link

bogwro commented Aug 31, 2023

  • Task version: v3.29.1 (h1:q4mqGSR40qTOf9XZp2ySY3cM6enb2d+AqaxI/pEBiLk=)
  • Operating system: Linux (Ubuntu 22.04.3 LTS)
  • Experiments enabled: No

Issue

Running task loop-over-tasks fails with error:

task: Failed to run task "loop-over-tasks": task: Maximum task call exceeded (0) for task "my-task": probably an cyclic dep or infinite loop

Taskfile:

version: '3'

vars:
  RANGE: '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120'

tasks:

  # this works:
  default:
    vars:
      MY_VAR: '{{.RANGE}}'
    cmds:
      - for:
          var: MY_VAR
          split: ','
        cmd: echo {{.ITEM}}

  # issue:
  loop-over-tasks:
    vars:
      MY_VAR: '{{.RANGE}}'
    cmds:
      - for:
          var: MY_VAR
          split: ','
        task: my-task
        vars:
          NUMBER: '{{.ITEM}}'

  my-task:
    cmds:
      - echo '{{.NUMBER}}'

Expected output

It should behave in the same way as running task:

task: [default] echo 0
0
task: [default] echo 1
1
task: [default] echo 2
2
task: [default] echo 3
3
task: [default] echo 4
4
task: [default] echo 5
5
task: [default] echo 6
6
task: [default] echo 7
7
task: [default] echo 8
8
task: [default] echo 9
9
task: [default] echo 10
10
task: [default] echo 11
11
task: [default] echo 12
12
task: [default] echo 13
13
task: [default] echo 14
14
task: [default] echo 15
15
task: [default] echo 16
16
task: [default] echo 17
17
task: [default] echo 18
18
task: [default] echo 19
19
task: [default] echo 20
20
task: [default] echo 21
21
task: [default] echo 22
22
task: [default] echo 23
23
task: [default] echo 24
24
task: [default] echo 25
25
task: [default] echo 26
26
task: [default] echo 27
27
task: [default] echo 28
28
task: [default] echo 29
29
task: [default] echo 30
30
task: [default] echo 31
31
task: [default] echo 32
32
task: [default] echo 33
33
task: [default] echo 34
34
task: [default] echo 35
35
task: [default] echo 36
36
task: [default] echo 37
37
task: [default] echo 38
38
task: [default] echo 39
39
task: [default] echo 40
40
task: [default] echo 41
41
task: [default] echo 42
42
task: [default] echo 43
43
task: [default] echo 44
44
task: [default] echo 45
45
task: [default] echo 46
46
task: [default] echo 47
47
task: [default] echo 48
48
task: [default] echo 49
49
task: [default] echo 50
50
task: [default] echo 51
51
task: [default] echo 52
52
task: [default] echo 53
53
task: [default] echo 54
54
task: [default] echo 55
55
task: [default] echo 56
56
task: [default] echo 57
57
task: [default] echo 58
58
task: [default] echo 59
59
task: [default] echo 60
60
task: [default] echo 61
61
task: [default] echo 62
62
task: [default] echo 63
63
task: [default] echo 64
64
task: [default] echo 65
65
task: [default] echo 66
66
task: [default] echo 67
67
task: [default] echo 68
68
task: [default] echo 69
69
task: [default] echo 70
70
task: [default] echo 71
71
task: [default] echo 72
72
task: [default] echo 73
73
task: [default] echo 74
74
task: [default] echo 75
75
task: [default] echo 76
76
task: [default] echo 77
77
task: [default] echo 78
78
task: [default] echo 79
79
task: [default] echo 80
80
task: [default] echo 81
81
task: [default] echo 82
82
task: [default] echo 83
83
task: [default] echo 84
84
task: [default] echo 85
85
task: [default] echo 86
86
task: [default] echo 87
87
task: [default] echo 88
88
task: [default] echo 89
89
task: [default] echo 90
90
task: [default] echo 91
91
task: [default] echo 92
92
task: [default] echo 93
93
task: [default] echo 94
94
task: [default] echo 95
95
task: [default] echo 96
96
task: [default] echo 97
97
task: [default] echo 98
98
task: [default] echo 99
99
task: [default] echo 100
100
task: [default] echo 101
101
task: [default] echo 102
102
task: [default] echo 103
103
task: [default] echo 104
104
task: [default] echo 105
105
task: [default] echo 106
106
task: [default] echo 107
107
task: [default] echo 108
108
task: [default] echo 109
109
task: [default] echo 110
110
task: [default] echo 111
111
task: [default] echo 112
112
task: [default] echo 113
113
task: [default] echo 114
114
task: [default] echo 115
115
task: [default] echo 116
116
task: [default] echo 117
117
task: [default] echo 118
118
task: [default] echo 119
119
task: [default] echo 120
120

Actual output

task: [my-task] echo '0'
0
task: [my-task] echo '1'
1
task: [my-task] echo '2'
2
task: [my-task] echo '3'
3
task: [my-task] echo '4'
4
task: [my-task] echo '5'
5
task: [my-task] echo '6'
6
task: [my-task] echo '7'
7
task: [my-task] echo '8'
8
task: [my-task] echo '9'
9
task: [my-task] echo '10'
10
task: [my-task] echo '11'
11
task: [my-task] echo '12'
12
task: [my-task] echo '13'
13
task: [my-task] echo '14'
14
task: [my-task] echo '15'
15
task: [my-task] echo '16'
16
task: [my-task] echo '17'
17
task: [my-task] echo '18'
18
task: [my-task] echo '19'
19
task: [my-task] echo '20'
20
task: [my-task] echo '21'
21
task: [my-task] echo '22'
22
task: [my-task] echo '23'
23
task: [my-task] echo '24'
24
task: [my-task] echo '25'
25
task: [my-task] echo '26'
26
task: [my-task] echo '27'
27
task: [my-task] echo '28'
28
task: [my-task] echo '29'
29
task: [my-task] echo '30'
30
task: [my-task] echo '31'
31
task: [my-task] echo '32'
32
task: [my-task] echo '33'
33
task: [my-task] echo '34'
34
task: [my-task] echo '35'
35
task: [my-task] echo '36'
36
task: [my-task] echo '37'
37
task: [my-task] echo '38'
38
task: [my-task] echo '39'
39
task: [my-task] echo '40'
40
task: [my-task] echo '41'
41
task: [my-task] echo '42'
42
task: [my-task] echo '43'
43
task: [my-task] echo '44'
44
task: [my-task] echo '45'
45
task: [my-task] echo '46'
46
task: [my-task] echo '47'
47
task: [my-task] echo '48'
48
task: [my-task] echo '49'
49
task: [my-task] echo '50'
50
task: [my-task] echo '51'
51
task: [my-task] echo '52'
52
task: [my-task] echo '53'
53
task: [my-task] echo '54'
54
task: [my-task] echo '55'
55
task: [my-task] echo '56'
56
task: [my-task] echo '57'
57
task: [my-task] echo '58'
58
task: [my-task] echo '59'
59
task: [my-task] echo '60'
60
task: [my-task] echo '61'
61
task: [my-task] echo '62'
62
task: [my-task] echo '63'
63
task: [my-task] echo '64'
64
task: [my-task] echo '65'
65
task: [my-task] echo '66'
66
task: [my-task] echo '67'
67
task: [my-task] echo '68'
68
task: [my-task] echo '69'
69
task: [my-task] echo '70'
70
task: [my-task] echo '71'
71
task: [my-task] echo '72'
72
task: [my-task] echo '73'
73
task: [my-task] echo '74'
74
task: [my-task] echo '75'
75
task: [my-task] echo '76'
76
task: [my-task] echo '77'
77
task: [my-task] echo '78'
78
task: [my-task] echo '79'
79
task: [my-task] echo '80'
80
task: [my-task] echo '81'
81
task: [my-task] echo '82'
82
task: [my-task] echo '83'
83
task: [my-task] echo '84'
84
task: [my-task] echo '85'
85
task: [my-task] echo '86'
86
task: [my-task] echo '87'
87
task: [my-task] echo '88'
88
task: [my-task] echo '89'
89
task: [my-task] echo '90'
90
task: [my-task] echo '91'
91
task: [my-task] echo '92'
92
task: [my-task] echo '93'
93
task: [my-task] echo '94'
94
task: [my-task] echo '95'
95
task: [my-task] echo '96'
96
task: [my-task] echo '97'
97
task: [my-task] echo '98'
98
task: Failed to run task "loop-over-tasks": task: Maximum task call exceeded (0) for task "my-task": probably an cyclic dep or infinite loop
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Aug 31, 2023
@pd93 pd93 added type: bug Something not working as intended. area: loops Changes related to looping over tasks/commands. and removed state: needs triage Waiting to be triaged by a maintainer. labels Sep 1, 2023
@andreynering
Copy link
Member

Raised the limit from 100 to 1000 for now. For more information see #1332.

@bogwro
Copy link
Author

bogwro commented Oct 9, 2023

Raised the limit from 100 to 1000 for now. For more information see #1332.

That should unblock me in the context of the current problem-solving/implementation.
Thank you 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: loops Changes related to looping over tasks/commands. type: bug Something not working as intended.
Projects
None yet
Development

No branches or pull requests

4 participants