Skip to content

Commit

Permalink
Update rivets to include nil pointer deref fix
Browse files Browse the repository at this point in the history
a few consts were renamed
  • Loading branch information
joelrebel committed Apr 22, 2024
1 parent b500638 commit 56b74a0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/jinzhu/copier v0.4.0
github.com/jpillora/backoff v1.0.0
github.com/metal-toolbox/fleetdb v0.17.1
github.com/metal-toolbox/rivets v1.0.3
github.com/metal-toolbox/rivets v1.0.4
github.com/mitchellh/mapstructure v1.5.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.19.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/metal-toolbox/fleetdb v0.17.1 h1:eyaCg4yGQnbXIjiBMZPsLqmEpxbltlEUNDG+Mn27Fsc=
github.com/metal-toolbox/fleetdb v0.17.1/go.mod h1:TbRbU+ppHIknqiAONR7JDQfzKij30uiPkehgxlA1Hv0=
github.com/metal-toolbox/rivets v1.0.3 h1:ZW9q8V3vz6VxAczC4eR1YJdl+kapHF3ebVc+4r3NmR8=
github.com/metal-toolbox/rivets v1.0.3/go.mod h1:EMQJRT1mjIyFRXxvKNaBlz7Z4Sp88rTaGO8W18olN2I=
github.com/metal-toolbox/rivets v1.0.4 h1:BFvlYWsN+5Zb2JS+oJJBDtaQ94M5x2Llf6kmwi+Byjo=
github.com/metal-toolbox/rivets v1.0.4/go.mod h1:EMQJRT1mjIyFRXxvKNaBlz7Z4Sp88rTaGO8W18olN2I=
github.com/microsoft/go-mssqldb v0.17.0/go.mod h1:OkoNGhGEs8EZqchVTtochlXruEhEOaO4S0d2sB5aeGQ=
github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=
Expand Down
4 changes: 2 additions & 2 deletions internal/store/fleetdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ func (s *FleetDBAPI) FirmwareByDeviceVendorModel(ctx context.Context, deviceVend
params := &fleetdbapi.ComponentFirmwareSetListParams{
AttributeListParams: []fleetdbapi.AttributeListParams{
{
Namespace: rfleetdb.FirmwareAttributeNSFirmwareSetLabels,
Namespace: rfleetdb.FirmwareSetAttributeNS,
Keys: []string{"model"},
Operator: "eq",
Value: deviceModel,
},
{
Namespace: rfleetdb.FirmwareAttributeNSFirmwareSetLabels,
Namespace: rfleetdb.FirmwareSetAttributeNS,
Keys: []string{"vendor"},
Operator: "eq",
Value: deviceVendor,
Expand Down
2 changes: 1 addition & 1 deletion internal/store/fleetdb_attrs.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (s *FleetDBAPI) bmcAddressFromAttributes(attributes []fleetdbapi.Attributes
func (s *FleetDBAPI) vendorModelFromAttributes(attributes []fleetdbapi.Attributes) (deviceVendor, deviceModel, deviceSerial string, err error) {
vendorAttrs := map[string]string{}

vendorAttribute := findAttribute(rfleetdb.ServerAttributeNSVendor, attributes)
vendorAttribute := findAttribute(rfleetdb.ServerVendorAttributeNS, attributes)
if vendorAttribute == nil {
return deviceVendor,
deviceModel,
Expand Down

0 comments on commit 56b74a0

Please sign in to comment.