-
Notifications
You must be signed in to change notification settings - Fork 382
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
impl(common+storage): remove OpenSSL dependency on Windows #13785
Conversation
…gle::cloud::internal::SignUsingSha256` These functions are doing the same thing.
/gcbrun |
d9f60fb
to
1f05827
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13785 +/- ##
=======================================
Coverage 93.04% 93.04%
=======================================
Files 2176 2178 +2
Lines 185186 185178 -8
=======================================
- Hits 172308 172302 -6
+ Misses 12878 12876 -2 ☔ View full report in Codecov by Sentry. |
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.
First, thank you for preparing this PR. These are difficult APIs and the changes look good.
Second, I think we should take some time to refactor the code so these changes are easier to maintain in the future. Most of my comments below go along those lines.
Third, I think we need to think about the test coverage consequences. For example, our ASAN builds only run on Linux, and that makes sense because the code is (or was) largely identical on Linux, macOS and Windows. This change introduces a number of tricky allocations / deallocations that (to my eyes) look correct, but I would feel better if they were also tested by some dynamic analyzer. @scotthart our infrastructure cannot handle that at the moment, we should consider if (and how) we would support code that is more specialized for Windows.
@teo-tsirpanis you may want to hold off on making more changes until we had a chance to discuss this internally.
google/cloud/internal/curl_wrappers_locking_already_present_test.cc
Outdated
Show resolved
Hide resolved
We depend on it only when we need to include a header. Bazel takes care of linking.
Thanks for being patient with us, and thanks for sending this PR. I think we really want to break the dependency on OpenSSL on Windows, and your changes are in the right direction. I think we want to make some refactoring before making these changes. I will be doing the refactoring and CC you on the PRs so you can see where things are going. Feel free to rebase this PR or create a new PR at the end, whatever works for you. The changes I have in mind include:
After you merge your changes I will probably reorganize the code to reduce the number of #ifdefs. I think we would prefer files that are only compiled when needed, or that have a single #ifdef for the whole file. Those changes are not as urgent, and require a deeper understanding of our build scripts, so we will make them. I just mention them because you may find the code changed after your PR. Again, thanks for this contribution, and let me know how you would like to proceed. |
@teo-tsirpanis more refactoring in #13826 |
Thanks for finding out. Is there a way to work around it? |
/gcbrun |
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.
Running clang-format on this file caused all these changes. I initially did not commit them because they were unrelated, but the checkers
CI job keeps failing.
No other file changed by this PR gets changed after running clang-format
.
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.
You probably have a slightly different version of clang-format
. The checkers job is failing for other reasons, the diff is available at
https://github.com/googleapis/google-cloud-cpp/pull/13785/checks?check_run_id=23211048683
There are problems are (mostly) formatting of the CMake files.
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.
You probably have a slightly different version of clang-format
. The checkers job is failing for other reasons, the diff is available at
https://github.com/googleapis/google-cloud-cpp/pull/13785/checks?check_run_id=23211048683
There are problems are (mostly) formatting of the CMake files.
This reverts commit cdd4cfe.
Stop setting `_WIN32_WINNT` (we need it only in Bazel). Include `absl_str_cat_quiet.h`
I installed |
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.
LGTM. Let's wait for the CI robots before declaring success.
/gcbrun |
I believe the build failures in https://github.com/googleapis/google-cloud-cpp/actions/runs/8472009569/job/23214103847?pr=13785 are fixed in #13836 . @teo-tsirpanis have you had a chance to rebase since #13836 got merged? |
/gcbrun |
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.
Woo hoo! Thanks for this change. Not only did we remove the dependency on OpenSSL, I think the code is cleaner.
I will be merging the code once the last build succeeds.
Thanks again for the large contribution. We do appreciate it. |
* Remove OpenSSL dependency on Windows. See googleapis/google-cloud-cpp#13785. * MNT: Re-rendered with conda-build 3.27.0, conda-smithy 3.34.1, and conda-forge-pinning 2024.04.22.06.37.48
Fixes #13746
This PR reimplements the cryptography routines on top of Windows APIs, removing the dependency to OpenSSL on Windows1.
Validated by successfully running the relevant tests locally. I also did some minor cleanups where applicable.
This change is
Footnotes
At least for the REST client libraries; gRPC has its own dependency on OpenSSL. ↩