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

tedge legacy health messages are not being republished on the te/ topic with the retained flag #2149

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

PradeepKiruvale
Copy link
Contributor

@PradeepKiruvale PradeepKiruvale commented Aug 11, 2023

Proposed changes

  • Enforce the retain flag when the tedge messages are republished on te topics
  • integration tests

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue

#2147

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@didier-wenzek
Copy link
Contributor

didier-wenzek commented Aug 11, 2023

Sorry for being a bit harsh publicly, but I already say it too often: "we must take the time to do things properly" and "by taking shortcuts, we are wasting time".

You ticked "I ran cargo fmt as mentioned in CODING_GUIDELINES".

But: https://github.com/thin-edge/thin-edge.io/actions/runs/5828358977/job/15805958541?pr=2149


Run cargo fmt -- --check
Diff in /home/runner/work/thin-edge.io/thin-edge.io/crates/core/tedge_agent/src/tedge_to_te_converter/converter.rs at line 78:
         alarm.insert("severity".to_string(), severity.into());
         message.topic = te_topic;
         message.payload = serde_json::to_string(&alarm)?.into();
-       let message  = message.with_retain();
+        let message = message.with_retain();
         Ok(vec![message])
     }
 
Diff in /home/runner/work/thin-edge.io/thin-edge.io/crates/core/tedge_agent/src/tedge_to_te_converter/converter.rs at line 112:
             _ => return vec![],
         };
         message.topic = topic;
-        let message  = message.with_retain();
+        let message = message.with_retain();
         vec![message]
     }
 
Error: Process completed with exit code 1.

@PradeepKiruvale PradeepKiruvale temporarily deployed to Test Pull Request August 11, 2023 07:48 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Merging #2149 (12c1f3d) into main (317114f) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

❗ Current head 12c1f3d differs from pull request most recent head ed3eda4. Consider uploading reports for the commit ed3eda4 to get more accurate results

Additional details and impacted files
Files Changed Coverage Δ
...tedge_agent/src/tedge_to_te_converter/converter.rs 85.5% <100.0%> (+0.3%) ⬆️
...ore/tedge_agent/src/tedge_to_te_converter/tests.rs 89.4% <100.0%> (+0.2%) ⬆️

... and 4 files with indirect coverage changes

@github-actions
Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
251 0 5 251 100

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved

Copy link
Contributor

@reubenmiller reubenmiller left a comment

Choose a reason for hiding this comment

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

@PradeepKiruvale PradeepKiruvale temporarily deployed to Test Pull Request August 11, 2023 08:39 — with GitHub Actions Inactive
@PradeepKiruvale PradeepKiruvale temporarily deployed to Test Pull Request August 11, 2023 09:00 — with GitHub Actions Inactive
Copy link
Contributor

@reubenmiller reubenmiller left a comment

Choose a reason for hiding this comment

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

Approved, thanks for the changes.

Signed-off-by: Pradeep Kumar K J <pkj@softwareag.com>
@PradeepKiruvale PradeepKiruvale temporarily deployed to Test Pull Request August 11, 2023 12:01 — with GitHub Actions Inactive
@PradeepKiruvale PradeepKiruvale merged commit 339d536 into thin-edge:main Aug 11, 2023
18 checks passed
@@ -9,6 +9,8 @@ Suite Teardown Custom Teardown

Test Tags theme:mqtt theme:tedge to te

Library JSONLibrary
Copy link
Contributor

Choose a reason for hiding this comment

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

it is good practise to keep the Library entries grouped one after another to avoid confusion

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.

None yet

4 participants