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

concurrency with properties now causes "syntax error" #1532

Closed
ablakey opened this issue Dec 3, 2021 · 30 comments
Closed

concurrency with properties now causes "syntax error" #1532

ablakey opened this issue Dec 3, 2021 · 30 comments
Labels
bug Something isn't working

Comments

@ablakey
Copy link

ablakey commented Dec 3, 2021

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
@ablakey ablakey added the bug Something isn't working label Dec 3, 2021
@frenck
Copy link

frenck commented Dec 3, 2021

Confirmed on this end as well, workflows for Home Assistant are broken because of this.

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

☝️ is marked as invalid YAML in the group line.

@scottfavre
Copy link

We are seeing this across all workflows with concurrency blocks like:

concurrency: 
  group: ${{ github.event.inputs.identifier }}
  cancel-in-progress: true

@kraftbj
Copy link

kraftbj commented Dec 3, 2021

It also appears to be breaking without any changes to the workflow file. https://github.com/Automattic/jetpack/actions/runs/1535959387/workflow with the last change on Oct 26th.

@sudo-something
Copy link

+1 As of this morning, all my workflows are failing with a syntax error on the line defining the concurrency group value.

@yuriydzobak
Copy link

+1

@marcellp
Copy link

marcellp commented Dec 3, 2021

Yup, we started experiencing this problem at around 15:52 GMT (se the run here with the error). We narrowed it down to the issue to concurrency being
given an object as a value instead of the default (which is string). I spent about an hour debugging it, good to know it was GitHub Actions.

@ebk45
Copy link

ebk45 commented Dec 3, 2021

+1 we've got the same issue on all of our repositories and all syntax issues are pointing at the concurrency property.

@shshe
Copy link

shshe commented Dec 3, 2021

Our pipelines have all stopped as well. The Github Actions status at https://www.githubstatus.com/ is still showing "Normal" - is there any acknowledgement of this issue on Github's side?

@justin-masse
Copy link

+1 same issue here when using "group" on concurrency

@johnnybenson
Copy link

Yes, can't / won't deploy without working jobs.

Removing the concurrency setting all together lets the jobs run successfully.

But you know, don't want to do that.

@darrenswhite
Copy link

+1 same issue

@mrparkers
Copy link

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

A lot of folks appear to be affected by this.

@famod
Copy link

famod commented Dec 3, 2021

FTR, fails for https://github.com/quarkusio/quarkus as well:

concurrency:
  group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
  cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'quarkusio/quarkus' }}

mudler added a commit to rancher/elemental-toolkit that referenced this issue Dec 3, 2021
Temporary workaround for actions/runner#1532

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
mudler added a commit to rancher/elemental-toolkit that referenced this issue Dec 3, 2021
Temporary workaround for actions/runner#1532

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
@drdavella
Copy link

Can confirm, getting the same error with this configuration:

concurrency:
  group: ${{ github.ref }}
  cancel-in-progress: true

@amirtoole
Copy link

We're experiencing this as well; our current workaround:

concurrency:
  group: ${{ (github.event_name == 'pull_request' && github.event.pull_request.number) || github.head_ref }}
  cancel-in-progress: true

@ashb
Copy link

ashb commented Dec 3, 2021

@amirtoole You are my hero.

@ablakey
Copy link
Author

ablakey commented Dec 3, 2021

It seems that the original problem is no-longer happening. I reverted to my original .yaml file and it works now without complaining about a syntax error.

@frenck
Copy link

frenck commented Dec 3, 2021

Confirmed, reverting worked for us as well. Thanks for keeping us posted @ablakey 👍

@mrparkers
Copy link

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.

@drdavella
Copy link

@mrparkers It's possible they resolved this issue without being aware of this ticket yet, but I agree with what you're saying.

@ablakey
Copy link
Author

ablakey commented Dec 3, 2021

I'll leave this issue open to give the GitHub Actions team an opportunity to chime in on how it was resolved. It's possibly too soon to assume it was a stealth fix.

@frenck
Copy link

frenck commented Dec 3, 2021

@drdavella I'm pretty sure they are aware, as I've had escalated it with them. Lets await and see.

@ashb
Copy link

ashb commented Dec 3, 2021

My guess is they noticed by elevated numbers of builds failing and rolled back the change before the support message made it to them.

@JamesKyburz
Copy link

seems to be working now

@androidacy-user
Copy link

People, do everyone a favor and instead of useless "+1" or "me too" or similar comments, hit the thumbs up button on the original post. Thank you.

@frenck
Copy link

frenck commented Dec 5, 2021

In a response from GitHub I was told engineers were on it before reports came in. Anyways, still this issue is open at this point.

@ethomson
Copy link
Contributor

ethomson commented Dec 8, 2021

We believe that this has been resolved, so I'm closing this. Please let me know if you're still seeing problems here.

@ethomson ethomson closed this as completed Dec 8, 2021
@frenck
Copy link

frenck commented Dec 8, 2021

@ethomson Could you elaborate on the incident a bit? Instead of just closing it...?

@ethomson
Copy link
Contributor

ethomson commented Dec 8, 2021

This wasn't a runner bug, so I don't have complete details.

We were making a change to the way concurrency is supported for reusable workflows and introduced a bug parsing some workflows with groups specified under concurrency. We rolled back the feature changes when we became aware of problems in production. We've added additional monitoring and tests for these configurations so that we will not have similar issues in the future.

@nitrocode
Copy link

nitrocode commented Jan 28, 2022

hit this issue again and our workaround was to comment it out

# concurrency:
#   group: ${{ github.ref }}
#   cancel-in-progress: true

but @amirtoole's workaround is promising!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests