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

Release ruby and other bindings when core is released #36507

Open
technicalpickles opened this issue May 2, 2024 · 4 comments
Open

Release ruby and other bindings when core is released #36507

technicalpickles opened this issue May 2, 2024 · 4 comments

Comments

@technicalpickles
Copy link

technicalpickles commented May 2, 2024

Over in #36464 , there were a few days between when core 1.63.0 was released and the ruby gem for 1.63.0 was released cc #36464

Looking back at the grpc gem on rubygems, it is missing other core releases:

  • 1.61.2
  • 1.62.1
  • 1.62.2

@jonyscathe said there was a delay for python as well with 1.63.0 #36464

@apolcyn
Copy link
Contributor

apolcyn commented May 2, 2024

Generally speaking, if we're not publishing a patch release in ruby it's because the patch doesn't affect ruby. The minor releases mentioned for example only affect python and C++ grpc libs.

Note the core release itself is already a manual process overall, most of it is automated but requires a human to upload the final packages (removing that final human step would be a bit tricky/risky to set up). Unfortunately delays can happen, typically when folks are out of office, but we try to keep delays small.

The kind of problem in #36464 (the ruby runtime making a patch release that's incompatible with the grpc gem) is uncommon - I can't think of a case where that's happened before.

@technicalpickles
Copy link
Author

if we're not publishing a patch release in ruby it's because the patch doesn't affect ruby

Thanks for confirming! I was looking over the release notes, and did realize after I posted that there weren't ruby specific changes in those releases.

Note the core release itself is already a manual process overall, most of it is automated but requires a human to upload the final packages (removing that final human step would be a bit tricky/risky to set up)

I understand. I was wondering if you know where the automation for ruby releasees are? I checked all over the repo, and couldn't find anything

@apolcyn
Copy link
Contributor

apolcyn commented May 13, 2024

There is a collection of scripts, a fair amount of indirection, and some internal scripts, so the automation logic a little hard to point out completely.

RubyArtifact("linux", "x86-mingw32", presubmit=True),
is a breadcrumb.

@technicalpickles
Copy link
Author

if we're not publishing a patch release in ruby it's because the patch doesn't affect ruby.

I am looking at https://github.com/grpc/grpc/releases/tag/v1.64.0 which did get a release, but doesn't have anything for Ruby. Do changes to Core mean that all the bindings would also get a release


Following some more of the breadcrumbs:

class RubyArtifact:
"""Builds ruby native gem."""
def __init__(self, platform, gem_platform, presubmit=False):
self.name = "ruby_native_gem_%s_%s" % (platform, gem_platform)
self.platform = platform
self.gem_platform = gem_platform
self.labels = ["artifact", "ruby", platform, gem_platform]
if presubmit:
self.labels.append("presubmit")
def pre_build_jobspecs(self):
return []
def build_jobspec(self, inner_jobs=None):
environ = {}
if inner_jobs is not None:
# set number of parallel jobs when building native extension
environ["GRPC_RUBY_BUILD_PROCS"] = str(inner_jobs)
# Ruby build uses docker internally and docker cannot be nested.
# We are using a custom workspace instead.
return create_jobspec(
self.name,
[
"tools/run_tests/artifacts/build_artifact_ruby.sh",
self.gem_platform,
],
use_workspace=True,
timeout_seconds=90 * 60,
environ=environ,
)

RubyArtifact("linux", "x86-mingw32", presubmit=True),
RubyArtifact("linux", "x64-mingw32", presubmit=True),
RubyArtifact("linux", "x64-mingw-ucrt", presubmit=True),
RubyArtifact("linux", "x86_64-linux", presubmit=True),
RubyArtifact("linux", "x86-linux", presubmit=True),
RubyArtifact("linux", "aarch64-linux", presubmit=True),
RubyArtifact("linux", "x86_64-darwin", presubmit=True),
RubyArtifact("linux", "arm64-darwin", presubmit=True),

bundle exec rake "gem:native[${GEM_PLATFORM}]"
if [ "$SYSTEM" == "Darwin" ] ; then
# TODO: consider rewriting this to pass shellcheck
# shellcheck disable=SC2046,SC2010
rm $(ls pkg/*.gem | grep -v darwin)
fi
mkdir -p "${ARTIFACTS_OUT}"
cp pkg/*.gem "${ARTIFACTS_OUT}"/

That all produces the gems, but I have yet to see something that pushes to rubygems.org

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

No branches or pull requests

2 participants