thin-edge / thin-edge.io

The open edge framework for lightweight IoT devices
https://thin-edge.io
Apache License 2.0
211 stars 55 forks source link

refactor: group and remove duplicates of paths in CumulocityConverter #2849

Closed Bravo555 closed 2 months ago

Bravo555 commented 2 months ago

Proposed changes

Unify the types of various path variables in C8yMapperConfig and remove their duplicates. They were shared with other pieces of code, so all were made Arc<Utf8Path> so they can be cloned without duplicating the strings. Part of the converter cleanup, but self-contained enough so I decided to make it a separate PR.

Types of changes

Paste Link to the issue


Checklist

Further comments

github-actions[bot] commented 2 months ago

Robot Results

:white_check_mark: Passed :x: Failed :next_track_button: Skipped Total Pass % :stopwatch: Duration
432 0 3 432 100 0s
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 61.66667% with 23 lines in your changes are missing coverage. Please review.

Project coverage is 77.2%. Comparing base (e1e6839) to head (7332307). Report is 1 commits behind head on main.

Additional details and impacted files | [Files](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2849?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge) | Coverage Δ | | |---|---|---| | [crates/extensions/c8y\_mapper\_ext/src/tests.rs](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2849?src=pr&el=tree&filepath=crates%2Fextensions%2Fc8y_mapper_ext%2Fsrc%2Ftests.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge#diff-Y3JhdGVzL2V4dGVuc2lvbnMvYzh5X21hcHBlcl9leHQvc3JjL3Rlc3RzLnJz) | `92.6% <100.0%> (ø)` | | | [crates/core/tedge\_mapper/src/aws/mapper.rs](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2849?src=pr&el=tree&filepath=crates%2Fcore%2Ftedge_mapper%2Fsrc%2Faws%2Fmapper.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge#diff-Y3JhdGVzL2NvcmUvdGVkZ2VfbWFwcGVyL3NyYy9hd3MvbWFwcGVyLnJz) | `0.0% <0.0%> (ø)` | | | [crates/core/tedge\_mapper/src/az/mapper.rs](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2849?src=pr&el=tree&filepath=crates%2Fcore%2Ftedge_mapper%2Fsrc%2Faz%2Fmapper.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge#diff-Y3JhdGVzL2NvcmUvdGVkZ2VfbWFwcGVyL3NyYy9hei9tYXBwZXIucnM=) | `0.0% <0.0%> (ø)` | | | [crates/core/tedge\_mapper/src/collectd/mapper.rs](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2849?src=pr&el=tree&filepath=crates%2Fcore%2Ftedge_mapper%2Fsrc%2Fcollectd%2Fmapper.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge#diff-Y3JhdGVzL2NvcmUvdGVkZ2VfbWFwcGVyL3NyYy9jb2xsZWN0ZC9tYXBwZXIucnM=) | `0.0% <0.0%> (ø)` | | | [crates/extensions/c8y\_mapper\_ext/src/inventory.rs](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2849?src=pr&el=tree&filepath=crates%2Fextensions%2Fc8y_mapper_ext%2Fsrc%2Finventory.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge#diff-Y3JhdGVzL2V4dGVuc2lvbnMvYzh5X21hcHBlcl9leHQvc3JjL2ludmVudG9yeS5ycw==) | `86.6% <80.0%> (+<0.1%)` | :arrow_up: | | [crates/extensions/c8y\_mapper\_ext/src/actor.rs](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2849?src=pr&el=tree&filepath=crates%2Fextensions%2Fc8y_mapper_ext%2Fsrc%2Factor.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge#diff-Y3JhdGVzL2V4dGVuc2lvbnMvYzh5X21hcHBlcl9leHQvc3JjL2FjdG9yLnJz) | `81.8% <80.0%> (+0.3%)` | :arrow_up: | | [crates/core/tedge\_mapper/src/c8y/mapper.rs](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2849?src=pr&el=tree&filepath=crates%2Fcore%2Ftedge_mapper%2Fsrc%2Fc8y%2Fmapper.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge#diff-Y3JhdGVzL2NvcmUvdGVkZ2VfbWFwcGVyL3NyYy9jOHkvbWFwcGVyLnJz) | `0.0% <0.0%> (ø)` | | | [crates/extensions/c8y\_mapper\_ext/src/config.rs](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2849?src=pr&el=tree&filepath=crates%2Fextensions%2Fc8y_mapper_ext%2Fsrc%2Fconfig.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge#diff-Y3JhdGVzL2V4dGVuc2lvbnMvYzh5X21hcHBlcl9leHQvc3JjL2NvbmZpZy5ycw==) | `47.4% <66.6%> (+0.5%)` | :arrow_up: | | [crates/extensions/c8y\_mapper\_ext/src/converter.rs](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2849?src=pr&el=tree&filepath=crates%2Fextensions%2Fc8y_mapper_ext%2Fsrc%2Fconverter.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge#diff-Y3JhdGVzL2V4dGVuc2lvbnMvYzh5X21hcHBlcl9leHQvc3JjL2NvbnZlcnRlci5ycw==) | `83.5% <62.5%> (-0.1%)` | :arrow_down: | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2849/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge)