Skip to content

Conversation

@mertsaygi
Copy link
Contributor

Describe the bug
When we synth our resources, Floodgate makes changes to our existing resources but it never creates our new resources. When we investigate, we should make change on spinnaker resource directory as like that:

if api != nil { if err := a.LoadRemoteState(api); err != nil { err := a.SaveLocalState(api) return err } }

If loadRemoteState has an error (does not exist error) local state should be saved on remote. This is quick solution. If you want to resolve this issue on me. I can do clean solution.

@kacpersaw
Copy link
Contributor

kacpersaw commented Oct 16, 2020

Init function is created to initalize resource.
When you run sync command, it runs

func (rm *ResourceManager) SyncResources() error {
and then it starts to save resources in remote
func (rm ResourceManager) syncResource(resource spr.Resourcer) (bool, error) {

@kacpersaw
Copy link
Contributor

To sum up, I don't think it's necessary to save resources in remote inside the init function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Floodgate makes changes to our existing resources but it never creates our new resources

2 participants