php-src icon indicating copy to clipboard operation
php-src copied to clipboard

Azure pipelines CI stopped working

Open cmb69 opened this issue 4 years ago • 15 comments

Description

Our Azure pipelines CI stopped working about a week ago with

##[error]No hosted parallelism has been purchased or granted. To request a free parallelism grant, please fill out the following form https://aka.ms/azpipelines-parallelism-request

@nikic requested a free parallelism grant, and for about a day CI worked nicely, before it failed again with the same issue. @martinwoodward, could you please have a look.

PHP Version

n/a

Operating System

n/a

cmb69 avatar Feb 09 '22 10:02 cmb69

Looking now. Longer term we probably want to move these projects over to GitHub Actions but checking now with the team to get you unblocked.

martinwoodward avatar Feb 09 '22 10:02 martinwoodward

Did you happen to get a support ticket reference the first time you filled out the form? I'm trying to track things through.

martinwoodward avatar Feb 09 '22 11:02 martinwoodward

@martinwoodward Thanks for checking this! I filled out the form for the first time on the 3rd of February but I can't see a ticket reference in the response. The request got rejected by v-niezz a few hours later. After that Nikita tried again. I'm not sure if he got a ticket reference in his e-mail. That one got accepted but as Christoph mentioned it stopped working a day later.

iluuu1994 avatar Feb 09 '22 12:02 iluuu1994

Thanks - still digging. The folks I want to speak to next should be awake in the next 2 hours or so.

martinwoodward avatar Feb 09 '22 12:02 martinwoodward

My current hypothesis is that php got caught up in some mitigations that were put in place to resolve this incident. https://status.dev.azure.com/_event/287959626

Working with that team to verify and fix. Longer term I think GitHub Actions is going to be the best place for these CI jobs so let me know if you need help getting there, but will keep working to try and get your builds restored.

martinwoodward avatar Feb 09 '22 14:02 martinwoodward

Thanks for keeping in touch! :)

I agree that switching to GH actions is likely the way to go in the long run.

cmb69 avatar Feb 09 '22 15:02 cmb69

You should be back up now. Was unrelated to the other incident. Lmk how it goes but def be good to switch to GitHub Actions at some point in the future. If you need help or more parallelism etc to make actions work for you just let me know.

martinwoodward avatar Feb 09 '22 20:02 martinwoodward

Indeed, seems to work again. Thank you very much, @martinwoodward!

cmb69 avatar Feb 10 '22 13:02 cmb69

I started working on migrating to GitHub actions yesterday. So far it seems to work well. https://github.com/iluuu1994/php-src/pull/2

The main problem I've experienced is that our nightly build tests a variety of platforms, configurations and branches in all combinations. That's 20 jobs for 4 maintained branches, so 80 in total. https://github.com/php/php-src/blob/master/azure-pipelines.yml#L30-L122 That sounds like a lot.

GitHub only runs schedules on the default branch and it doesn't look like jobs can created in a loop, like per branch in our example. So I created a script to generate the nightly configuration instead. https://github.com/iluuu1994/php-src/pull/2/files#diff-349b1103b0646547c52451e80b4b20b700214b3f02364b9c8c666ef284ad64bb The result is a ~2000 file (which is incomplete, multiple jobs are still missing per branch).

If there's a better way to do this, please let me know.

iluuu1994 avatar Feb 10 '22 21:02 iluuu1994

I started working on migrating to GitHub actions yesterday. So far it seems to work well. iluuu1994#2

The main problem I've experienced is that our nightly build tests a variety of platforms, configurations and branches in all combinations. That's 20 jobs for 4 maintained branches, so 80 in total. https://github.com/php/php-src/blob/master/azure-pipelines.yml#L30-L122 That sounds like a lot.

GitHub only runs schedules on the default branch and it doesn't look like jobs can created in a loop, like per branch in our example. So I created a script to generate the nightly configuration instead. https://github.com/iluuu1994/php-src/pull/2/files#diff-349b1103b0646547c52451e80b4b20b700214b3f02364b9c8c666ef284ad64bb The result is a ~2000 file (which is incomplete, multiple jobs are still missing per branch).

On Azure Pipelines our nightly builds only ran for a branch if there were new commits. In particular, this means that the PHP-7.4 branch gets built only very rarely. Do you think there is some way to replicate that?

nikic avatar Feb 10 '22 22:02 nikic

@nikic That would make much more sense. It seems checking paths is only possible for the push event atm (or push to PRs).

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore

Edit

Maybe something like this: https://github.community/t/trigger-action-on-schedule-only-if-there-are-changes-to-the-branch/17887/4

iluuu1994 avatar Feb 10 '22 22:02 iluuu1994

FWIW: It appears to be dead again: https://github.com/php/php-src/pull/7921


If there's a better way to do this, please let me know.

@iluuu1994

You can dynamically generate a JSON configuration using a job and use this to spawn new jobs. Have a look at how we did this in HAProxy (using Python): https://github.com/haproxy/haproxy/blob/58a7704d5404118c74b36314aea135b3eb6f6dbe/.github/workflows/vtest.yml#L20-L38

TimWolla avatar Feb 11 '22 08:02 TimWolla

@TimWolla Thanks! I wasn't aware of that. It's slightly complicated by the fact that we use quite different stages per architecture but since they're extracted to separate actions this should work fine.

~~I also just noticed another annoyance: Using local composite actions means that for nightly to work we have to merge the CI configuration into the lowest supported branch and merge the changes upstream, as it relies on checkout out the code of the given branch. We could directly embed the actions in the workflow file but that would generate an enormous file.~~ Edit That's irrelevant because that will be necessary either way, just to make normal push jobs work.

@martinwoodward Do you think it makes sense to investigate the Azure DevOps error again? If not, we can close this issue and continue discussion about moving to GitHub actions elsewhere.

iluuu1994 avatar Feb 11 '22 10:02 iluuu1994

The Azure Pipelines builds will come back soon - just been talking to the team again about it. There is nothing on your end to do so feel free to close this issue. I can report back here anyway once the team have a high degree of confidence the issue is permanently fixed.

martinwoodward avatar Feb 13 '22 19:02 martinwoodward

Ok, thanks @martinwoodward

iluuu1994 avatar Feb 13 '22 20:02 iluuu1994