-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
feat: create google-cloud-cpp-core
feedstock
#24315
feat: create google-cloud-cpp-core
feedstock
#24315
Conversation
`google-cloud-cpp` is too large to compile in a single feedstock. The CI builds timeout before all the code is compiled. This PR proposes a new `google-cloud-cpp-core` feedstock for `google-cloud-cpp` that packages (1) the common libraries used by all `google-cloud-cpp` features, and (2) the most popular features of `google-cloud-cpp`. These packages are small enough to compile in a single feedstock. Future PRs will introduce other feedstocks that package more features of `google-cloud-cpp`. In these new feedstocks the runtime packages are named `libgoogle-cloud-{feat}`, and the development packages are named `libgoogle-cloud-{feat}-devel`. The `libgoogle-cloud` / `libgoogle-cloud-devel` package pair contains the common libraries used by all (or nearly all) subpackages. There are over 100 libraries in `google-cloud-cpp`, most of them are small, and most of them see little use. It is not worthwhile to create packages for all these libraries. In a future PR we will introduce the `libgoogle-cloud-all` and `libgoogle-cloud-all-devel` packages as catch alls for the smaller and less used features.
Hi! This is the friendly automated conda-forge-linting service. I wanted to let you know that I linted all conda-recipes in your PR ( Here's what I've got... For recipes/google-cloud-cpp-core:
|
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 ( |
This reverts commit 3111675.
After I made a hilarious number of mistakes with the Windows builds, I think this is ready for review. I could use some help with the |
Ahh, looks like this builds with a different SDK:
vs.
|
You should be able to select the macOS SDK with a conda_build_config.yaml as done in a feedstock. It should be placed alongside the meta.yaml. |
Okay, all the tests are passing now. Please take another look. |
Ping? |
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 is a very high-quality PR, thanks a lot @coryan! 🙏
Just a few questions and smaller comments.
W.r.t.
I deviated from the discussion in conda-forge/google-cloud-cpp-feedstock#141 and used
libgoogle-cloud-common
as the name for the common library. Usinglibgoogle-cloud
looks like would break existing downstream packages and projects.
Can you elaborate what would break? Given the pinning & run-export on google-cloud-cpp, these new packages would not be pulled in without a migration, and such a migration would enable us to validate whether given feedstocks need more than the common libs (there aren't that many consumers anyway).
I don't feel too strongly, but out of the 3 libgoogle-cloud{,-common,-all}
, I feel that 2 should suffice.
Though I guess we could have an additional level between the core package and the -all
package in the form of "all the outputs of this feedstock together", if that's a grouping that'd be useful (if only to not have to sync the exact list of outputs of this feedstock into google-cloud-cpp
).
Ping? |
@h-vetinari @xhochy any thoughts? |
Ping? |
Will try to take a look early next week. Sorry for the wait, busy times, not a lot of FOSS time (and lots of notifications...) |
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.
Basically this looks very good, though a couple of minor points remain.
The one thing that worries me is that test_subpackage("common")
apparently succeeded where that should be impossible after the removal of that suffix, which means we'll have to be very careful that the macro-approach works correctly.
...oogle-cloud-cpp-core/patches/0001-fix-oauth2-only-enable-via-GOOGLE_CLOUD_CPP_ENABLE-1.patch
Show resolved
Hide resolved
Thanks for the review. Please take another look. |
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.
Aside from some small remaining nits, this LGTM, thanks a lot @coryan! 🥳
Given that this PR is a bit unusual in that:
- we're splitting up an existing recipe that times out due to CI constraints (see discussion)
- due to the similarity of the subcomponents, a lot of functionality is broken out into macros
... I'd like to ask for some more eyes on this if possible.
PTAL @conda-forge/help-c-cpp
CC @conda-forge/core
CC @beckermr @wolfv @jakirkham @isuruf about the macro usage |
Last call for comments, will merge on Tuesday otherwise. |
MACOSX_DEPLOYMENT_TARGET: | ||
- 10.13 # [osx and x86_64] |
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.
Seeing issues with feedstock creation for this recipe. Think it has to do with the fact that we are modifying MACOSX_DEPLOYMENT_TARGET
, but not restricting that modification to osx and x86_64
, which has an adverse affect on other architectures (like osx and arm64
). So think we want to add a selector to MACOSX_DEPLOYMENT_TARGET
(as shown below)
MACOSX_DEPLOYMENT_TARGET: | |
- 10.13 # [osx and x86_64] | |
MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64] | |
- 10.13 # [osx and x86_64] |
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, done in d4fe07d
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.
Not sure what's happening here. The create_feedstocks
job still failed, but an empty https://github.com/conda-forge/google-cloud-cpp-core-feedstock got created already.
Hmm...looking at a recent feedstock conversion job it still fails. This is happening as part of File "/home/runner/Miniforge3/lib/python3.10/site-packages/conda_build/metadata.py", line 2146, in extract_single_output_text
output = output_matches[output_index] if output_matches else ""
IndexError: list index out of range |
This might be related to the use of jinja macros...? Though the CI here was fine, so it's running in some other configuration... |
Not sure. Maybe the thing to do would be to debug this locally? For whoever might try this, would suggest installing # Clone and `cd` into `staged-recipes` (if not already done)
git clone https://github.com/conda-forge/staged-recipes
cd staged-recipes/recipes
# Use `conda-smithy` to create repo locally
conda smithy init google-cloud-cpp-core
cd google-cloud-cpp-core-feedstock
conda smithy rerender -c auto That should reproduce the same error |
It is not the Jinja macros, at least not yet. The function is called with Alternatively, we can rename the feedstock: git diff
diff --git a/recipes/google-cloud-cpp-core/meta.yaml b/recipes/google-cloud-cpp-core/meta.yaml
index f5e0c9a45d..aa74b0cf72 100644
--- a/recipes/google-cloud-cpp-core/meta.yaml
+++ b/recipes/google-cloud-cpp-core/meta.yaml
@@ -139,7 +139,7 @@ test:
{%- endmacro %}
package:
- name: google-cloud-cpp-core
+ name: libgoogle-cloud
version: {{ version }}
source: That worked locally, using the |
If you are ok changing the top-level package name, that sounds like a good plan Think If this sounds reasonable @coryan , could you please open a PR to make the change? |
I think what's happening is that we're running into conda/conda-build#5097 |
No, that's not a good idea. In multi-output recipes the recipe-name (under |
Hmm...thought the top-level package name was conflicting and we were renaming it not to conflict. Maybe I misunderstood the proposed change |
TIL.
The putative fixes for this bug do not seem to work: ~/miniconda3/bin/conda list conda-build
# packages in environment at /usr/local/google/home/coryan/miniconda3:
#
# Name Version Build Channel
conda-build 3.28.1 py311h38be061_0 conda-forge and yet:
|
package: | ||
name: google-cloud-cpp-core | ||
version: {{ version }} |
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.
Don't think issue ( conda/conda-build#5097 ) applies as package/version
is defined
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.
Fair enough. I am a little out of my depth here.
Should I rollback the PR and start over?
Should I manually expand the Jinja macros?
Should I assume conda-build
needs a fix and try to figure it out?
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.
Don't think issue ( conda/conda-build#5097 ) applies as
package/version
is defined
But they're not defined for every output, which is what I understood that issue to be about
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.
The issue says top level
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 manually expanded the Jinja macros, that seems to work: #24818
google-cloud-cpp
is too large to compile in a single feedstock. The CI builds timeout before all the code is compiled.This PR proposes a new
google-cloud-cpp-core
feedstock forgoogle-cloud-cpp
that packages (1) the common libraries used by allgoogle-cloud-cpp
features, and (2) the most popular features ofgoogle-cloud-cpp
.These packages are small enough to compile in a single feedstock.
Future PRs will introduce other feedstocks that package more features of
google-cloud-cpp
.In these new feedstocks the runtime packages are named
libgoogle-cloud-{feat}
, and the development packages are namedlibgoogle-cloud-{feat}-devel
.The
libgoogle-cloud
/libgoogle-cloud-devel
package pair contains the common libraries used by all (or nearly all) subpackages.There are over 100 libraries in
google-cloud-cpp
, most of them are small, and most of them see little use. It is not worthwhile to create packages for all these libraries. In a future PR we will introduce thelibgoogle-cloud-all
andlibgoogle-cloud-all-devel
packages as catch alls for the smaller and less used features.When reviewing the checklist below a couple of things to notice:
google-cloud-cpp
feedstock. Happy to update the list as needed.I deviated from the discussion in conda-forge/google-cloud-cpp-feedstock#141 and used
libgoogle-cloud-common
as the name for the common library. Usinglibgoogle-cloud
looks like would break existing downstream packages and projects.Part of the work for conda-forge/google-cloud-cpp-feedstock#141
Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details).