summaryrefslogtreecommitdiffstats
path: root/crates/common
AgeCommit message (Collapse)Author
2022-08-30Simplify impl of check_another_instance_is_not_running()Matthias Beyer
This patch refactors the `check_another_instance_is_not_running()` function by introducing a `FlockfileError::path()` helper function to get the path for the error instance and re-implementing the function with that. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-30Replace match with function chainingMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-19Merge pull request #1348 from thin-edge/create-pull-request/patchAlbin Suresh
Patch version bump
2022-08-18Fix clippy: Remove unneccessary lazy evalMatthias Beyer
This patch fixes clippy::unnecessary_lazy_evaluations Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18Merge pull request #1349 from matthiasbeyer/clippy-fixesDidier Wenzek
Clippy fixes
2022-08-18Fix clippy: logged_command: Do not use format!() to append to StringMatthias Beyer
This fixes clippy::format_push_string. The error returned from write!() is ignored in this case. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18Fix clippy: download: Add derive for EqMatthias Beyer
This fixes clippy::derive_partial_eq_without_eq Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18Refactor for readabilityMatthias Beyer
This patch refactors `check_another_instance_is_not_running()` for readability. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18Fix clippy: Remove needless return keywordMatthias Beyer
This fixes clippy::needless_return Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18Fix clippy in tedge_utils: Remove let-unit-valueMatthias Beyer
This patch fixes `clippy::let_unit_value`. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18Fix clippy in tedge_config: Remove let-unit-valueMatthias Beyer
This patch fixes `clippy::let_unit_value`. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18Fix clippy in mqtt_channel: Remove let-unit-valueMatthias Beyer
This patch fixes `clippy::let_unit_value`. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18Fix clippy in json_writer: Remove let-unit-valueMatthias Beyer
This patch fixes `clippy::let_unit_value`. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18Fix clippy in flockfile: Remove let-unit-valueMatthias Beyer
This patch fixes `clippy::let_unit_value`. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18Fix clippy in download: Remove let-unit-valueMatthias Beyer
This patch fixes `clippy::let_unit_value`. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18Fix clippy in certificate: Remove let-unit-valueMatthias Beyer
This patch fixes `clippy::let_unit_value`. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-18(cargo release) bump versionVersioneer
2022-08-06Do not necessarily pass &str anymore to fs helper fnsMatthias Beyer
This patch changs the calls of the fs helper functions where the interface of the functions was changed from taking `&str` as path argument to `impl AsRef<Path>`. Because of this, it is not necessary anymore that `&str` is passed, but `Path`es can be passed or, as in most cases, the ad-hoc created `String` objects can be passed by value instead of by reference, resulting in less mental load on the calling side. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-06Relax interface of file helper functionsMatthias Beyer
This patch relaxes the interface of the file helper functions by allowing `impl AsRef<Path>` for creating file/directory pathes. This results in a less narrow interface, as now the functions can be used with Path, String, &str... Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-06Fix (style): Replace match with function chainingMatthias Beyer
This patch replaces the match statements with functionally equivalent function chaining, that result in less lines of code. This is merely a style change. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-03tedge_utils: Move "maplit" to dev-dependenciesMatthias Beyer
Apparently, we need this in the dev-dependencies, not in the normal dependencies. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-03tedge_utils: Remove unused dependency "anyhow"Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-08-03mqtt_channel: Remove unused dependency "tedge_utils"Matthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-07-29MQTT health endpoints for tedge plugin extensions (#1299)PradeepKiruvale
* tedge watchdog for c8y-log-plugin and c8y-config-plugin This PR also refactors the health check by removing the duplicate code. Pushed the duplicate code to one place and reused it across all the thin-edge services. Signed-off-by: Pradeep Kumar K J <pradeepkumar.kj@softwareag.com>
2022-07-26Merge pull request #1298 from matthiasbeyer/remove-clock-serdeDidier Wenzek
Remove "serde" module in "clock" crate
2022-07-26Remove serde feature from "clock" crateMatthias Beyer
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-07-26Merge pull request #1250 from ↵initard
initard/improvement/1173/inotify-tedge-mapper-dynamic-discovery-of-operations tedge mapper dynamic discovery of operations
2022-07-25implementing fs-notify crate for dynamic discovery of operationsinitard
Signed-off-by: initard <solo@softwareag.com>
2022-07-25Merge pull request #1295 from thin-edge/dependabot/cargo/fastrand-1.8.0Didier Wenzek
Bump fastrand from 1.7.0 to 1.8.0
2022-07-25Bump serial_test from 0.6.0 to 0.8.0dependabot[bot]
Bumps [serial_test](https://github.com/palfrey/serial_test) from 0.6.0 to 0.8.0. - [Release notes](https://github.com/palfrey/serial_test/releases) - [Commits](https://github.com/palfrey/serial_test/compare/v0.6.0...v0.8.0) --- updated-dependencies: - dependency-name: serial_test dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25Bump fastrand from 1.7.0 to 1.8.0dependabot[bot]
Bumps [fastrand](https://github.com/smol-rs/fastrand) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/smol-rs/fastrand/releases) - [Changelog](https://github.com/smol-rs/fastrand/blob/master/CHANGELOG.md) - [Commits](https://github.com/smol-rs/fastrand/compare/v1.7.0...v1.8.0) --- updated-dependencies: - dependency-name: fastrand dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25Merge pull request #1292 from thin-edge/dependabot/cargo/nix-0.24.2Didier Wenzek
Bump nix from 0.23.1 to 0.24.2
2022-07-25Merge pull request #1288 from thin-edge/dependabot/cargo/test-case-2.2.1Didier Wenzek
Bump test-case from 2.1.0 to 2.2.1
2022-07-25Bump nix from 0.23.1 to 0.24.2dependabot[bot]
Bumps [nix](https://github.com/nix-rust/nix) from 0.23.1 to 0.24.2. - [Release notes](https://github.com/nix-rust/nix/releases) - [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md) - [Commits](https://github.com/nix-rust/nix/compare/v0.23.1...v0.24.2) --- updated-dependencies: - dependency-name: nix dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22Merge pull request #1284 from matthiasbeyer/update-x509-parserDidier Wenzek
Update x509 parser
2022-07-22Bump test-case from 2.1.0 to 2.2.1dependabot[bot]
Bumps [test-case](https://github.com/frondeus/test-case) from 2.1.0 to 2.2.1. - [Release notes](https://github.com/frondeus/test-case/releases) - [Changelog](https://github.com/frondeus/test-case/blob/master/CHANGELOG.md) - [Commits](https://github.com/frondeus/test-case/compare/v2.1.0...v2.2.1) --- updated-dependencies: - dependency-name: test-case dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22Fix usage of to_rfc2822()Matthias Beyer
Updating x509-parser in 6c612f10e0045de3492d26e3d4134640e4a9656d ("Bump x509-parser from 0.13.2 to 0.14.0") resulted in a changed interface of the `to_rfc2822()` function, meaning that the function now returns a `Result<_>`. We can map the error here to our type easily though. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-07-22Bump x509-parser from 0.13.2 to 0.14.0dependabot[bot]
Bumps [x509-parser](https://github.com/rusticata/x509-parser) from 0.13.2 to 0.14.0. - [Release notes](https://github.com/rusticata/x509-parser/releases) - [Changelog](https://github.com/rusticata/x509-parser/blob/master/CHANGELOG.md) - [Commits](https://github.com/rusticata/x509-parser/compare/x509-parser-0.13.2...x509-parser-0.14.0) --- updated-dependencies: - dependency-name: x509-parser dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2022-07-21fix cargo clippy --all-features for fs_notifyinitard
Signed-off-by: initard <solo@softwareag.com>
2022-07-21Merge pull request #1266 from thin-edge/dependabot/cargo/mockall-0.11.1Didier Wenzek
Bump mockall from 0.10.2 to 0.11.1
2022-07-21Merge pull request #1272 from matthiasbeyer/update-backoffDidier Wenzek
Update backoff
2022-07-21Fix: Do not construct error variant directlyMatthias Beyer
The API of the backoff crate changed when constructing an `Error::Transient` object from using the enum variant directly to a constructor method. This patch fixes this by making use of the constructor method. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-07-21Bump backoff from 0.3.0 to 0.4.0dependabot[bot]
Bumps [backoff](https://github.com/ihrwein/backoff) from 0.3.0 to 0.4.0. - [Release notes](https://github.com/ihrwein/backoff/releases) - [Commits](https://github.com/ihrwein/backoff/compare/v0.3.0...v0.4.0) --- updated-dependencies: - dependency-name: backoff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2022-07-21Remove call to AsRef::as_ref()Matthias Beyer
The `sha1::Sha1::digest()` function takes an `AsRef` as argument, which the object in `b64_bytes` implements, so the call is no longer necessary. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
2022-07-21Bump sha-1 from 0.9.8 to 0.10.0dependabot[bot]
Bumps [sha-1](https://github.com/RustCrypto/hashes) from 0.9.8 to 0.10.0. - [Release notes](https://github.com/RustCrypto/hashes/releases) - [Commits](https://github.com/RustCrypto/hashes/compare/sha-1-v0.9.8...sha-1-v0.10.0) --- updated-dependencies: - dependency-name: sha-1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2022-07-21Bump mockall from 0.10.2 to 0.11.1dependabot[bot]
Bumps [mockall](https://github.com/asomers/mockall) from 0.10.2 to 0.11.1. - [Release notes](https://github.com/asomers/mockall/releases) - [Changelog](https://github.com/asomers/mockall/blob/master/CHANGELOG.md) - [Commits](https://github.com/asomers/mockall/compare/v0.10.2...v0.11.1) --- updated-dependencies: - dependency-name: mockall dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20(cargo release) bump versionVersioneer
2022-07-18Merge pull request #1244 from initard/improvement/1173/inotify-onlyinitard
fs_notify - inotify crate
2022-07-18inotify-api implementationinitard
- abstracted inotify crate into (another) crate that is easier to use. - the new crate uses a single enum for both input and output types. - only events that we are interested in are monitored. - supports multiple files/directories Signed-off-by: initard <solo@softwareag.com>
2022-07-16Merge pull request #1251 from didier-wenzek/feature/remove-user-managerDidier Wenzek
Deprecate the user manager