-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Floodgate makes changes to our existing resources but it never creates our new resources #124
Comments
Hi @mertsaygi , |
For example, if you create a new pipeline or application via floodgate. Floodgate does not create it on Spinnaker if your resource does not exists before. I fixed it too simplified solution. I can fix my possible issues after your review. |
@mertsaygi I have tested this using floodgate from master branch on clean Spinnaker installation and it works. Of course there is need to refresh UI after application is created, but spic_cli shows them.
There is a bug in our CI setup - pipeline should fail in this case. |
However LoadRemoteState just gets resource's current state from Spinnaker. We need to create it on Spinnaker so we need the usage of SaveLocalState |
@kacpersaw Can you look at it? |
Also, in this case the resource returns with "unexpected end of JSON input" error even it creates resource on the remote. The root cause is IsChanged method in resource class. If remote state is null, json.Unmarshal process in unmarshalStates method returns with error. I tried it runs if only remote state exists. |
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.
The text was updated successfully, but these errors were encountered: