kontent-ai / kontent-ai/data-ops
Changed default language codename can crash sync run
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 7
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 1
Description
### Brief bug description
If a default language's codename from sync snapshot differs from the default lang codename in the target environment and, simultaneously, another language from the snapshot references the default language as a fallback, the `sync run` fails with `The specified fallback language is inactive or does not exist.`
This is most likely an ordering issue, where the languages referencing the default language are upserted before the patch operations renaming the default language take place. See screenshot for reference

### Repro steps
1. Have an empty target environment
2. Have a source environment where the default language codename is other than `default` and has other languages using the default language as fallback
3. Try syncing the models between the two environments
4. ???
5. Profit
### Expected behavior
...it works.
Contributor guide
Research direction
Start by reproducing the sync run with an empty target and a source whose default language has a different codename and dependent fallback languages. Trace the sync ordering around language upserts and the default-language rename, then verify that the run succeeds without the inactive-or-missing fallback error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100