-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
azure-sdk-for-cpp: core, identity, storage #23297
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
@xylar I'd appreciate a review of these Azure SDK C++ libraries. Also, please let me know if I can add you as a co-maintainer on these recipes |
I am willing to maintain these packages. Thanks @jdblischak ! |
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.
Comments apply to all recipes but I limited them to the first.
recipes/azure-core-cpp/meta.yaml
Outdated
run: | ||
- libcurl | ||
- openssl # [not win] | ||
- wil # [win] |
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.
This whole section shouldn't be needed. The first two come via run_exports and the last one is a header only library.
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.
According to conda/conda-build#3796 (comment) adding wil
as a run
dependency in azure-core-cpp
is the best way to propagate the dependency in downstream packages. Currently every package using azure-core-cpp
has to depend on wil
itself.
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.
@teo-tsirpanis thanks for sharing the discussion in that Issue. @xhochy do you have a strong preference for either option?
- List the header only library
wil
as a runtime requirement forazure-core-cpp
, so thatwil
will be automatically installed in the host environment (and thus be available at build time) for all its downstream dependencies - Include the header only library
wil
alongsideazure-core-cpp
in the host requirements of all the dependencies
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 don't think 2 is an option because it would make azure-core-cpp
unusable by itself.
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.
After discussing with an upstream Azure SDK developer, we decided to apply a patch to remove the exported dependency on wil
in the config file for azure-core-cpp
For more context, see Azure/azure-sdk-for-cpp#4784 and Azure/azure-sdk-for-cpp#4785
recipes/azure-core-cpp/meta.yaml
Outdated
@@ -0,0 +1,58 @@ | |||
{% set name = "azure-core-cpp" %} |
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.
To be consistent with other packages, we should name this li azure-core
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.
What are you suggesting the name should be exactly? We can't call it azure-core
because that is used by the Python SDK: https://anaconda.org/conda-forge/azure-core
Similarly with the other SDK libraries: https://anaconda.org/conda-forge/azure-storage-common
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.
To be consistent with other packages, we should name this li azure-core
@xhochy Is your suggestion to name it lib-azure-core
? If yes, what other packages follow this convention? The AWS SDK for C++ is named aws-sdk-cpp
And in general, I think it would be potentially confusing if the conda-forge recipes all used different names than upstream
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 believe there is a typo in xhochy's comment. It should read
we should name this libazure-core
If the package is just headers, config, and libraries (no CLI tools or other binaries), then it should be named libazure-core because the package contains libazure-core.so/dylib.
Examples:
- libclang is libraries separate from clang the tool
- libcurl is libraries separate from curl the tool
- libopenvino just libs from the openvino project
- libmad is libs from the mad project
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 open to adding the prefix lib
. My main concerns are consistency and transparency. I think there is an advantage to having the conda recipe names exactly match the upstream names
libclang is libraries separate from clang the tool
But for this example, the upstream maintainers have also named it libclang, right? Same with libcurl. This seems like a slightly different situation than what we are discussing here, where the lib
prefix name would only exist in conda-forge
My understanding is that the prefixes -cpp
(and -c
) communicate that the software contains no CLI tools or other binaries. Looking across the conda-forge ecosystem, the many various AWS libraries either end in -cpp
or start with aws-c-
(including the very similar aws-sdk-cpp). There are also Azure C libraries that either start with azure-c
or end in -c
(see the recipe for azure-iot-sdk-c for various iterations on the naming scheme). I see that the lib
prefix was added to libgoogle-cloud (conda-forge/google-cloud-cpp-feedstock#83), but the -cpp
was also dropped.
Given the existence of the recipes for aws-c-*
, aws-sdk-cpp
, etc. already in conda-forge, I'd argue that a name like azure-core-cpp
already communicates that it is only a C++ library, with the added benefit that it matches the official upstream name.
Is anyone somewhat convinced by my argument above? I don't feel that strongly about it, but I wanted to at least present the counter-argument before we deviate the name from upstream. And if we do decide to add the prefix lib
, should we drop the suffix -cpp
?
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 agree that the lib
prefix is excessive. Names like azure-core-cpp
unquestionably refer to C++ libraries. Moreover this is the official name of the libraries, and we use the official names in the other cloud SDKs.
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.
It's not immediately apparent that the official name of the component is 'azure-core-cpp' when the components are bundled together under a project called 'azure-sdk-for-cpp'.
The upstream project's docs indicate that both the CMake package and vcpkg names are azure-core-cpp
, so let's go with that because it is explicit evidence in the upstream projects docs/source that the upstream maintainers have named these packages in that way. In the future, let's lead with links instead of researching whether or not it's conda-forge convention to name C/CXX libraries with a lib-
prefix.
@h-vetinari please also have a look as this is third big cloud vendor C++ SDK |
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.
Thanks for the PR!
Aside from some general clean-up requests, I'd expect that we need some sort of azure-sdk
metapackage that pulls everything together?
It would also be good to know what kind of ABI-stability (if any) these packages have. Migrating for every version is quite painful in the aws stack, for example.
To summarize the clean-ups:
- add run-exports
- don't pin (or lower-bound) packages where we will need to rebuild for new versions
- remove run-requirements where we can rely on run-exports
- don't special-case
-DCMAKE_BUILD_TYPE=Release
in build scripts - better document & structure the test sections
- don't use
{{ name }}
- [preferable] put CMake metadata in
$PREFIX/lib/cmake/<project>
(resp.%LIBRARY_LIB%\cmake\<project>
) - [optional] use ninja universally
@jdblischak, I'm sorry, I really don't feel qualified to help maintain these. I also have my hands full. |
Co-authored-by: h-vetinari <[email protected]>
@xhochy and @h-vetinari Thanks for the thorough review! I've applied your suggestions to the |
Leave out |
They declare compatibility within the same major version. (https://github.com/Azure/azure-sdk-for-cpp/blob/2f3e5de931c3f1c19551f6f58418c85aa410745b/cmake-modules/AzureVcpkg.cmake#L152-L156) |
@xochy @h-vetinari I removed the runtime requirements, but now I am getting the following errors. This was my initial motivation for adding them to the run requirements:
|
The warning sounds pretty clear to me. |
…need to rebuild for new versions
recipes/azure-core-cpp/meta.yaml
Outdated
run_exports: | ||
- {{ pin_subpackage("azure-core-cpp", min_pin="x", max_pin="x") }} |
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.
run_exports: | |
- {{ pin_subpackage("azure-core-cpp", min_pin="x", max_pin="x") }} | |
run_exports: | |
- {{ pin_subpackage("azure-core-cpp", max_pin="x") }} |
Please update all your exports to unspecify the min_pin. SameMajorVersion means backwards compatability, not forward and backward compatability.
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.
Also, shouldn't we pin the minor version instead?
run_exports: | |
- {{ pin_subpackage("azure-core-cpp", min_pin="x", max_pin="x") }} | |
run_exports: | |
- {{ pin_subpackage("azure-core-cpp", min_pin="x", max_pin="x.x") }} |
This suggestion also applies to the other libraries' recipe.
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.
We currently have it set to pin to only the major version because the upstream CMake file declares SameMajorVersion compatibility. See also the previous comments #23297 (comment) and #23297 (comment). @jjerphan what do you think of this choice? Pinning to the minor version would be the more conservative route, but it would also require more maintenance when migrating the pins
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 see. I think we better wait for an actual administrator of conda-forge. If you and another maintainer agreed on pinning on the major version already, just do ignore my comment.
recipes/azure-core-cpp/meta.yaml
Outdated
@@ -0,0 +1,58 @@ | |||
{% set name = "azure-core-cpp" %} |
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 believe there is a typo in xhochy's comment. It should read
we should name this libazure-core
If the package is just headers, config, and libraries (no CLI tools or other binaries), then it should be named libazure-core because the package contains libazure-core.so/dylib.
Examples:
- libclang is libraries separate from clang the tool
- libcurl is libraries separate from curl the tool
- libopenvino just libs from the openvino project
- libmad is libs from the mad project
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.
Thank you for bringing Azure SDK for C++ on conda-forge, @jdblischak!
Here are a few comments, the main important one being about pinning on minor versions rather than on major ones.
I also think we must prefix the names of those libraries with lib
.
I volunteer to maintain feedstocks.
recipes/azure-core-cpp/meta.yaml
Outdated
run_exports: | ||
- {{ pin_subpackage("azure-core-cpp", min_pin="x", max_pin="x") }} |
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.
Also, shouldn't we pin the minor version instead?
run_exports: | |
- {{ pin_subpackage("azure-core-cpp", min_pin="x", max_pin="x") }} | |
run_exports: | |
- {{ pin_subpackage("azure-core-cpp", min_pin="x", max_pin="x.x") }} |
This suggestion also applies to the other libraries' recipe.
@carterbox Thanks for the review!
I like that advice. I don't need a single meta-package myself. If someone else needs it, they can request it or create it themselves
Happy to comply with this. Updating 7 recipes at a time is cumbersome enough
Ok, let's see if all the maintainers agree. I know that the pinning migrations for the similar
Wonderful. Thanks for the concise explanation. I will need to add the pins after the initial feedstock creation but prior to the first updates |
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.
Thank you for packaging those libraries from the Azure SDK for C++, @jdblischak! I believe this is useful for a lot of projects.
Regarding what's left on the todo list (#23297 (comment)): I think we can figure moving the CMake metadata to the canonical path in the feedstocks since the tests using CMake projects work.
Regarding packages' names: prefixing C++ and C library with lib
is conventional for conda-forge. Yet, the developers of the Azure SDK for C++ chose to suffix them with -c
or -cpp
(which is also explicit). I am OK with using names that are suffixed with -c
and cpp
, especially if this prevent discrepancies between packages' names and identifiers to use for CMake.
I think we should also be careful about some packages being renamed. For instance azure-macro-utils-c
was renamed macro-utils-c
upstream but is published on conda-forge as azure-macro-utils-c
. Republishing is an option I think, but better ones might exist for this situation.
@conda-forge/help-c-cpp, ready for review! |
Higher-level questions that are still being actively discussed:
Lastly, if anyone else would like to be added to the list of maintainers, please let me know |
Thanks all for your reviews! The recipes are much improved thanks to all of your feedback |
Great work! Small question: I see the packages are built only for x64 architectures. Is there a way to add support for linux-aarch64, macos-arm64 and linux-ppc64le? |
We need to assess whether the libraries have been designed for the support of those architectures. We can try their support via individual PRs. |
Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details).https://github.com/Azure/azure-sdk-for-cpp
This PR contains recipes for the core, identity, and the storage-* C++ libraries
https://github.com/Azure/azure-sdk-for-cpp#vcpkg
I've separated them into separate recipes (as opposed to a single recipe with multiple outputs) because even though it is a mono-repo, the release tags are per library
https://github.com/Azure/azure-sdk-for-cpp/releases
I haven't usedUPDATE: the recipes now userun_exports
because the dependencies in the variousvcpkg.json
files are specified with only a minimum version boundrun_exports
to pin the libraries to their major versionI purposefully avoided the alternative core library with AMQP support (
azure-core-amqp
) because it depends onazure-uamqp-c
, and we haven't yet been able to build it and its dependencies for all platforms (azure-uamqp-c
->azure-c-shared-utility
->azure-macro-utils-c
&umock-c
), eg Add linux osx azure-c-shared-utility-feedstock#4https://github.com/conda-forge/azure-uamqp-c-feedstock