Skip to content

Conversation

@tadeboro
Copy link
Contributor

@tadeboro tadeboro commented May 17, 2020

This change breaks the API. Major version bump is needed when releasing the version of the collection that contains changes from this commit.

@tadeboro
Copy link
Contributor Author

tadeboro commented May 17, 2020

An alternative solution is presented in #186

Tadej Borovšak added 2 commits May 17, 2020 15:02
Sensu Go backend processes events in asynchronous fashion, which makes
it almost impossible to retrieve the processed event shortly after it
has been sent to the backend.

Currently, after we submit an event, we query the backend for the last
event. What we get back is one of the following three options:

 1. nothing, if our event is the first event ever and the backend did
    not manage to process it yet;
 2. previous event, if there is at least one preexisting event on the
    backend and our event has not been processed yet;
 3. our actual event, if the backend processed our event fast enough.

In the real world setting, the third scenario almost never happens,
which means that our event module is returning bogus results most of
the time.

To rectify the situation, we now simply return back the payload we sent
to the backend. This ensures that we return back relevant pieces of
information instead of some random or event or even none.
This change breaks the API. Major version bump is needed when releasing
the version of collection that contains changes from this commit.
@tadeboro tadeboro force-pushed the remove-object-from-event-module-result branch from 455d645 to 16548aa Compare May 17, 2020 13:05
@tadeboro tadeboro added this to the Release 2.0.0 milestone May 17, 2020
@tadeboro tadeboro changed the title Remove event module result Remove object field from the event module result May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants