Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeoutinMinutes doesn't work for single job format #48

Closed
geofflamrock opened this issue Nov 8, 2018 · 11 comments
Closed

timeoutinMinutes doesn't work for single job format #48

geofflamrock opened this issue Nov 8, 2018 · 11 comments

Comments

@geofflamrock
Copy link

When using the full syntax for jobs the timeoutInMinutes can be set at the same level as the job. From the docs:

jobs:
- job: string
  timeoutInMinutes: number
  cancelTimeoutInMinutes: number
  strategy:
    maxParallel: number
    # note: `parallel` and `matrix` are mutually exclusive
    # you may specify one or the other; including both is an error
    parallel: number
    matrix: { string: { string: string } }
  pool:
    name: string
    demands: string | [ string ]

  container: string

  steps:
    - script: echo Hello world

However if I set it when using the single-job syntax the build pipeline fails with error "Unexpected value 'timeoutInMinutes'"

If I move the timeoutInMinutes into the pool element it works ok.

If this is by design then it might be worth updating the docs to indicate this.

Thanks :)

@mikeharder
Copy link

I do see a few places in the docs which specify the single-job format implies default options:

Note: If you have only one job, you can use single-job syntax which omits many of the keywords here.
https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#job

You can skip the job syntax if you need only a single job with the standard options.
https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?tabs=yaml&view=azure-devops

@geofflamrock
Copy link
Author

Thanks @mikeharder I guess my point was more that in the full syntax the timeoutInMinutes lives at the top level within a job, so I was expecting it to live at the same level in the single job syntax but it doesn't, it lives in pool of which there is no mention in the docs. Other properties in the full syntax work the same way in the single syntax but this property doesn't.

@Madushani
Copy link

Madushani commented Jun 7, 2019

trigger:

  • master

jobs:

  • job: Package
    timeoutInMinutes: 120

    pool:
    name: 'Hosted Ubuntu 1604'

    steps:

    • task: Maven@3
      inputs:
      mavenPomFile: 'pom.xml'
      mavenOptions: '-Xmx3072m'
      javaHomeOption: 'JDKVersion'
      jdkVersionOption: '1.8'
      jdkArchitectureOption: 'x64'
      publishJUnitResults: false
      testResultsFiles: '**/surefire-reports/TEST-*.xml'
      goals: 'install'

It still throwing these errors
Job issues

The agent has received a shutdown signal. This can happen when the agent service is stopped, or a manually started agent is canceled. @ geofflamrock , @mikeharder do you have an idea ?

jcvenegas added a commit to kata-containers/packaging that referenced this issue Jun 28, 2019
azure pipelines have a 60 minutes default per job. Public
jobs can run for 3 hours but seems that we need to move
to a different format.

See: microsoft/azure-pipelines-yaml#48

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
@lukeschlather
Copy link

It's accepted under the pool key but it seems to have no effect. It seems impossible to set a timeout with the standard single-job format.

@Saibamen
Copy link

Related: microsoft/azure-pipelines-agent#1849

@Saibamen
Copy link

I have a question: @geofflamrock says: If I move the timeoutInMinutes into the pool element it works ok.,
@lukeschlather: It's accepted under the pool key but it seems to have no effect. It seems impossible to set a timeout with the standard single-job format.

So: How to change timeout in any possible way? With example, please. I don't care it is for all pipeline or one/two/three jobs.

@stale
Copy link

stale bot commented Apr 25, 2020

In order to consolidate to fewer feedback channels, we've moved suggestions and issue reporting to Developer Community. Sorry for any confusion resulting from this move.

@stale stale bot closed this as completed Apr 26, 2020
@Saibamen
Copy link

@Saibamen
Copy link

@geofflamrock
Copy link
Author

Thanks @Saibamen I've tested and it's now working as documented, I've replied back on the other link.

@MS-Manikandan
Copy link

I have added timeoutInMinutes for vstest task which is defined in a yaml template, when I pass the parameter for timeoutInMinutes it's not considering the value. Can anyone let me know if timeoutInMinutes is supported for all tasks or if the specific task has to support it so does it works ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants