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

Allow receiving trigger_name in TriggerPayload #664

Closed
rbino opened this issue Oct 25, 2024 · 0 comments
Closed

Allow receiving trigger_name in TriggerPayload #664

rbino opened this issue Oct 25, 2024 · 0 comments

Comments

@rbino
Copy link
Collaborator

rbino commented Oct 25, 2024

Astarte 1.2.0 added the trigger_name field to the HTTP trigger payload. Ash returns an error if unexpected inputs are received, so currently it returns an error if a trigger from an Astarte 1.2.0 instance is received.

This can be handled either explicitly adding trigger_name to the attributes here or adding an explicit :create action with skip_unknown_inputs: :*

rbino added a commit to rbino/edgehog that referenced this issue Oct 28, 2024
Astarte >= 1.2.0 sends an additional trigger_name key in the trigger payload.
This was making Edgehog crash since Ash doesn't accept additional input keys
by default.

Since 1.2.0 is the current stable version of Astarte, add the trigger_name key
to all existing tests and explicitly test support for the key missing to avoid
regressions with old Astarte versions.

Fix edgehog-device-manager#664

Signed-off-by: Riccardo Binetti <riccardo.binetti@secomind.com>
rbino added a commit to rbino/edgehog that referenced this issue Oct 28, 2024
Astarte >= 1.2.0 sends an additional trigger_name key in the trigger payload.
This was making Edgehog crash since Ash doesn't accept additional input keys
by default. Fix this allowing unknown keys to be accepted. This should
future-proof the trigger handler in case further additional keys are added in
the future.

Since 1.2.0 is the current stable version of Astarte, add the trigger_name key
to all existing tests and explicitly test support for the key missing to avoid
regressions with old Astarte versions.

Fix edgehog-device-manager#664

Signed-off-by: Riccardo Binetti <riccardo.binetti@secomind.com>
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

No branches or pull requests

2 participants