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

Send supported ops message on cmd capability message #2645 #2649

Conversation

albinsuresh
Copy link
Contributor

@albinsuresh albinsuresh commented Feb 1, 2024

Proposed changes

Make sure that the supported ops message is sent on receipt of a command capability message, if that supported op is not already registered. Previously the log, config and firmware management plugins were relying on the fs-notify mechanism to get their supported ops registered. Now that the fs-notify mechanism is not supported for child devices, reuse the same explicit operation registration mechanism used by restart and software_update operation handlers.

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

#2645

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
Member

@rina23q rina23q left a comment

Choose a reason for hiding this comment

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

It looks good in general

Copy link
Contributor

github-actions bot commented Feb 1, 2024

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
386 0 3 386 100 1h0m28.545s

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

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

Comparison is base (8589587) 75.8% compared to head (e43c5b8) 75.8%.
Report is 70 commits behind head on main.

Additional details and impacted files
Files Coverage Δ
crates/extensions/c8y_mapper_ext/src/converter.rs 81.1% <100.0%> (+0.1%) ⬆️
...s/c8y_mapper_ext/src/operations/firmware_update.rs 88.6% <80.0%> (+0.4%) ⬆️
...es/extensions/c8y_mapper_ext/src/operations/mod.rs 91.5% <94.8%> (+4.8%) ⬆️
crates/core/tedge_api/src/entity_store.rs 92.9% <0.0%> (-0.3%) ⬇️
...nsions/c8y_mapper_ext/src/operations/log_upload.rs 88.8% <89.1%> (+0.4%) ⬆️
crates/core/tedge/src/cli/init.rs 0.0% <0.0%> (ø)

... and 1 file with indirect coverage changes

Copy link
Member

@rina23q rina23q left a comment

Choose a reason for hiding this comment

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

Approved

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. This fix the root cause of flaky test.

$ invoke flake-finder --test-name "Successful log operation" --iterations 10 --clean --suite "Log Operation Child"
------------------------------
Overall: PASSED
Results: 10 iterations, 10 passed, 0 failed

@reubenmiller reubenmiller added this pull request to the merge queue Feb 1, 2024
Merged via the queue into thin-edge:main with commit 425549b Feb 1, 2024
20 checks passed
@albinsuresh albinsuresh deleted the fix/2645/missing-supported-ops-update branch February 2, 2024 09:36
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