Skip to content

Commit

Permalink
INN-2911: Fix empty event payloads in UI due to resolver bug (#1258)
Browse files Browse the repository at this point in the history
Tested:
* Invoking via UI
* Send event via UI
* Send event via UI w/ id
* Send event via curl
* Send event via curl w/ id

This looks like there was a valid bug fix with #1201 then #1238 caused a regression due to a change in how IDs are handled.
  • Loading branch information
djfarrelly committed Apr 3, 2024
1 parent 89b974f commit 51ec78b
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pkg/coreapi/graph/resolvers/event.resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,7 @@ func (r *eventResolver) Status(ctx context.Context, obj *models.Event) (*models.
}

func (r *eventResolver) Raw(ctx context.Context, obj *models.Event) (*string, error) {
// Runner.Events maps events by an event ID that could be either the
// internal or external ID. It'll be the internal ID if the event didn't
// have an external ID
var eventID string
if obj.ExternalID != nil {
eventID = *obj.ExternalID
} else {
eventID = obj.ID.String()
}

eventID := obj.ID.String()
evts, err := r.Runner.Events(ctx, eventID)
if err != nil {
return nil, err
Expand Down

0 comments on commit 51ec78b

Please sign in to comment.