-
Notifications
You must be signed in to change notification settings - Fork 91
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
Feature/refactor bundle cache #476
Conversation
…unctions. Also moves some cpputest to gtests
…ats. Also moves the library loading from bundle archive to module.
Thanks for making this happen. Please give me one or two weeks to review it. |
This reverts commit 2d82cbf.
Codecov Report
@@ Coverage Diff @@
## master #476 +/- ##
==========================================
- Coverage 76.48% 75.54% -0.95%
==========================================
Files 226 225 -1
Lines 34133 34439 +306
==========================================
- Hits 26108 26016 -92
- Misses 8025 8423 +398
... and 155 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
# Conflicts: # bundles/http_admin/http_admin/CMakeLists.txt
Also introduce an error injector lib for celix_utils
Also introduces the CELIX_EI_IMPL macro which returns the configured return type of the wrapped function and adds some mimimal documentation about the bundle cache.
Also framework documentation for the bundle cache.
…ndle_cache # Conflicts: # libs/framework/CMakeLists.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still looking at this PR, leaving some partial comments here.
Co-authored-by: PengZheng <[email protected]>
Co-authored-by: PengZheng <[email protected]>
Also move the create std::string and free c string pattern to a method with a try and catch.
…nto feature/refactor_bundle_cache
I would like to move towards merging this PR. I am quite happy with the overall changes this PR introduces. This includes the bundle cache changes, but certainly also the error handling and file utils improvements and I think it is good to merge this in master. @PengZheng and @stegemr: Are there any other changes that needs to be done and if so, can this be done in a separate PR? I prefer a separate PR also to keep overview of the changes more manageable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologize for the terribly slow review.
We can merge it now, but please wait a week or two before making a new release.
No worries, as said I am quite happy with the - joined effort - changes. But I think is time now to merge this and move forward in - if possible - smaller PRs. Also no problem to wait a a week (or longer) for a new release. |
This PR refactors the bundle cache handling so that bundles zips are not extracted if there is already a cache dir for that bundle.
This PR does not implement or replace the ideas mentioned in #441, but instead is just a step to make extracted bundle cache dirs reusable.
The bundle archive, bundle cache and celix launcher functionality is tested with additional gtest code.
For the bundle update functionality, no additional test are added and IMO this functionality is still "work in progress" / "use at own risk".
Mainly because IMO we need to test bundle update with really different bundle libs (including new and removed symbols) to ensure that a dlopen/dlsym on the same path, but different libs really works as expected. I considered this out of scope for this PR.
This PR also introduces:
--create-bundle-cache
option in the celix launcher to create a bundle cache and exit (i.e. prepare a application to startup more quickly).This PR has become large than I expected and also took more time than I expected. I think this is mainly, because I had some trouble understanding the bundle archive, revision mechanism and added quite some refactoring to (IMO) make this a bit cleaner. I would have preferred some more refactoring, but that breaks the current public api.