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

feature: arm64 #1054

Merged
merged 3 commits into from
Jan 22, 2025
Merged

Conversation

shinnokdisengir
Copy link
Contributor

@shinnokdisengir shinnokdisengir commented Jan 22, 2025

Enhance arm64 Compatibility and Development Setup

Key Changes

  • Bumped the ScyllaDB container image to version 6.2 to resolve compatibility issues on arm64.
  • astarte deps are now github based
  • re2 is forced >= 1.9.8 to fix arm64 build

Minor Changes

  • fixed code to build using new deps

Scylladb old container version raises an error on macos:

```
15:06:49.420 [error] GenServer :xandra terminating
2024-11-22 16:06:49 ** (CaseClauseError) no case clause matching: {:error, {{{:badmatch, {:error, {:bad_return, {DBConnection.ConnectionPool.Pool, :init, {:child_spec, 1}}}}},
[{DBConnection.ConnectionPool, :init, 1, [file: ~c"lib/db_connection/connection_pool.ex", line: 48]},
{:gen_server, :init_it, 2, [file: ~c"gen_server.erl", line: 962]},
{:gen_server, :init_it, 6, [file: ~c"gen_server.erl", line: 917]}, {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 241]}]}, {:child, :undefined, {{172, 20, 0, 5}, 9042}, {Xandra, :start_link,
[[authentication: {Xandra.Authenticator.Password, [username: "cassandra", password: "cassandra"]}, pool_size: 10, encryption: false, nodes: ["172.20.0.5:9042"],
registry: :"Elixir.Xandra.ClusterRegistry.9", connection_listeners: [#PID<0.1354.0>]]]}, :transient, false, 5000, :worker
````

Signed-off-by: Gabriele Ghio <[email protected]>
@shinnokdisengir shinnokdisengir marked this pull request as ready for review January 22, 2025 12:23
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.22%. Comparing base (e7c1eb7) to head (17f5729).
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1054      +/-   ##
==========================================
- Coverage   69.23%   69.22%   -0.02%     
==========================================
  Files         275      275              
  Lines        7193     7193              
==========================================
- Hits         4980     4979       -1     
- Misses       2213     2214       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- astarte platform deps are now github based
- forced re2 to use >= 1.9.8
Comment on lines 100 to 105
raise Xandra.Error, reason: :agreement_timeout, message: "Schema agreement wait timeout."

{:error, :no_schema_change} ->
Xandra.Error.new(:no_schema_change, "Statement did not change the schema_version.")
raise Xandra.Error,
reason: :no_schema_change,
message: "Statement did not change the schema_version."
Copy link
Collaborator

Choose a reason for hiding this comment

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

raises here would break the flow in some places where the function is called inside a with (e.g. here). Let's go back to use the {:error, %Xandra.Error{}} return value

- Xandra.Error.new -> raise Xandra.Error
@Annopaolo Annopaolo merged commit 7e10975 into astarte-platform:master Jan 22, 2025
29 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants