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

[emailservice] Update Ruby version and bump dependencies #863

Closed

Conversation

julianocosta89
Copy link
Member

@julianocosta89 julianocosta89 commented Apr 30, 2023

Changes

This PR updates Ruby version to 3.2.2 and bumps dependencies to the latest.

Merge Requirements

For new features contributions please make sure you have completed the following
essential items:

  • CHANGELOG.md updated to document new feature additions

Maintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.

@julianocosta89 julianocosta89 requested a review from a team April 30, 2023 15:54
Copy link
Member

@mviitane mviitane left a comment

Choose a reason for hiding this comment

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

Causes some issues to start the service on mac M1

email-service            | <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- google/protobuf_c (LoadError)
email-service            | Did you mean?  google/protobuf
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from /usr/local/bundle/gems/google-protobuf-3.22.3-aarch64-linux/lib/google/protobuf.rb:51:in `rescue in <top (required)>'
email-service            | 	from /usr/local/bundle/gems/google-protobuf-3.22.3-aarch64-linux/lib/google/protobuf.rb:48:in `<top (required)>'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from /usr/local/bundle/gems/googleapis-common-protos-types-1.6.0/lib/google/rpc/status_pb.rb:4:in `<top (required)>'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from /usr/local/bundle/gems/opentelemetry-exporter-otlp-0.24.0/lib/opentelemetry/exporter/otlp/exporter.rb:13:in `<top (required)>'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from /usr/local/bundle/gems/opentelemetry-exporter-otlp-0.24.0/lib/opentelemetry/exporter/otlp.rb:7:in `<top (required)>'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from email_server.rb:9:in `<main>'
email-service            | <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': Error loading shared library ld-linux-aarch64.so.1: No such file or directory (needed by /usr/local/bundle/gems/google-protobuf-3.22.3-aarch64-linux/lib/google/3.2/protobuf_c.so) - /usr/local/bundle/gems/google-protobuf-3.22.3-aarch64-linux/lib/google/3.2/protobuf_c.so (LoadError)
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from /usr/local/bundle/gems/google-protobuf-3.22.3-aarch64-linux/lib/google/protobuf.rb:49:in `<top (required)>'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from /usr/local/bundle/gems/googleapis-common-protos-types-1.6.0/lib/google/rpc/status_pb.rb:4:in `<top (required)>'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from /usr/local/bundle/gems/opentelemetry-exporter-otlp-0.24.0/lib/opentelemetry/exporter/otlp/exporter.rb:13:in `<top (required)>'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from /usr/local/bundle/gems/opentelemetry-exporter-otlp-0.24.0/lib/opentelemetry/exporter/otlp.rb:7:in `<top (required)>'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
email-service            | 	from email_server.rb:9:in `<main>'
email-service exited with code 1

@julianocosta89
Copy link
Member Author

@mviitane would you be able to try it out again?

@mviitane
Copy link
Member

mviitane commented May 2, 2023

@mviitane would you be able to try it out again?

Didn't help, same problem still.

@julianocosta89
Copy link
Member Author

@mviitane borrowed a M1 to troubleshoot 😅

I've removed the Gemfile.lock that usually is not committed and added a --platform to the FROM command.
Now to build it for Mac, you need to run:

docker compose build emailservice --build-arg BUILDPLATFORM=linux/arm/v6

I still need to check how I can add that to the GH action in order to build it during releasae, as just linux/arm will fail.

But now we can build and run the updated email service.

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@puckpuck
Copy link
Contributor

@mviitane can you test this one again to see if the latest fix Juliano made fixes this for you?

@mviitane
Copy link
Member

@mviitane can you test this one again to see if the latest fix Juliano made fixes this for you?

@puckpuck same problem still. The build is fine but crashes during the start with the same error printout as above.

@julianocosta89
Copy link
Member Author

My last update should have fixed it.

I've tested in M1.

But I won't be able to take a look at it so soon.
Let's close this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants