digitalocean / godo

DigitalOcean Go API client
https://pkg.go.dev/github.com/digitalocean/godo
Other
1.43k stars 296 forks source link

Method for spec structures to set default values #419

Closed renehernandez closed 3 years ago

renehernandez commented 3 years ago

When syncing an app specifcation without fields like instance_size_slug or instance_count declared, those fields are assigned default values during the App creation in the Platform. That logic should be baked in Spec structs (AppStaticSiteSpec, AppServiceSpec, etc). Some of the default values I have noticed:

I am currently setting the expected default values as part of the appfile diff invocation at https://github.com/renehernandez/appfile/blob/main/internal/apps/app_spec.go, so that the diffs show the expected values, without being messed up by the lack of the default values

kamaln7 commented 3 years ago

Hey @renehernandez I missed this one. This will be part of #415

kamaln7 commented 3 years ago

Merged #422 which fixes this.