Skip to content

Commit

Permalink
remove references to unsupported condition flag 'Exclusive' (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorVin authored Dec 6, 2023
1 parent 37a2c56 commit 2787dad
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/golang/mock v1.6.0
github.com/google/uuid v1.4.0
github.com/hashicorp/go-retryablehttp v0.7.5
github.com/metal-toolbox/rivets v0.1.2
github.com/metal-toolbox/rivets v0.1.3
github.com/nats-io/nats-server/v2 v2.10.4
github.com/nats-io/nats.go v1.31.0
github.com/pkg/errors v0.9.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,8 @@ github.com/metal-toolbox/rivets v0.1.1 h1:zn68uA0OXogNYtNcdm/1Oi8gfu/uE8QH9J7wj4
github.com/metal-toolbox/rivets v0.1.1/go.mod h1:QlGp4NUmXkSa8lhm/fFlH845kamwiOM7kiIsigVxWlg=
github.com/metal-toolbox/rivets v0.1.2 h1:Bclx3zd25pFUYRlr+ucwBwdGiz4nm9c/P+cLdy/f64k=
github.com/metal-toolbox/rivets v0.1.2/go.mod h1:QlGp4NUmXkSa8lhm/fFlH845kamwiOM7kiIsigVxWlg=
github.com/metal-toolbox/rivets v0.1.3 h1:Dl52WYrkBfSikZnt75JzXZx1HBksH0ixUjD6J6EnCK4=
github.com/metal-toolbox/rivets v0.1.3/go.mod h1:QlGp4NUmXkSa8lhm/fFlH845kamwiOM7kiIsigVxWlg=
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
3 changes: 1 addition & 2 deletions internal/status/kv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ func TestStatusKV(t *testing.T) {

defs := rctypes.Definitions{
&rctypes.Definition{
Kind: rctypes.Kind("test-event"),
Exclusive: true,
Kind: rctypes.Kind("test-event"),
},
}

Expand Down
1 change: 0 additions & 1 deletion pkg/api/v1/events/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ func (h *Handler) ServerserviceEvent(ctx context.Context, ev events.Message) {
ID: uuid.New(),
Kind: rctypes.Inventory,
State: rctypes.Pending,
Exclusive: false,
Parameters: byt, // pass the incoming message data to Alloy
}

Expand Down
3 changes: 0 additions & 3 deletions pkg/api/v1/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ type ConditionsResponse struct {

// ConditionCreate is the request payload to create a condition with its parameters on server.
type ConditionCreate struct {
Exclusive bool `json:"exclusive"`
Parameters json.RawMessage `json:"parameters"`
Fault *rctypes.Fault `json:"fault,omitempty"`
}
Expand Down Expand Up @@ -61,7 +60,6 @@ func (c *ConditionCreate) NewCondition(kind rctypes.Kind) *rctypes.Condition {
Version: rctypes.ConditionStructVersion,
Kind: kind,
State: rctypes.Pending,
Exclusive: c.Exclusive,
Parameters: c.Parameters,
Fault: c.Fault,
CreatedAt: time.Now(),
Expand Down Expand Up @@ -155,7 +153,6 @@ func (c *ConditionUpdate) MergeExisting(existing *rctypes.Condition) (*rctypes.C
State: c.State,
Status: c.Status,
FailOnCheckpointError: existing.FailOnCheckpointError,
Exclusive: existing.Exclusive,
UpdatedAt: c.UpdatedAt,
CreatedAt: existing.CreatedAt,
}, nil
Expand Down

0 comments on commit 2787dad

Please sign in to comment.