neondatabase / autoscaling

Postgres vertical autoscaling in k8s
Apache License 2.0
153 stars 21 forks source link

plugin: Fix nil deref on nil metrics #909

Closed sharnoff closed 5 months ago

sharnoff commented 5 months ago

The autoscaler-agent <-> scheduler plugin protocol allows the autoscaler-agent to skip the metrics field if there aren't any, which typically occurs right after the VM is created.

With the changes from #750, we assumed that .Metrics will always be non-nil, meaning that it panics when .Metrics is actually nil.


Depending on the implementation, this could have been caught by #765.