Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gghio/692/trigger name events #923

Conversation

shinnokdisengir
Copy link
Contributor

@shinnokdisengir shinnokdisengir commented Apr 11, 2024

astarte_trigger_engine: add trigger_name to http event

Relative to #692

Currently, when a Trigger delivers an Event, the Event does not contain any information about the Trigger that generated it. This means that to distinguish between two triggers on the same interface, users have to use some out of band mechanism (e.g. using a different URL or adding a fixed query parameter).

  • Added trigger_name both in mustache template and event payload
  • Updated doc

No tests in this PR (there aren't tests for event data validation)

@shinnokdisengir shinnokdisengir force-pushed the gghio/692/trigger-name-events branch 5 times, most recently from 8e60a64 to 4f06994 Compare April 12, 2024 16:00
Copy link
Collaborator

@Annopaolo Annopaolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a fix in the doc

CHANGELOG.md Outdated Show resolved Hide resolved
doc/pages/architecture/060-triggers.md Outdated Show resolved Hide resolved
doc/pages/architecture/060-triggers.md Outdated Show resolved Hide resolved
doc/pages/architecture/060-triggers.md Outdated Show resolved Hide resolved
Changed
- send_simple_event
- retrieve_trigger_configuration
to integrate trigger_name inside payload

FIX astarte-platform#692

Signed-off-by: Gabriele Ghio <gabriele.ghio@secomind.com>
Added trigger_name config information

Signed-off-by: Gabriele Ghio <gabriele.ghio@secomind.com>
Signed-off-by: Gabriele Ghio <gabriele.ghio@secomind.com>
@Annopaolo Annopaolo merged commit 1b98a40 into astarte-platform:master Apr 17, 2024
29 checks passed
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