Skip to content

Commit

Permalink
Merge pull request #117 from thin-edge/feat-start-message-qos-2
Browse files Browse the repository at this point in the history
fix: use qos 2 to publish startup message
  • Loading branch information
reubenmiller authored Oct 23, 2024
2 parents e34f19e + ecfe368 commit c2a1576
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion images/common/utils/startup-notifier/startup-notifier
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ publish() {
VERSION=$(tedge --version | cut -d' ' -f2)
TOPIC_ROOT=$(tedge config get mqtt.topic_root)
TOPIC_ID=$(tedge config get mqtt.device_topic_id)
tedge mqtt pub --qos 1 "$TOPIC_ROOT/$TOPIC_ID/e/startup" "$(printf '{"text": "tedge started up 🚀 version=%s"}' "$VERSION")"
tedge mqtt pub --qos 2 "$TOPIC_ROOT/$TOPIC_ID/e/startup" "$(printf '{"text": "tedge started up 🚀 version=%s"}' "$VERSION")"
}

# Keep trying forever until it is published
Expand Down
3 changes: 2 additions & 1 deletion tests/debian-systemd/main/operations.robot
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Restart device
${operation}= Cumulocity.Restart Device
Cumulocity.Device Should Have Event/s expected_text=.*Warning: device is about to reboot.* minimum=1 maximum=1 type=device_reboot after=${date_from}
Operation Should Be SUCCESSFUL ${operation} timeout=120
Cumulocity.Device Should Have Event/s expected_text=tedge started up.+ minimum=1 maximum=1 type=startup after=${date_from}
# FIXME: Investigate why this event can sometimes be duplicated
Cumulocity.Device Should Have Event/s expected_text=tedge started up.+ minimum=1 maximum=2 type=startup after=${date_from}

Install software package
${operation}= Cumulocity.Install Software {"name": "vim-tiny", "version": "latest", "softwareType": "apt"}
Expand Down

4 comments on commit c2a1576

@github-actions
Copy link

Choose a reason for hiding this comment

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

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
7 0 0 7 100 44.904s

@github-actions
Copy link

Choose a reason for hiding this comment

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

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
11 0 2 11 100 53.193999999s

@github-actions
Copy link

Choose a reason for hiding this comment

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

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
14 0 0 14 100 1m1.87s

@github-actions
Copy link

Choose a reason for hiding this comment

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

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
31 0 2 31 100 4m9.654999999s

Please sign in to comment.