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

Iox #954 use cxx::expected for MemoryManager::getChunk #991

Conversation

elBoberido
Copy link
Member

@elBoberido elBoberido commented Dec 13, 2021

Pre-Review Checklist for the PR Author

  1. Code follows the coding style of CONTRIBUTING.md
  2. Tests follow the best practice for testing
  3. Changelog updated in the unreleased section including API breaking changes
  4. Branch follows the naming format (iox-#123-this-is-a-branch)
  5. Commits messages are according to this guideline
    • Commit messages have the issue ID (iox-#123 commit text)
    • Commit messages are signed (git commit -s)
    • Commit author matches Eclipse Contributor Agreement (and ECA is signed)
  6. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  7. Relevant issues are linked
  8. Add sensible notes for the reviewer
  9. All checks have passed (except task-list-completed)
  10. Assign PR to reviewer

Notes for Reviewer

This PR refactors the MemoryManager::getChunk method to use the error handling with cxx::expected

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • Unit tests have been written for new behavior
  • Public API changes are documented via doxygen
  • Copyright owner are updated in the changed files
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

@elBoberido elBoberido added the refactoring Refactor code without adding features label Dec 13, 2021
@elBoberido elBoberido self-assigned this Dec 13, 2021
@elBoberido elBoberido force-pushed the iox-#954-handle-out-of-chunks-gracefully branch 2 times, most recently from 28af990 to 8375cc3 Compare December 13, 2021 22:18
@codecov
Copy link

codecov bot commented Dec 13, 2021

Codecov Report

Merging #991 (0901c4e) into master (effa1c8) will decrease coverage by 0.05%.
The diff coverage is 70.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #991      +/-   ##
==========================================
- Coverage   77.75%   77.70%   -0.06%     
==========================================
  Files         336      337       +1     
  Lines       12362    12395      +33     
  Branches     1839     1841       +2     
==========================================
+ Hits         9612     9631      +19     
- Misses       2125     2137      +12     
- Partials      625      627       +2     
Flag Coverage Δ
unittests 76.60% <70.45%> (-0.05%) ⬇️
unittests_timing 29.93% <9.09%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...eoryx_hoofs/include/iceoryx_hoofs/cxx/expected.hpp 100.00% <ø> (ø)
...ude/iceoryx_posh/internal/mepoo/memory_manager.hpp 100.00% <ø> (ø)
...osh/internal/popo/building_blocks/chunk_sender.hpp 100.00% <ø> (ø)
...osh/internal/popo/building_blocks/chunk_sender.inl 87.17% <46.66%> (-9.80%) ⬇️
iceoryx_posh/source/mepoo/memory_manager.cpp 96.96% <81.25%> (-3.04%) ⬇️
...ude/iceoryx_posh/internal/mepoo/memory_manager.inl 81.81% <81.81%> (ø)
...ceoryx_binding_c/source/cpp2c_enum_translation.cpp 100.00% <100.00%> (ø)
iceoryx_hoofs/source/posix_wrapper/timer.cpp 62.86% <0.00%> (-0.43%) ⬇️
...fs/include/iceoryx_hoofs/internal/cxx/helplets.inl 93.75% <0.00%> (+0.27%) ⬆️

@elBoberido elBoberido force-pushed the iox-#954-handle-out-of-chunks-gracefully branch 5 times, most recently from a3e2128 to 0dbf3fa Compare December 14, 2021 01:00
@elBoberido elBoberido requested review from dkroenke and elfenpiff and removed request for MatthiasKillat December 15, 2021 12:15
@elBoberido elBoberido force-pushed the iox-#954-handle-out-of-chunks-gracefully branch 2 times, most recently from 1f47b2c to 460b126 Compare December 15, 2021 17:06
@elBoberido elBoberido force-pushed the iox-#954-handle-out-of-chunks-gracefully branch 4 times, most recently from 3404a7c to a66e8f4 Compare December 17, 2021 15:52
Copy link
Contributor

@mossmaurice mossmaurice left a comment

Choose a reason for hiding this comment

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

LGTM, two minor findings.

@elBoberido elBoberido force-pushed the iox-#954-handle-out-of-chunks-gracefully branch from a66e8f4 to 85abc2f Compare January 10, 2022 11:18
@elBoberido elBoberido force-pushed the iox-#954-handle-out-of-chunks-gracefully branch from 85abc2f to 06c00de Compare January 10, 2022 13:58
mossmaurice
mossmaurice previously approved these changes Jan 10, 2022
Copy link
Contributor

@mossmaurice mossmaurice left a comment

Choose a reason for hiding this comment

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

LGTM

@elBoberido elBoberido merged commit a41fd66 into eclipse-iceoryx:master Jan 11, 2022
@elBoberido elBoberido deleted the iox-#954-handle-out-of-chunks-gracefully branch January 11, 2022 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactor code without adding features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use cxx::expected for MemoryManager::getChunk
3 participants