Skip to content

Conversation

Bravo555
Copy link
Member

Proposed changes

As suggested in #3271 (comment), since we want both log_args and config_dir be used by all thin-edge components, and because log_args also needs the config_dir to use in log_init(), use a shared CommonArgs in all thin-edge components to parse these arguments.

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


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

Signed-off-by: Marcel Guzik <marcel.guzik@inetum.com>
Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
527 0 2 527 100 1h34m3.594657999s

Copy link
Contributor

@albinsuresh albinsuresh left a comment

Choose a reason for hiding this comment

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

LGTM. I'm assuming that the two-step parsing that we discussed where the args to parsed to the CommonArgs first, to enable logging for all components from tedge::main itself, followed by a secondary parsing into component specific arg structs wasn't feasible.

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.

@Bravo555 Bravo555 added this pull request to the merge queue Dec 2, 2024
Merged via the queue into thin-edge:main with commit e614446 Dec 2, 2024
33 checks passed
@reubenmiller reubenmiller added theme:cli Theme: cli related topics refactoring Developer value labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Developer value theme:cli Theme: cli related topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants