I don't know Ruby, and I'm not entirely familiar with how everything in this app works, so this is a bit of a shot in the dark.
I will use a simplified version of my current setup to try to describe what I suspect is happening.
I have 3 files, en.pot, es.pot, and fr.pot.
- I make a change to
en.pot and commit/push directly to master
- That updated file is sent to Transifex via Txgh.
es.pot and fr.pot are updated in Transifex to have this new entry
- Transifex fires off 2 webhook requests to Txgh, one for
es.pot and one for fr.pot, both very close to each other in terms of timing
- Txgh creates a new commit for
es.pot, using the current base_commit as the parent commit.
- At roughly the same time, Txgh creates a new commit for
fr.pot, also using this same base_commit as the parent commit.
- The first commit is successfully pushed to
master, but the 2nd commit fails with the error:
- Update is not a fast forward // See: https://developer.github.com/v3/git/refs/#update-a-reference:
To debug this a bit further, I modified the source code to enable force pushing. With force pushing turned on, I was able to see a commit from Txgh come through (in our example, it would be es.pot being updated), and then that commit was wiped from the repo's history a moment later when fr.pot was updated, meaning fr.pot was a force push.
I don't know how to fix this behavior (nor am I 100% certain I am right, although I am confident I'm at least on the right path). The only suggestion off the top of my head is switching to using this much simpler api for updating a file - https://developer.github.com/v3/repos/contents/#update-a-file
Any suggestions on possible work-around for this?
I don't know Ruby, and I'm not entirely familiar with how everything in this app works, so this is a bit of a shot in the dark.
I will use a simplified version of my current setup to try to describe what I suspect is happening.
I have 3 files,
en.pot,es.pot, andfr.pot.en.potand commit/push directly tomasteres.potandfr.potare updated in Transifex to have this new entryes.potand one forfr.pot, both very close to each other in terms of timinges.pot, using the currentbase_commitas the parent commit.fr.pot, also using this samebase_commitas the parent commit.master, but the 2nd commit fails with the error:To debug this a bit further, I modified the source code to enable force pushing. With force pushing turned on, I was able to see a commit from Txgh come through (in our example, it would be
es.potbeing updated), and then that commit was wiped from the repo's history a moment later whenfr.potwas updated, meaningfr.potwas a force push.I don't know how to fix this behavior (nor am I 100% certain I am right, although I am confident I'm at least on the right path). The only suggestion off the top of my head is switching to using this much simpler api for updating a file - https://developer.github.com/v3/repos/contents/#update-a-file
Any suggestions on possible work-around for this?