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

[CI only] Streamlined/fixed sanitize/coverage matrices #790

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

levb
Copy link
Collaborator

@levb levb commented Aug 12, 2024

Streamlined and fixed the test matrix for coverage, sanitize, and environment variable/commpile flag configurations.

@levb levb marked this pull request as ready for review August 12, 2024 16:04
Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.70%. Comparing base (4806b3c) to head (9cc5e27).

Additional details and impacted files
@@                       Coverage Diff                        @@
##           fix_test_ssl_verify_hostname     #790      +/-   ##
================================================================
+ Coverage                         68.85%   70.70%   +1.85%     
================================================================
  Files                                49       47       -2     
  Lines                             15219    15133      -86     
  Branches                           3133     3088      -45     
================================================================
+ Hits                              10479    10700     +221     
+ Misses                             1693     1450     -243     
+ Partials                           3047     2983      -64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@levb levb requested a review from kozlovic August 12, 2024 16:13
Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

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

LGTM, but wondering if we need all those code coverage runs?


sanitize-no-host-verify:
name: "Sanitize address (NO force_host_verification)"
coverage-NO-verify_host:
Copy link
Member

Choose a reason for hiding this comment

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

Should we have a single coverage run (basically with the defaults of the library that has TLS/enfore_hostname_verification/etc..)?
Or is it that we would get a much lower score (for all code that is in the "#else" of those "#ifdef") without these new runs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right. What prompted this was the refactoring of deliveries - the thread pool refactor code generated a lot of missing coverage comments since it was not ran with coverage.

My thinking: the coverage overhead is relatively small (relative to sanitize) so it's ok to run a bigger matrix. For the same reason, the coverage runs are probably sufficient to assert functional correctness (no need to dial down the parameters, for example). We still run the no-coverage tests for the default build config.

FWIW, I failed to package them into a single compact matrix statement, but the current job set is probably more intention revealing anyway then the matrix would have been.

@levb levb merged commit b87fdca into fix_test_ssl_verify_hostname Aug 13, 2024
27 checks passed
@levb levb deleted the lev-ci-matrix branch August 13, 2024 13:24
levb added a commit that referenced this pull request Aug 13, 2024
…OFF (#788)

* Fixed test SSLVerifyHostName when build NATS_FORCE_HOST_VERIFICATION=OFF

This test would fail unless we force host verification, so adapt
test to take into consideration the expected result based on the
build environment variable.

Signed-off-by: Ivan Kozlovic <[email protected]>

* Added a GHA job for NATS_FORCE_HOST_VERIFICATION

* fixed default: ON

* job: no-host-sanitize

* job names

* [CI only] Streamlined/fixed sanitize/coverage matrices (#790)

---------

Signed-off-by: Ivan Kozlovic <[email protected]>
Co-authored-by: Lev Brouk <[email protected]>
Co-authored-by: Lev <[email protected]>
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.

2 participants