Azure / Azure/static-web-apps

Github/Oryx build has fixed 15 minute build timeout

Open
#1,161 2 comments 0 reactions 1 assignee Claimed by @thomasgauvin View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

My CI/CD action file on github builds and deploys an Angular SPA to an Azure Static Web App. The build duration is a little random (usually between 14.8 minutes to 15+ minutes). As long as the build takes less than 15 minutes, it succeeds and deploys. However, any time the build exceeds 15 minutes...it forcibly reaches a timeout and is aborted.

> Oryx has timed out while building app, the current limit is 15 minutes. Failing build.

I have not seen anywhere in github literature indicating that (1) such a 15 minute limit exists and accordingly (2) I've seen nothing indicating how to solve it. I think this is a problem exclusive to the `Azure/static-web-apps-deploy@v1` action ([repo here](https://github.com/Azure/static-web-apps-deploy)).

The job that has the timeout errors looks like this:

```
jobs:
build_and_deploy_job:
timeout-minutes: 30
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_RED_CLIFF_0183FBE0F }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/alirrium-rfp-poc" # App source code path
api_location: "" # Api source code path - optional
output_location: "dist/alirrium-rfp-poc" # Built app content directory - optional
app_build_command: "npm run build -- --configuration=testing" # Custom build command for app content - optional
###### End of Repository/Build Configurations ######
```
Please notice that in the above job, I have inserted a `timeout-minutes: 30` directive. Two observations about that directive. First, I found that directive in some random repo rather than in github documentation. Obviously it is not being acknowledged, but at least the build-system doesn't complain about it. Second, I have anecdotal evidence to suggest that the `timeout-minutes` directive is honored _only if an `app_build_command` custom command is not configured_. As is, I need the custom command.

To iterate again, [github doesn't say anything about the existence of a 15 minute timeout limit](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits). And yet this timeout is happening any time the build happens to exceed 15 minutes.

It seems like there are two bugs here:

- There is no reason for there to be a 15 minute limit in the first place, particularly when github documentation states `Each job in a workflow can run for up to 6 hours of execution time`.
- The `timeout-minutes` directive should be honored, regardless of whether a `app_build_command` custom build command is or is not given.

**Device info (if applicable):**
- OS: This is an Oryx build of an Angular SPA, configured to build with Node 14.16.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.