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

phrase push with cleanup doesn't work with several sources #147

Open
vollmond08 opened this issue May 13, 2024 · 3 comments
Open

phrase push with cleanup doesn't work with several sources #147

vollmond08 opened this issue May 13, 2024 · 3 comments
Assignees

Comments

@vollmond08
Copy link

Good morning, can you help me, please?
Regarding these PRs:
#22
phrase/openapi#518

Looks like if I have project with several sources then phrase push --wait --cleanup should work, but it doesn't.

phrase push --wait --cleanup
Uploading translations/test1/translations.en.json...
Upload Id: 2c5ec14fab35d2d0a9e89ef3a14c471f, filename: translations.en.json succeeded. Waiting for your file to be processed...
Successfully uploaded and processed translations/test1/translations.en.json.
Following key(s) are about to be deleted from your project:
spa.test2.footer1
1 key(s) successfully deleted.

Uploading translations/test2/translations.en.json...
Upload Id: c33f5f4e0f52dd44b2b820f4a58587da, filename: translations.en.json succeeded. Waiting for your file to be processed...
Successfully uploaded and processed translations/test2/translations.en.json.
Following key(s) are about to be deleted from your project:
spa.test1.header1
1 key(s) successfully deleted.

For testing purposes I created project with 2 sources. So first uploading doesn't wait for second uploading and deletes spa.test2.footer1 key but shouldn't because it still needed in second source.
@jablan mention you, hope you don't mind

@jablan
Copy link

jablan commented May 14, 2024

hey @vollmond08 thanks for reporting, just checked the code, and you are right, the cleanup works only in the scope of a single source.
I will open an internal ticket to address this. can't say when it will be done yet.

@jablan jablan self-assigned this May 14, 2024
@vollmond08
Copy link
Author

thanks a lot, will be waiting for resolving or new info

@ajayktrada
Copy link

HI team,

We are also facing an issue with this behavior.

When we define multiple sources in the same config file and try to do a cleanup, it deletes keys from every source file and keeps those present in the last source file.

The reason behind this is that phrase push cleanup generates individual upload IDs for each source file mentioned config.

We should introduce a kind of flag that creates only one upload ID per config file; in that case, it won't delete the keys from other source files.

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

No branches or pull requests

3 participants