kontent-ai / kontent-ai/data-ops
Unable to sync spaces when new root is created
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 7
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 1
Description
### Brief bug description
When syncing a space that links a new web spotlight root, the operation fails since there is no matching item in the target environment.
### Repro steps
1. Create a new space that links a new root.
2. Sync spaces
3. See an error like the following `"The referenced root item '{codename: root}' was not found. Provide a reference to an existing root item."`
### Expected behavior
Preferably I'd like to see the root item synced. However, I understand that this may not be in line with the expectations of the `sync` command.
### Test environment
- `data-ops@2.2.2`
### Additional context
If we were to create an item if there's a new root, it would need to happen after content type updates, but before spaces. This is an issue since these operations are in the opposite order in the current implementation.
### Screenshots
N/A
Contributor guide
Research direction
Start with the spaces sync command and trace the ordering of content type updates, root item handling, and spaces. Reproduce the failure with a space linking a new root, then determine the supported completion behavior: syncing the root without the missing-reference error or clearly documenting that the sync command does not create it.
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
- Mostly clear
- Newbie friendliness
- 35/100