Skip to content

feature: force/not force pushΒ #10

@hurtki

Description

@hurtki

πŸ“„ Summary

Now sync push command works like it is force push, if there were configs in the cloud that they are not in local, tool deletes them from cloud.
So we need to add a --force flag for cm sync push, withoud flag it will only add new configs without removing previous that aren't in local.
With --force tool will to what it does now ( like copies all the local configs to cloud, as it work on git push --force, it's just copying repo )

🧩 Problem / Motivation

I found a problem, that if you are on some other machine where you have only some configs added to cm you are trying to push, you are just deleting all the configs that were in the cloud

πŸ’‘ Proposed Solution

I guess we need to work on it first in sync services
In SyncServiceImpl or CloudManagerImpl.
Now in cmd/sync/sync_push.go
I already wrote lines:

// not realised feature
// Force             bool

and:

// not realised feature
//cmd.Flags().BoolVar(&syncPushCmd.Force, "force", false, "Ignore inappropriate configs while pushing")

so basicaly cmd of the feature is ready for this issue, just need to work on internal ( sync services )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions