microsoft / AL-Go

The plug-and-play DevOps solution for Business Central app development on GitHub
MIT License
279 stars 114 forks source link

Default job time out can cause problems #153

Closed StefanMaron closed 1 year ago

StefanMaron commented 2 years ago

GitHub seems to have a job timeout of 6 hours.

When running the test current/next minor/next major agains all 49 countries each country build has only 7,3 minutes of time. In my case the job did not make it and failed.

Would it be possbile to have the timeout available as a setting to overwrite it? https://stackoverflow.com/questions/59073731/set-default-timeout-on-github-action-pipeline

Also, it was not that easy to find out which countries are availble since not every country has a localization. Some need to pull w1 artifacts, I think it was DZ. The build fails because it wants to pull artifacts for that country instead of w1. Not sure if there is an easy solution for this, or if this is even a problem. For me it would be easiest to have a "all countries" setting, but thats just a nice to have I guess :)

freddydk commented 2 years ago

All countries - agree, good idea. On the time-out - I will have a look.

Second, I think I want to add support for running the countries simultaneously - side by side. Using your own runners - some jobs will just wait until your runners are available for executing the job.

freddydk commented 2 years ago

job timeout is 6 hours and cannot be more (it can be set lower) https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration

workflow duration can be up to 72 hours. The idea of running countries side by side is probably the best solution.

freddydk commented 2 years ago

on dz, it should be mapped to w1:

$bcContainerHelperConfig.mapCountryCode
ae : w1
ar : w1
bd : w1
dz : w1
cl : w1
pr : w1
eg : w1
fo : dk
gl : dk
id : w1
ke : w1
lb : w1
lk : w1
lu : w1
ma : w1
mm : w1
mt : w1
my : w1
ng : w1
qa : w1
sa : w1
sg : w1
tn : w1
ua : w1
za : w1

Not sure why that doesn't happen

StefanMaron commented 2 years ago

Does that help? image

It seems like that mapping is not used.

The first try was with the countries of that list here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/compliance/apptest-countries-and-translations

then the build failed but told me which are not valid: image

Then I got the error with country code DZ. I managed to get the actual list of 49 countries by checking each country with Get-BCArtifactUrl and checking if w1 gets returned or not. I was not aware of the setting

freddydk commented 2 years ago

Does it make a difference if they are lower case? Looks like a bug, will investigate. The mapping should be automatic:

image

StefanMaron commented 2 years ago

If they are not lowercase it does not work. But I changed them to lowercase after I removed the ones mapping to w1 so I would need to test this

StefanMaron commented 2 years ago

I think this is why that does not work: https://github.com/microsoft/navcontainerhelper/blob/74bd262fc0af2296c571c3c6428b9aa1b48f5ec3/AppHandling/Run-AlPipeline.ps1#L768

The url is build manually using the country code from the settings instead of using Get-BCArtifactUrl

freddydk commented 2 years ago

yeah, but beforehand - it should have removed duplicates (the ones mapping to w1). Will investigate and see

freddydk commented 1 year ago

I have transferred this item to the backlog here: https://aka.ms/algoroadmap