Skip to content

feat: add offline mode to tedge reconnect command#3719

Merged
reubenmiller merged 1 commit intothin-edge:mainfrom
reubenmiller:feat-reconnect-offline-flag
Jul 4, 2025
Merged

feat: add offline mode to tedge reconnect command#3719
reubenmiller merged 1 commit intothin-edge:mainfrom
reubenmiller:feat-reconnect-offline-flag

Conversation

@reubenmiller
Copy link
Copy Markdown
Contributor

@reubenmiller reubenmiller commented Jul 3, 2025

Proposed changes

Improve cli consistency by adding the --offline flag to the tedge reconnect command to allow users to reconfigure the mapper even if the device does not have cloud connectivity.

The offline mode is useful when the device has already been pre-registered with Cumulocity (via the Bulk Registration API), and the device is being setup in the factory without internet connection, and tedge connect/reconnect is used to recreate the bridge settings, and enable/start the required services (which is extremely helpful when dealing with non-systemd based OS's).

This aligns the tedge reconnect command with the tedge connect command, and allows users to seemlessly switch between the two commands,

Before

tedge disconnect c8y
tedge connect c8y --offline

After

tedge reconnect c8y --offline

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. You can activate automatic signing by running just prepare-dev once)
  • I ran just format as mentioned in CODING_GUIDELINES
  • I used just check 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: reubenmiller <reuben.d.miller@gmail.com>
@reubenmiller reubenmiller temporarily deployed to Test Pull Request July 3, 2025 06:47 — with GitHub Actions Inactive
@reubenmiller reubenmiller added the theme:cli Theme: cli related topics label Jul 3, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/core/tedge/src/cli/reconnect/cli.rs 0.00% 1 Missing ⚠️
crates/core/tedge/src/cli/reconnect/command.rs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 3, 2025

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
654 0 3 654 100 1h48m12.158216s

Copy link
Copy Markdown
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

@reubenmiller reubenmiller added this pull request to the merge queue Jul 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 3, 2025
@reubenmiller reubenmiller added this pull request to the merge queue Jul 4, 2025
Merged via the queue into thin-edge:main with commit aa39e94 Jul 4, 2025
51 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme:cli Theme: cli related topics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants