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

Exit with code 0 if service manager not present #2204

Merged

Conversation

Ruadhri17
Copy link
Contributor

@Ruadhri17 Ruadhri17 commented Aug 29, 2023

Proposed changes

This PR changes exit code to 0 and prevents from running tedge components if service manager is not present.

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

#2172
#1953

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: Krzysztof Piotrowski <krzysztof.piotrowski@inetum.com>
@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Merging #2204 (8939c10) into main (81b9d51) will increase coverage by 0.0%.
Report is 10 commits behind head on main.
The diff coverage is 0.0%.

Additional details and impacted files
Files Changed Coverage Δ
crates/core/tedge/src/cli/connect/command.rs 0.0% <0.0%> (ø)

... and 9 files with indirect coverage changes

@github-actions
Copy link
Contributor

github-actions bot commented Aug 29, 2023

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
257 0 5 257 100 54m48.691s

@Ruadhri17 Ruadhri17 temporarily deployed to Test Pull Request August 29, 2023 19:14 — with GitHub Actions Inactive
Ok(()) => println!("Successfully created bridge connection!\n"),
Err(ConnectError::SystemServiceError(
SystemServiceError::ServiceManagerUnavailable { .. },
)) => return Ok(()),
Copy link
Contributor

Choose a reason for hiding this comment

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

The issue mentions displaying a warning to the user about software manager being unavailable and needing to manage services manually. I'd also be for including this, unless there is a reason not to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is included in new_bridge function so I left it there.

@didier-wenzek didier-wenzek merged commit 24b421f into thin-edge:main Sep 1, 2023
17 of 18 checks passed
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

3 participants