Skip to content

GH Sync: trigging two syncs at the same causes a fail #1599

Open

Description

@josephjclark

If you somehow trigger two swift Save&Syncs, and two pull actions run at the same time, one will probably fail because it thinks it's diverged from main.

 To https://github.com/fcruzp/openfn-sandbox-tut
   ! [rejected]        HEAD -> main (non-fast-forward)
  error: failed to push some refs to 'https://github.com/fcruzp/openfn-sandbox-tut'
  hint: Updates were rejected because the tip of your current branch is behind
  hint: its remote counterpart. If you want to integrate the remote changes,
  hint: use 'git pull' before pushing again.
  hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  Error: Invalid status code: 1
      at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v7/index.js:17:19)
      at ChildProcess.emit (node:events:509:28)
      at maybeClose (node:internal/child_process:1141:16)
      at ChildProcess._handle.onexit (node:internal/child_process:306:5) {
    code: 1
  }

This will look strange because how does a fresh pull of main conflict from itself? But it's only because the other action commited in between.

We should do something to maybe ensure only a single action runs at once, or print a more helpful error messsage or something

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      New Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions