<#611 Fixing max parallelism> Pull request opened ...
# flyte-github
c
#611 Fixing max parallelism Pull request opened by pingsutw TL;DR I run two tasks in a workflow, but max Parallelism is being set to 4.
Copy code
{"json":{"exec_id":"ahcxqvqbwjs5zczg8d9b","node":"n0","ns":"flytesnacks-development","res_ver":"180043","routine":"worker-2","src":"handler.go:582","tasktype":"python-task","wf":"flytesnacks:development:<http://getting_start.wf|getting_start.wf>"},"level":"info","msg":"Parallelism now set to [1].","ts":"2023-08-29T14:37:15-07:00"}
{"json":{"exec_id":"ahcxqvqbwjs5zczg8d9b","node":"n0","ns":"flytesnacks-development","res_ver":"180043","routine":"worker-2","src":"handler.go:540","tasktype":"python-task","wf":"flytesnacks:development:<http://getting_start.wf|getting_start.wf>"},"level":"info","msg":"Parallelism now set to [2].","ts":"2023-08-29T14:37:15-07:00"}
{"json":{"exec_id":"ahcxqvqbwjs5zczg8d9b","node":"n0","ns":"flytesnacks-development","res_ver":"180043","routine":"worker-2","src":"handler.go:91","wf":"flytesnacks:development:<http://getting_start.wf|getting_start.wf>"},"level":"info","msg":"regular node detected, (no future file found)","ts":"2023-08-29T14:37:15-07:00"}
{"json":{"exec_id":"ahcxqvqbwjs5zczg8d9b","node":"n1","ns":"flytesnacks-development","res_ver":"180043","routine":"worker-2","src":"handler.go:183","wf":"flytesnacks:development:<http://getting_start.wf|getting_start.wf>"},"level":"info","msg":"Dynamic handler.Handle's called with phase 0.","ts":"2023-08-29T14:37:15-07:00"}
{"json":{"exec_id":"ahcxqvqbwjs5zczg8d9b","node":"n1","ns":"flytesnacks-development","res_ver":"180043","routine":"worker-2","src":"handler.go:582","tasktype":"python-task","wf":"flytesnacks:development:<http://getting_start.wf|getting_start.wf>"},"level":"info","msg":"Parallelism now set to [3].","ts":"2023-08-29T14:37:15-07:00"}
{"json":{"exec_id":"ahcxqvqbwjs5zczg8d9b","node":"n1","ns":"flytesnacks-development","res_ver":"180043","routine":"worker-2","src":"handler.go:540","tasktype":"python-task","wf":"flytesnacks:development:<http://getting_start.wf|getting_start.wf>"},"level":"info","msg":"Parallelism now set to [4].","ts":"2023-08-29T14:37:15-07:00"}
We use defer func to update the max parallelism, so we don't need to update the parallelism in other places in the
handle()
Type ☑︎ Bug Fix ☐ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☐ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description ^^^ Tracking Issue NA Follow-up issue NA flyteorg/flytepropeller GitHub Actions: Build & Push Flytepropeller Image GitHub Actions: Goreleaser GitHub Actions: Bump Version ✅ 11 other checks have passed 11/14 successful checks
a