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

New locale in existing (Sicilian, Mozilla accounts) stuck on "Not synced yet" #3523

Open
flodolo opened this issue Jan 13, 2025 · 8 comments
Assignees
Labels
bug P2 We want to ship it soon, possibly in the current quarter sync

Comments

@flodolo
Copy link
Collaborator

flodolo commented Jan 13, 2025

Locale was added a few days ago (around Jan 10), but it's still showing up as "Not synced yet".

A manual sync doesn't show any error in the logs. Even a forced sync didn't make the project show up as available.

@flodolo
Copy link
Collaborator Author

flodolo commented Jan 13, 2025

Correction: a forced sync made the project available, I didn't realize it was still going (scheduled sync started in the meantime, making the log confusing).

@ezgiayvazoglu
Copy link

we also can not sync, we committed the latest database as json files in the corresponding repository, but in pontoon we are seeing them as missing translations and also approve all is not working for these.
without any addition in pontoon, we just updated the database by our own(via git commit) and we can not see the new translations on UI after the "sync", although it is just deleting the missing ones even they exist in the jsons.

@mathjazz mathjazz added P2 We want to ship it soon, possibly in the current quarter bug labels Jan 13, 2025
@mathjazz mathjazz moved this from 🆕 Needs triage to 🔖 Ready in Pontoon Roadmap Jan 13, 2025
@eemeli
Copy link
Member

eemeli commented Jan 13, 2025

@flodolo Do I understand right that the issue here is that with a pre-existing project, a newly added locale is not showing up as available until a forced sync is run?

@ezgiayvazoglu Does that description match your problem as well, or are you having some other issue with sync? If not, then it would be best to file a separate issue with a more detailed description.

@flodolo
Copy link
Collaborator Author

flodolo commented Jan 13, 2025

@flodolo Do I understand right that the issue here is that with a pre-existing project, a newly added locale is not showing up as available until a forced sync is run?

That's correct.

@ezgiayvazoglu
Copy link

@eemeli yes it was the same at the beginning, when we want to sync, it was staying like "Not synced yet", but then it's fixed somehow. I don't know what is the the "force sync" but, we needed to change ssh key to reconnect and it was worked. for the resting, we can open a new issue, thanks

@flodolo
Copy link
Collaborator Author

flodolo commented Jan 14, 2025

Forced sync is done via command line

./manage.py sync_projects --projects PROJECT_ID --force

@flodolo flodolo changed the title New locale (Sicilian, Mozilla accounts) not syncing New locale in existing (Sicilian, Mozilla accounts) stuck on "Not synced yet" Jan 14, 2025
@eemeli
Copy link
Member

eemeli commented Jan 16, 2025

I was able to replicate the issue locally, and looking at what's going on, the crux is that we currently lack a way to detect a locale being added.

I think we ought to track changes being made to project config, with something like a dirty flag or a last_modified timestamp. This is similar to #3494, though the solutions could be different.

@mathjazz I'm out of my depth figuring out how pontoon.administration.views.manage_project() actually works; it feels so very Django. Do you think you could take this on? The first-pass idea here would be to make a note somewhere when the project config changes, and if it does, do the next sync for the project with force=True.

@mathjazz
Copy link
Collaborator

I was able to replicate the issue locally, and looking at what's going on, the crux is that we currently lack a way to detect a locale being added.

I think we ought to track changes being made to project config, with something like a dirty flag or a last_modified timestamp. This is similar to #3494, though the solutions could be different.

That's essentially #2708?

@mathjazz I'm out of my depth figuring out how pontoon.administration.views.manage_project() actually works; it feels so very Django.

That's very mildly put. Admin code is not in a great shape (still mild), mostly due to constant pushback of #2021.

Do you think you could take this on? The first-pass idea here would be to make a note somewhere when the project config changes, and if it does, do the next sync for the project with force=True.

That doesn't sound optimal. We should only sync relevant locales, and ignore other changes to project configuration.

Check out how the old sync handled that:

# Store newly added locales and locales with newly added resources
new_locales = []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P2 We want to ship it soon, possibly in the current quarter sync
Projects
Status: 🔖 Ready
Development

No branches or pull requests

4 participants