question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`concurrency` with properties now causes "syntax error"

See original GitHub issue

By making a trivial change to an existing test_build.yaml, GitHub Actions complains about a syntax error in the concurrency property.

Invalid workflow file : .github/workflows/test_build.yaml#L3
You have an error in your yaml syntax on line 3
  • I’m running in the github.com Actions environment, not my own.
  • If I re-order the properties it remains broken.
  • If I remove the properties from concurrency it works again.
  • I’ve validated that the yaml is valid yaml. So the error is confusing and unhelpful.

Note: This exact yaml file has been working for months. The only change I made was to rename a job.

Broken Example

name: Project CI
concurrency:
  cancel-in-progress: true  # "Syntax error" here?
  group: muffins
on:
  pull_request:
    branches: [devel, staging, prod]
  push:
    branches: [devel, staging, prod]
jobs:
  test_ui:
    defaults:
      run:
        working-directory: ./ui
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2
      - name: Install Node
        uses: actions/setup-node@v2
        with:
          node-version: 16
      - run: npm ci
      - run: npm run validate

Working Example

name: Project CI
concurrency: muffins
on:
  pull_request:
    branches: [devel, staging, prod]
  push:
    branches: [devel, staging, prod]
jobs:
  test_ui:
    defaults:
      run:
        working-directory: ./ui
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2
      - name: Install Node
        uses: actions/setup-node@v2
        with:
          node-version: 16
      - run: npm ci
      - run: npm run validate

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:72
  • Comments:30 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
mrparkerscommented, Dec 3, 2021

I don’t think I’m the biggest fan of the “silently fix the issue without acknowledging its existence” approach that GitHub seems to have taken here, but I suppose I’m glad that my workflow is working again.

15reactions
mrparkerscommented, Dec 3, 2021

I have also posted an issue about this on the community page: https://github.community/t/breaking-change-to-concurrency-group-syntax/215604

A lot of folks appear to be affected by this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Coffee Script Compilation Syntax Error after ...
After upgrading from Rails 5.2.4.2 to Rails 6.0.2.2 I am now getting a coffee script compilation error, but ExecJs does not specify the...
Read more >
Logstash syntax error
Hi Team, I have logstash on two servers. It seems its working as index are getting created and logstash service is running from...
Read more >
SyntaxError: missing } after function body - MDN Web Docs
The JavaScript exception "missing } after function body" occurs when there is a syntax mistake when creating a function somewhere.
Read more >
SyntaxError: missing : after property id - JavaScript | MDN
The JavaScript exception "missing : after property id" occurs when objects are created using the object initializer syntax. A colon ( : )...
Read more >
Concurrent function in Power Apps - Power Platform
The Concurrent function allows multiple formulas specified within the same property to be evaluated at the same time if they have connector ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found