crowdin / crowdin-cli

A command-line client for the Crowdin API
https://crowdin.github.io/crowdin-cli
MIT License
243 stars 88 forks source link

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

Closed philippeauriach closed 2 weeks ago

philippeauriach commented 2 weeks ago

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:

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 commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

@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 commented 2 weeks ago

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

philippeauriach commented 1 week ago

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 commented 1 week ago

@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 commented 1 week ago

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

andrii-bodnar commented 1 week ago

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

andrii-bodnar commented 1 week ago

@philippeauriach available in 4.1.2