fix(sync): remap shared-code, orchestrator and schedule links, add clone warnings (CLI-24) - #814
Conversation
…one warnings (CLI-24)
keboola-pr-reviewer-bot
left a comment
There was a problem hiding this comment.
reviewer could not complete: opencode exited 1: (no stderr — check the reviewer logs for the trace summary)
Retry with @keboola-pr-reviewer review once the underlying issue clears.
|
@keboola-pr-reviewer review |
keboola-pr-reviewer-bot
left a comment
There was a problem hiding this comment.
reviewer could not complete: opencode exited 1: (no stderr — check the reviewer logs for the trace summary)
Retry with @keboola-pr-reviewer review once the underlying issue clears.
zajca
left a comment
There was a problem hiding this comment.
Actionable findings from the automated review.
… suggest (CLI-24)
zajca
left a comment
There was a problem hiding this comment.
No actionable findings were found by the automated review.
This PR is based on #811 and shows only its own commit. Merge #811 first, with a merge commit. GitHub then changes the base of this PR to
main.What was wrong
sync clonecopies a reference tree into a new project and runssync push. Push set only two kinds of links to the new IDs: theconfigIdofkeboola.flowjob tasks, and the variables links of transformations. These links kept the IDs of the reference project:shared_code_id,shared_code_row_idsand the{{<row id>}}placeholders in the script),target.configurationId),keboola.orchestrator),configRowIds.Clone also copied values encrypted for the source project, and it did not say that data apps need a deploy. The result was
status: clonedwitherrors: []and no warning.What changed
LINK_UNRESOLVEDor the API error. After a failed PUT, the local files already have the new IDs and the manifest hash stays old, so the next push sends the link again.warnings[]and prints them, also with--dry-run:kbagent encrypt values, or a new OAuth authorization),data-app deploycommand,flow schedulecommand when only one schedule runs the flow. Clone does not activate schedules on purpose: right after a clone the target has no tables and cannot decrypt the copied values, so scheduled runs would fail.link_remapswith a count per link kind.flow_task_remapsstill counts only flow tasks.commands/_sync_clone_render.py, socommands/sync.pygets smaller.Tests
tests/test_sync_clone_links.pybuilds a reference tree with the realinit_syncandpullfrom fake Storage and Data Science clients, and runs the realclone_projectinto an empty fake target. It checks:no_changes,--branchclone, a disabled schedule and two schedules on one flow,make checkpasses.Docs:
gotchas.md(since vNEXT),sync-workflow.md,commands-reference.md,keboola-expert.md,context.py,CLAUDE.md,docs/error-codes.md. No version bump, no changelog entry.Fixes CLI-24