Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Reduce noise when importing PostgreSQL Flexible Server Configurations #4279

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,23 @@ func (extension *FlexibleServersConfigurationExtension) Import(
// API version in the generator.)
if config, ok := rsrc.(*api.FlexibleServersConfiguration); ok {
// Skip system defaults
if config.Spec.Source != nil && *config.Spec.Source == "system-default" {
if config.Spec.Source != nil &&
*config.Spec.Source == "system-default" {
return extensions.ImportSkipped("system-defaults don't need to be imported"), nil
}

// Skip readonly configuration
if config.Status.IsReadOnly != nil &&
*config.Status.IsReadOnly {
return extensions.ImportSkipped("readonly configuration can't be set"), nil
}

// Skip default values
if config.Status.DefaultValue != nil &&
config.Status.Value != nil &&
*config.Status.DefaultValue == *config.Status.Value {
return extensions.ImportSkipped("default value is the same as the current value"), nil
}
}

return result, nil
Expand Down
Loading