-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Update PHP & Ruby Mac BUILD #24860
Update PHP & Ruby Mac BUILD #24860
Conversation
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 taking care of this! And just to confirm: PHP 7.2 and PHPUnit 8.x are the correct versions where we want to be at.
86414ec
to
b0a9352
Compare
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 generally looking fine, but I have a few suggestions.
Also, please make sure you're not breaking Grpc.Tools nuget package build (currently that's the case).
@@ -25,6 +25,9 @@ ulimit -a | |||
# - try adding a dependency under a language-specific section first (reduces latency and increases build stability) | |||
# - only add stuff that you absolutely need for your builds to work (add comment to explain why its needed) | |||
|
|||
# Disable HOMEBREW update to avoid new updates which potentially have problems. | |||
export HOMEBREW_NO_AUTO_UPDATE=1 |
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.
sg.
suggestion: would it be cleaner to also explictly checkout homebrew-core so that things are at a known state?
Like this we are relying on what is the last commit available on kokoro macos workers and we have no control of that. I think it would be worth checking what's the commit provided by the current mojave kokoro workers and pinning it (or at least mentioning it in a comment, so that troubleshooting is easier).
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 briefly updated it to include more info on why its update is disabled and the current version of the core repository. I didn't fix the version because it's meant to use the version when the image was built and it will change when migrating to Catalina or Big sure in future.
for RUBY_VERSION in 2.5.0 2.7.0; do | ||
# TODO(jtattermusch): find a better way of installing ruby, as the current way installs a huge number |
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.
sg if all ruby builds still work fine after this.
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.
Yep it works :)
@@ -129,8 +96,15 @@ then | |||
export DOTNET_CLI_TELEMETRY_OPTOUT=true | |||
fi | |||
|
|||
# PHP tests currently require using an older version of PHPUnit | |||
ln -sf /usr/local/bin/phpunit-5.7 /usr/local/bin/phpunit | |||
if [ "${PREPARE_BUILD_INSTALL_DEPS_PHP}" == "true" ] |
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.
+1, very nice.
@@ -348,7 +348,6 @@ def targets(): | |||
ProtocArtifact('linux', 'x64'), | |||
ProtocArtifact('linux', 'x86'), | |||
ProtocArtifact('macos', 'x64'), | |||
ProtocArtifact('macos', 'x86'), |
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.
as is, this will break the build of Grpc.Tools nuget package (run an adhoc artifact/packages/distribtest flow to see that)
two options:
- we remove the x86 protoc artifact in a separate PR (and I can help with adjusting C#).
- you also include the Grpc.Tools fix here
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.
Removing these should be enough to make the nuget package build pass?
<_Asset PackagePath="tools/linux_x64/" Include="$(Assets_GrpcPlugins)protoc_linux_x64/grpc_csharp_plugin" /> |
<_Asset PackagePath="tools/macosx_x86/" Include="$(Assets_ProtoCompiler)macos_x86/protoc" /> <!-- GPB: macosx--> |
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! I included this in this PR.
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 once my comments are resolved and tests are looking good (including the artifact - package build - distribtest flow).
Artifact macos build fails with:
|
It is expected because this PR assumes that it runs on Mojave machines while the presubmit is still using High Sierra which doesn't have Python 3.7 and 3.8 installed. |
FYI, this PR has been tested with the Adhoc MacOS job on Mojave for PHP, Python, Ruby, and BuildArtifacts. |
#24870 has been merged - you can rebase now. |
@@ -95,7 +95,7 @@ def create_jobspec(name, | |||
return jobspec | |||
|
|||
|
|||
_MACOS_COMPAT_FLAG = '-mmacosx-version-min=10.7' | |||
_MACOS_COMPAT_FLAG = '-mmacosx-version-min=10.10' |
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.
qq: is this really needed?
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 doesn't need to be part of this PR but I just make this consistent with the all other settings for OSX.
Got it, so you plan to merge this PR at the same time as submitting the cl that upgrades the mac jobs to mojave, right? That kind of works, but I'd prefer this approach:
|
4297d44
to
3a01cfd
Compare
@jtattermusch You're right about my intention. I planned to do interlocked update with this and the internal CL because it doesn't seem feasible to make this run on both High Sierra and Mojave due to Ruby and PHP. Somehow it seems to work so let me try to make this runnable on both. Having Python 3.7 and 3.8 installed on High Sierra with conditional statements shouldn't be hard. |
I'll merge this tomorrow (Dec 4) morning so that I can take action when something goes wrong. |
The ObjC test failures seems like a flake unrelated to this PR: https://source.cloud.google.com/results/invocations/4c06f976-a8a9-4620-bb0e-d79a9a2e152f/targets/github%2Fgrpc%2Frun_tests%2Fobjc_macos_opt_native%2Fios-test-interoptests/tests |
@veblush This PR is looking good, so I'll actually merge it now to get the advantage of getting a few runs in before (your) morning. |
This is mainly to use Mojave for PHP, Ruby, and BuildArtifacts.
-mmacosx-version-min=10.10
to be consistent with other gRPC artifacts.