When running recce server in the cloud mode, the syncing behavior is
When launching, it load the state from the cloud
When editing check, it upload(overwrite) state to the cloud
When clicking check, it download(import) runs and checks from the cloud.
When termingating, it upload(overwrite) state to the cloud
Problme
However, there is a case we did not cover.
When run the recce server in the cloud mode. If the ci trigger the recce run --cloud and update the dbt artifacts to the code. There is no way to sync the dbt artifacts in the recce server
Solution
In this PR, we implement the merge operation. In the 2,3,4 case, it changes to merge instance of one-way upload/download. Instead, it download the state(if necessary), merge the state, and upload back to the cloud.
In addition, if user click the sync button. It would detect if there is a new state in the cloud
If yes. just upload local state to remote
If no, it will prompt three option to sync (merge, revert, overwrite). User can have the options to decide which way to sync with the cloud.
PR checklist
[x] Ensure you have added or ran the appropriate tests for your PR.
When running recce server in the cloud mode, the syncing behavior is
Problme
However, there is a case we did not cover. When run the recce server in the cloud mode. If the ci trigger the
recce run --cloud
and update the dbt artifacts to the code. There is no way to sync the dbt artifacts in the recce serverSolution
In this PR, we implement the merge operation. In the 2,3,4 case, it changes to merge instance of one-way upload/download. Instead, it download the state(if necessary), merge the state, and upload back to the cloud.
In addition, if user click the sync button. It would detect if there is a new state in the cloud
PR checklist
What type of PR is this? Feature/Enhacenemnt
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?: