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

Replace error log levels with warnings in tedge agent #2647

Merged

Conversation

Ruadhri17
Copy link
Contributor

Proposed changes

This PR replaces error log levels with warnings and prevents exiting with error code in such cases.

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

Copy link
Contributor

github-actions bot commented Feb 1, 2024

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
385 0 3 385 100 50m59.184s

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (8589587) 75.8% compared to head (04f2fc6) 75.9%.
Report is 88 commits behind head on main.

Additional details and impacted files
Files Coverage Δ
...tes/core/tedge_agent/src/software_manager/actor.rs 55.6% <0.0%> (ø)
...tes/core/tedge_agent/src/state_repository/state.rs 92.7% <0.0%> (ø)

... and 17 files with indirect coverage changes

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.

@albinsuresh I wonder why the test "Update tedge version from base to current using Cumulocity" is not failing as it should since the version mismatch is not reported after an update.

crates/core/tedge_agent/src/software_manager/actor.rs Outdated Show resolved Hide resolved
Signed-off-by: Krzysztof Piotrowski <krzysztof.piotrowski@inetum.com>
@albinsuresh
Copy link
Contributor

@albinsuresh I wonder why the test "Update tedge version from base to current using Cumulocity" is not failing as it should since the version mismatch is not reported after an update.

@didier-wenzek Is this comment still valid as Krzystoff seem to have reverted the problematic change?

@didier-wenzek
Copy link
Contributor

@albinsuresh I wonder why the test "Update tedge version from base to current using Cumulocity" is not failing as it should since the version mismatch is not reported after an update.

@didier-wenzek Is this comment still valid as Krzystoff seem to have reverted the problematic change?

Somehow, yes. This test was supposed to cover the feature broken by the problematic change, but failed to raise the issue.

That said this is unrelated to this PR.

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

@albinsuresh
Copy link
Contributor

@albinsuresh I wonder why the test "Update tedge version from base to current using Cumulocity" is not failing as it should since the version mismatch is not reported after an update.

@didier-wenzek Is this comment still valid as Krzystoff seem to have reverted the problematic change?

Somehow, yes. This test was supposed to cover the feature broken by the problematic change, but failed to raise the issue.

That said this is unrelated to this PR.

@didier-wenzek That's because his changes were not included in the 0.0.1 dummy version from which we upgrade to the current version in the test.

I understand how this can be confusing to anyone. Upgrading from the current version to a dummy higher version would have been better and clearer. We resorted to this mechanism due to the complexity of always building that dummy higher version as part of the test setup. We can re-evaluate that choice post 1.0.

@didier-wenzek
Copy link
Contributor

@didier-wenzek That's because his changes were not included in the 0.0.1 dummy version from which we upgrade to the current version in the test.

It makes sense now.

I understand how this can be confusing to anyone. Upgrading from the current version to a dummy higher version would have been better and clearer. We resorted to this mechanism due to the complexity of always building that dummy higher version as part of the test setup.

To improve the test, one alternative could be to test both upgrade from dummy 0.0.1 to current and downgrade from current to dummy 0.0.1.

We can re-evaluate that choice post 1.0.

Sure.

@reubenmiller reubenmiller added this pull request to the merge queue Feb 2, 2024
Merged via the queue into thin-edge:main with commit c3e81cf Feb 2, 2024
20 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

4 participants