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

crowdin push strings file based project "branch currently being updated" 409 error #835

Closed
philippeauriach opened this issue Aug 26, 2024 · 9 comments · Fixed by #836
Closed

Comments

@philippeauriach
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Configuration file: '...'
project_id: "xxx"
api_token: "xxx"

preserve_hierarchy: true
files:
  - source: "/**/src/locales/fr.po"
    translation: "**/src/locales/%two_letters_code%.po"
  1. Execute CLI command: pnpm crowdin push -b master
  2. See an error
✔️  Fetching project info     
⏭  Branch 'master' already exists in the project
✔️  File 'master/webapps/A/src/locales/A_fr.po'
❌ File 'master/webapps/B/src/locales/B_fr.po'
❌ Error from server: <Code: 409, Message: This branch is currently being updated>
✔️  File 'master/webapps/C/src/locales/C_fr.po'
❌ File 'master/webapps/D/src/locales/D_fr.po'
❌ Error from server: <Code: 409, Message: This branch is currently being updated>
❌ File 'master/webapps/E/src/locales/E_fr.po'
❌ Error from server: <Code: 409, Message: This branch is currently being updated>
❌ Current execution finished with errors

Expected behavior
We expect all the strings to be uploaded to the crowdin project ?
It seems that the cli is blocking itself while uploading multiple files. It works if we update the configuration to upload only one file, but that wouldn't be very efficient.

Maybe is it linked to the fact that the project is string based (we need that to work with branches) - should we make only one big file with all the strings in it before uploading ?

Environment:

@andrii-bodnar
Copy link
Member

Hi @philippeauriach, thanks for reporting this!

It's strange. If I remember correctly, we already disabled parallel source upload for SB projects in #815 (4.1.0 release), so this shouldn't be happening.

Could you please check that you don't have any parallel crowdin push -b master executions?

@philippeauriach
Copy link
Author

philippeauriach commented Aug 27, 2024

Hello @andrii-bodnar - I checked that there is only execution (I am the only one working on it, as we just began the setup). I also tried with a new branch (which does not exists when I run the command) to be sure, and got the same issue.

Could it be a server side issue ? Something like a background processing that is not done when the cli starts to send the next file ? Looking at the logs, files seems to be launched one after the other (there is a slight delay in log being displayed one after another), and it is never the first one that fails, it starts at the second one and can pass for some.

I tried limiting our number of files to 2 and got the same issue on the second file.

@andrii-bodnar
Copy link
Member

@philippeauriach Thanks for the details!

Could it be a server side issue?

Most likely not. You can try uploading to the different branch (which did not exist before) to check.

@yevheniyJ could you please also take a look?

@philippeauriach
Copy link
Author

@andrii-bodnar I tried uploading to a new branch which did not exist before, same issue !

@yevheniyJ yevheniyJ linked a pull request Aug 30, 2024 that will close this issue
@philippeauriach
Copy link
Author

Amazing thank you! Any way I could try it locally before the release? I tried adding the main branch as a dependency but as it is not built, I don't have access to the command. Thanks!

@andrii-bodnar
Copy link
Member

@philippeauriach you can download the artifact from the CI/CD pipeline - https://github.com/crowdin/crowdin-cli/actions/runs/10632483424

And then run the CLI in the following way:

java -jar crowdin-cli-4.1.1.jar push -b master

@philippeauriach
Copy link
Author

philippeauriach commented Sep 5, 2024

@andrii-bodnar I can confirm that the built version works, thanks !

@andrii-bodnar
Copy link
Member

@philippeauriach Thanks for the confirmation! I will be releasing a new version in the next few days.

@andrii-bodnar
Copy link
Member

@philippeauriach available in 4.1.2

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

Successfully merging a pull request may close this issue.

3 participants
@philippeauriach @andrii-bodnar and others