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

fix: ActionResponse.action_id serialization #302

Merged
merged 4 commits into from
Nov 3, 2023
Merged

fix: ActionResponse.action_id serialization #302

merged 4 commits into from
Nov 3, 2023

Conversation

de-sh
Copy link
Contributor

@de-sh de-sh commented Nov 3, 2023

Closes #

Changes

Why?

Clickhouse expects the field "id" to be the device_id and not the action_id, this fixes that clash in beamd which lead to loss of action_id information

Trials Performed

  2023-11-03T07:36:25.015854Z  INFO uplink::base::bridge::actions_lane: Action response = ActionResponse { action_id: "2183", sequence: 4, timestamp: 1698996985015, state: "Downloaded", progress: 100, errors: [], done_response: Some(Action { action_id: "2183", kind: "process", name: "update_firmware", payload: "{\"url\":\"https://firmware.stage.bytebeam.io/api/v1/firmwares/new firmware/artifact\",\"content_length\":12734,\"file_name\":\"new firmware\",\"download_path\":\"/var/tmp/ota/1/update_firmware/new firmware\"}", deadline: Some(Instant { tv_sec: 43865, tv_nsec: 161892981 }) }) }

[uplink/src/base/serializer/mod.rs:481] String::from_utf8(data.serialize().unwrap()).unwrap() = "[{\"action_id\":\"2183\",\"sequence\":4,\"timestamp\":1698996985015,\"state\":\"Downloaded\",\"progress\":100,\"errors\":[]}]"

@de-sh de-sh requested a review from amokfa November 3, 2023 07:41
@amokfa amokfa merged commit 4a12479 into main Nov 3, 2023
2 checks passed
@de-sh de-sh deleted the fix-clickpush branch November 3, 2023 09:57
@de-sh de-sh restored the fix-clickpush branch November 4, 2023 06:09
@de-sh de-sh deleted the fix-clickpush branch November 4, 2023 06:09
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