Skip to content

Support for prebuilt Ruby binary on x64-mingw-ucrt platform#29684

Merged
apolcyn merged 2 commits intogrpc:masterfrom
johnnyshields:support-ruby-mingw-ucrt
May 31, 2022
Merged

Support for prebuilt Ruby binary on x64-mingw-ucrt platform#29684
apolcyn merged 2 commits intogrpc:masterfrom
johnnyshields:support-ruby-mingw-ucrt

Conversation

@johnnyshields
Copy link
Copy Markdown
Contributor

Fixes #29666

Add support for prebuilt Ruby binary on x64-mingw-ucrt platform, which is used for Windows RubyInstaller Ruby 3.1+

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented May 13, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: johnnyshields / name: Johnny Shields (bb05366)

…h is used for Windows RubyInstaller Ruby 3.1+
@johnnyshields johnnyshields force-pushed the support-ruby-mingw-ucrt branch from b41014a to bb05366 Compare May 13, 2022 15:31
@johnnyshields
Copy link
Copy Markdown
Contributor Author

johnnyshields commented May 13, 2022

@apolcyn @nicolasnoble here's a draft of the mingw-ucrt build. The rake_compiler_dock image for mingw-ucrt does exist, so I believe this should be mostly a config change.

A naive attempt to build on my machine yields the following:

$ bundle exec rake gem:native plat=x64-mingw-ucrt

...
Unable to find image 'grpctesting/rake_x64-mingw-ucrt:7bdea71e6764cc6445851fb66bad35cd8efa7ac5' locally
docker: Error response from daemon: pull access denied for grpctesting/rake_x64-mingw-ucrt, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.

If someone could take a moment to look at this it would be greatly appreciated. Worth noting that mingw-ucrt is the main/only supported Windows platform starting from Ruby 3.1.

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented May 13, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@johnnyshields johnnyshields force-pushed the support-ruby-mingw-ucrt branch from 7621663 to 3b60788 Compare May 13, 2022 16:07
@nicolasnoble nicolasnoble requested a review from apolcyn May 13, 2022 16:21
@nicolasnoble
Copy link
Copy Markdown
Contributor

Likely correct. I can quickly push that docker image for local testing, hang tight.

plat_list = args[:plat]

build_configs = []
w64_ucrt = { cross: 'x86_64-w64-mingw32', out: 'grpc_c.64-ucrt.ruby', platform: 'x64-mingw-ucrt' }
Copy link
Copy Markdown
Contributor Author

@johnnyshields johnnyshields May 13, 2022

Choose a reason for hiding this comment

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

AFAIK the rake-compiler-dock docker image for ucrt uses the same gcc/g++ packages as the x64-mingw image, and patches them to use ucrt runtime.

@nicolasnoble nicolasnoble added release notes: yes Indicates if PR needs to be in release notes lang/ruby kokoro:run labels May 13, 2022
@nicolasnoble
Copy link
Copy Markdown
Contributor

I've pushed the image, if you want to retry on your end.

@johnnyshields
Copy link
Copy Markdown
Contributor Author

johnnyshields commented May 13, 2022

@nicolasnoble it worked! Was able to get a successful build. Would appreciate if the team could move forward with this PR.

Here's the artifact as evidence, ha well I know its a bit sketch to attach an untrusted binary 😆
grpc_c.64-ucrt.zip

@nicolasnoble
Copy link
Copy Markdown
Contributor

Looks good to me, I'll let @apolcyn do the second review and merge :)

@johnnyshields
Copy link
Copy Markdown
Contributor Author

Great, thanks! If it looks good, it would be wonderful if we could get a backport to v1.46.x as well.

@johnnyshields
Copy link
Copy Markdown
Contributor Author

Ok, so fun times. It looks like this may need the same change from protobuffers. https://github.com/protocolbuffers/protobuf/blob/main/ruby/Rakefile

Will raise a PR there too.

@johnnyshields
Copy link
Copy Markdown
Contributor Author

Here's the PR for protobufs: protocolbuffers/protobuf#9963

@johnnyshields
Copy link
Copy Markdown
Contributor Author

johnnyshields commented May 26, 2022

@apolcyn Protobufs support has been officially released: https://github.com/protocolbuffers/protobuf/releases/tag/v21.0

I've confirmed that it installs correctly on Windows. Please kindly merge this PR.

@johnnyshields
Copy link
Copy Markdown
Contributor Author

@nicolasnoble let's merge this?

@apolcyn
Copy link
Copy Markdown
Contributor

apolcyn commented May 31, 2022

Test failures are unrelated

@apolcyn apolcyn merged commit 6d33399 into grpc:master May 31, 2022
dennycd pushed a commit to dennycd/grpc that referenced this pull request May 31, 2022
* Add support for prebuilt Ruby binary on x64-mingw-ucrt platform, which is used for Windows RubyInstaller Ruby 3.1+
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label May 31, 2022
@johnnyshields johnnyshields deleted the support-ruby-mingw-ucrt branch June 2, 2022 15:32
@johnnyshields
Copy link
Copy Markdown
Contributor Author

@lidizheng it would be great if we could get this released as 1.46.4.

@lidizheng
Copy link
Copy Markdown
Contributor

@johnnyshields We just made a release cut for v1.47.x, cc @gnossen for deciding if we can backport or not.

apolcyn pushed a commit to apolcyn/grpc that referenced this pull request Jun 2, 2022
* Add support for prebuilt Ruby binary on x64-mingw-ucrt platform, which is used for Windows RubyInstaller Ruby 3.1+
gnossen pushed a commit that referenced this pull request Jun 3, 2022
…29868)

* Add support for prebuilt Ruby binary on x64-mingw-ucrt platform, which is used for Windows RubyInstaller Ruby 3.1+

Co-authored-by: Johnny Shields <johnny.shields@gmail.com>
johnnyshields added a commit to johnnyshields/grpc that referenced this pull request Jun 7, 2022
…) (grpc#29868)

* Add support for prebuilt Ruby binary on x64-mingw-ucrt platform, which is used for Windows RubyInstaller Ruby 3.1+
johnnyshields added a commit to johnnyshields/grpc that referenced this pull request Jun 7, 2022
…) (grpc#29868)

* Add support for prebuilt Ruby binary on x64-mingw-ucrt platform, which is used for Windows RubyInstaller Ruby 3.1+
yashykt added a commit that referenced this pull request Jul 1, 2022
* Bump version to 1.47.0-pre1 (on v1.47.x branch) (#29830)

* bump version to 1.47.0-pre1

* regenerate projects

* xDS: Workaround to get gRPC clients working with istio (#29841) (#29850)

* xDS: Workaround to get gRPC clients working with istio

* Formatting

* Comment test too

* Disable instead of commenting

* Support for prebuilt Ruby binary on x64-mingw-ucrt platform (#29684) (#29868)

* Add support for prebuilt Ruby binary on x64-mingw-ucrt platform, which is used for Windows RubyInstaller Ruby 3.1+

Co-authored-by: Johnny Shields <johnny.shields@gmail.com>

* use constraints value in @platforms instead of @bazel_tools//platforms bazelbuild/bazel#8622 (#30019)

* Set Correct Platform Tag in Wheels on Mac OS with Python 3.10 (#29857) (#30026)

* Attempt to set correct platform on Mac OS

* Add some debug

* Make it fail

* Print more

* Try again

* Maybe it's an ordering issue?

* Get logs back

* Try copying distutils to see exactly what is being used

* Actually export the variable

* I just love debugging with CI

* One directory higher this time

* Try with an upgraded Python install

* Fix version

* Rebreak

* Try setting it even earlier?

* Unbreak

* Try explicitly renaming the artifacts

* Fix

* I am about ready to start NAT hole punching for SSH

* Break things for logs

* Whoops

* Clean up

* Shellcheck

* xds-k8s jobs: standardize TESTING_VERSION (#30027) (#30048)

This Addresses the issue with skips not working in golang tests, ref b/235688697. 

1. Unifies `TESTING_VERSION` detection  in grpc_xds_k8s_install_test_driver.sh - new approach applicable to all languages.
2. Use `TESTING_VERSION` in all build files in `--testing_version` and when tagging docker images. This will be backported to all active test branches. Build Scripts in all other languages will be updated as well.

* Bump Release Version to 1.47.0 (#30073)

* bump version to 1.47.0

* regenerate projects

* Using string rep for status-time (#30123) (#30145)

* tell MSVC to build grpc with utf-8 (#30003) (#30153)

* tell MSVC to build grpc with utf-8

fix #29979

* generate_projects

Co-authored-by: AJ Heller <hork@google.com>

Co-authored-by: AJ Heller <hork@google.com>

Co-authored-by: Richard Belleville <rbellevi@google.com>
Co-authored-by: apolcyn <apolcyn@google.com>
Co-authored-by: Johnny Shields <johnny.shields@gmail.com>
Co-authored-by: Ara Nguyen <91614797+aranguyen@users.noreply.github.com>
Co-authored-by: Sergii Tkachenko <sergiitk@google.com>
Co-authored-by: Esun Kim <veblush@google.com>
Co-authored-by: hongnod <6680267+hongnod@users.noreply.github.com>
Co-authored-by: AJ Heller <hork@google.com>
@johnnyshields
Copy link
Copy Markdown
Contributor Author

johnnyshields commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bloat/none imported Specifies if the PR has been imported to the internal repository lang/ruby per-call-memory/neutral release notes: yes Indicates if PR needs to be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ruby: Support prebuilt binaries for x64-mingw-ucrt platform

5 participants