Add sanitizer support using GCC toolchain features#64
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
90a54e3 to
698d31d
Compare
| bazel_dep(name = "score_bazel_platforms", version = "0.0.4") | ||
| bazel_dep(name = "score_docs_as_code", version = "2.2.0") | ||
| bazel_dep(name = "score_tooling", version = "1.1.1") | ||
| bazel_dep(name = "score_docs_as_code", version = "2.3.0") |
There was a problem hiding this comment.
You will need docs-as-code 3.0.1 if you want to use tooling 1.1.2.
There was a problem hiding this comment.
I've verified that score_docs_as_code@2.3.0 works correctly with score_tooling@1.1.2 and all tests pass. The sanitizer implementation is complete and ready for review.
Using 3.0.1 causes CI failures because score_tooling@1.1.2 declares it as dev_dependency = True, making it invisible to consuming modules.
There was a problem hiding this comment.
Do you need the new added Documentation API this from tooling 1.1.2?
If not then downgrading to 1.1.0 and upgrading docs-as-code to 3.0.0 would be advisable.
Otherwise you will not be able to use the new features from docs-as-code.
See Features Here
There was a problem hiding this comment.
Done! Downgraded to score_tooling@1.1.0.
Keeping score_docs_as_code@2.3.0 due to compatibility with score_baselibs (all released versions require 2.3.0). Upgrading to 3.0.0 causes CI failures.
6500360 to
630e545
Compare
630e545 to
a218e21
Compare
a218e21 to
f19c4ff
Compare
f19c4ff to
008bf6c
Compare
bd4b451 to
d911823
Compare
d911823 to
117e040
Compare
117e040 to
5bc82b8
Compare
| bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.2", dev_dependency = True) | ||
| bazel_dep(name = "score_toolchains_rust", version = "0.4.0", dev_dependency = True) | ||
| bazel_dep(name = "score_cpp_policies", version = "0.0.0", dev_dependency = True) | ||
| git_override( |
There was a problem hiding this comment.
I guess this is done to verify adoption of score_cpp_policies in logging repo. This should be replaced with correct bazel_dep version and not point to a local branch.
There was a problem hiding this comment.
@nradakovic do we know who is responsible for maintaining and make releases for score_cpp_policies?
rmaddikery
left a comment
There was a problem hiding this comment.
LGTM, Can me merged after:
https://github.com/eclipse-score/logging/pull/64/changes#r2939211291
Sanitizer logic is centralized in |
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| sanitizer_config: [asan_ubsan_lsan] |
There was a problem hiding this comment.
Are we missing a job for tsan config?
| cache-save: ${{ github.event_name == 'push' }} | ||
|
|
||
| - name: Run sanitizer tests via Bazel | ||
| run: | |
There was a problem hiding this comment.
if e run this in each PR why we would run UT seperatelly ?
There was a problem hiding this comment.
To verify the unit tests for the config:
Line 67 in 5270e48
There was a problem hiding this comment.
so this runs exactly same UT, so why do we run both instead this one only.?
There was a problem hiding this comment.
Keeping the the host unit test runs and the sanitizer runs has advantages since both catch diferent classes of problems and have different goals. One is the fastest way to verify the normal expectations while the latter is sanitized config ensuring quality goals. if your concern is CI budget and CI workflow optimization, we can discuss that seperately and work on a more balanced setup. My suggestion is to bring this in as a baseline for QM quality goals. Take note that we also have mw/log which is an ASIL-B FFI lib. So work products demand this by default.
There was a problem hiding this comment.
I don't think the normal run catches any kind of different bugs than sanitizer ones. So sanitizer one is superior and catches normal run issues + sanitizer issues or ? Since we run this on PR , the normal run seems to be useless since you have to wait for sanitizers. So still no one answered my questions: in this setup why we run regular C++ unit tests if we want to run one with sanitizers ;)
There was a problem hiding this comment.
Hmm, lets see: https://github.com/eclipse-score/logging/tree/main/.github/workflows/
build.yml - build onyly, no tests are run
coverage_report.yml - runs tests with coverage instrumentation
sanitizers.yml - runs tests with asam ubsan lsan AND tsan config. seperately
neither runs the same. As already mentioned we should not mix coverage report from a sanitizer run!
Summary
Adopts centralized sanitizer infrastructure from
score_cpp_policies.Changes
score_cpp_policiesdev dependency for sanitizer wrapper/flagsquality/sanitizer/to.bazelrcquality/sanitizer/folderNotes for Reviewer
Pre-Review Checklist for the PR Author
Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References
Closes #