AL-Go
AL-Go copied to clipboard
Duplicate workflow runs
Hey AL-GO gurus,
I got a question about duplicate worklow runs. When i update my feature branch, for which i already have PR open, it always runs two workflows - one for CICD and one for PullRequestBuild.
Is it like this by design? If yes, what is the logic behind it? Is there a way to avoid it? In the end, it doubles ours billing hours.
Best Regards, Gintautas
Interesting Problem.
Why do you automatically run builds on the feature branches?
We usually only run in PRs and for commits in main.
We switched to self-hosted runners that mitigates the billed hour problem at least a bit. But running duplicate builds is not a good solution. But I'm not sure if there is a good solution, if you need to run builds for every commit in your feature branches.
I think if the PR is a Draft it won't automatically trigger a build. Maybe that's viable?
The default CICDPushBranches value (https://aka.ms/algosettings#CICDPushBranches) does include feature/*. This means that if you have an open PR, you will get double builds - I will investigate whether there is anything we can do about that, but until then you have two options:
- you can use a different name for your feature branch
- you can change the CICDPushBranches in your repository or for the entire organization if you like.
Thanks @freddydk , We already adjusted the CICDPushBranches. Just wanted to bring it to your awareness, since it's default behavior of AL-GO
p.s. having CI/CD on feature branch, might be nice for the bigger developments, that you want to deploy to dedicated environment for testing. We used it basically for running autotests without creating PR (or draft PR) yet.