From b219689154668a9a32f773bd6a36ddbaaa51d4c5 Mon Sep 17 00:00:00 2001 From: Francesco Noacco Date: Thu, 28 Nov 2024 11:32:24 +0100 Subject: [PATCH] refactor(appengine): exandra queries for device The first installment in the effort of refactoring the device module. The change can be made little by little as exandra and cqex queries can coexist. This change ports a few queries to exandra, without making any big logic refactor, but we can see the future direction of this refactor: Astarte.AppEngine.API.Device.Queries becomes a module to expose _queries_ and not data from the database directly. For this iteration, this is enough to elegantly use the queries in the Device module, but more complex queries may require a more in-depth refactor. The following queries have been ported: - `retrieve_interfaces_list` - `retrieve_all_endpoints_for_interface!` - `retrieve_mapping` - `prepare_value_type_query` / `execute_value_type_query` Signed-off-by: Francesco Noacco --- apps/astarte_appengine_api/.formatter.exs | 2 +- .../astarte_appengine_api/device/device.ex | 121 ++++++++----- .../astarte_appengine_api/device/queries.ex | 171 +++++++----------- apps/astarte_appengine_api/mix.exs | 7 +- apps/astarte_appengine_api/mix.lock | 29 +-- .../controllers/groups_controller_test.exs | 4 +- .../plug/group_name_decoder_test.exs | 4 +- 7 files changed, 160 insertions(+), 178 deletions(-) diff --git a/apps/astarte_appengine_api/.formatter.exs b/apps/astarte_appengine_api/.formatter.exs index a07620189..da9ce397c 100644 --- a/apps/astarte_appengine_api/.formatter.exs +++ b/apps/astarte_appengine_api/.formatter.exs @@ -1,4 +1,4 @@ [ - import_deps: [:phoenix, :ecto, :skogsra, :stream_data], + import_deps: [:phoenix, :ecto, :skogsra], inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] ] diff --git a/apps/astarte_appengine_api/lib/astarte_appengine_api/device/device.ex b/apps/astarte_appengine_api/lib/astarte_appengine_api/device/device.ex index 497ad615a..63f6adb9a 100644 --- a/apps/astarte_appengine_api/lib/astarte_appengine_api/device/device.ex +++ b/apps/astarte_appengine_api/lib/astarte_appengine_api/device/device.ex @@ -1,7 +1,7 @@ # # This file is part of Astarte. # -# Copyright 2017-2023 Ispirata Srl +# Copyright 2017 - 2025 SECO Mind Srl # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,8 +31,6 @@ defmodule Astarte.AppEngine.API.Device do alias Astarte.Core.CQLUtils alias Astarte.Core.Device alias Astarte.Core.InterfaceDescriptor - alias Astarte.Core.Interface.Aggregation - alias Astarte.Core.Interface.Type alias Astarte.Core.Mapping alias Astarte.Core.Mapping.EndpointsAutomaton alias Astarte.Core.Mapping.ValueType @@ -40,10 +38,13 @@ defmodule Astarte.AppEngine.API.Device do alias Astarte.DataAccess.Mappings alias Astarte.DataAccess.Device, as: DeviceQueries alias Astarte.DataAccess.Interface, as: InterfaceQueries + alias Astarte.DataAccess.Repo alias Ecto.Changeset alias Astarte.Core.CQLUtils require Logger + import Ecto.Query + def list_devices!(realm_name, params) do changeset = DevicesListOptions.changeset(%DevicesListOptions{}, params) @@ -161,9 +162,12 @@ defmodule Astarte.AppEngine.API.Device do Returns the list of interfaces. """ def list_interfaces(realm_name, encoded_device_id) do - with {:ok, client} <- Database.connect(realm: realm_name), - {:ok, device_id} <- Device.decode_device_id(encoded_device_id) do - Queries.retrieve_interfaces_list(client, device_id) + device_introspection = Queries.retrieve_interfaces_list(realm_name) + + with {:ok, device_id} <- Device.decode_device_id(encoded_device_id), + {:ok, device} <- Repo.fetch(device_introspection, device_id, error: :device_not_found) do + interface_names = device.introspection |> Map.keys() + {:ok, interface_names} end end @@ -182,9 +186,10 @@ defmodule Astarte.AppEngine.API.Device do {:ok, interface_row} <- InterfaceQueries.retrieve_interface_row(realm_name, interface, major_version) do do_get_interface_values!( + realm_name, client, device_id, - Aggregation.from_int(interface_row[:aggregation]), + interface_row.aggregation, interface_row, options ) @@ -210,16 +215,14 @@ defmodule Astarte.AppEngine.API.Device do {:ok, interface_descriptor} <- InterfaceDescriptor.from_db_result(interface_row), {:ok, endpoint_ids} <- get_endpoint_ids(interface_descriptor.automaton, path, allow_guess: true) do - endpoint_query = Queries.prepare_value_type_query(interface_row[:interface_id]) - do_get_interface_values!( + realm_name, client, device_id, - Aggregation.from_int(interface_row[:aggregation]), - Type.from_int(interface_row[:type]), + interface_row.aggregation, + interface_row.type, interface_row, endpoint_ids, - endpoint_query, path, options ) @@ -235,8 +238,12 @@ defmodule Astarte.AppEngine.API.Device do raw_value ) do with {:ok, [endpoint_id]} <- get_endpoint_ids(interface_descriptor.automaton, path), - mapping <- - Queries.retrieve_mapping(client, interface_descriptor.interface_id, endpoint_id), + mapping = + Queries.retrieve_mapping(realm_name) + |> Repo.get_by!(%{ + interface_id: interface_descriptor.interface_id, + endpoint_id: endpoint_id + }), {:ok, value} <- InterfaceValue.cast_value(mapping.value_type, raw_value), :ok <- validate_value_type(mapping.value_type, value), wrapped_value = wrap_to_bson_struct(mapping.value_type, value), @@ -726,7 +733,12 @@ defmodule Astarte.AppEngine.API.Device do {:ownership, :server} <- {:ownership, interface_descriptor.ownership}, path <- "/" <> no_prefix_path, {:ok, [endpoint_id]} <- get_endpoint_ids(interface_descriptor.automaton, path) do - mapping = Queries.retrieve_mapping(client, interface_descriptor.interface_id, endpoint_id) + mapping = + Queries.retrieve_mapping(realm_name) + |> Repo.get_by!(%{ + interface_id: interface_descriptor.interface_id, + endpoint_id: endpoint_id + }) Queries.insert_value_into_db( client, @@ -768,9 +780,10 @@ defmodule Astarte.AppEngine.API.Device do end end - defp do_get_interface_values!(client, device_id, :individual, interface_row, opts) do + defp do_get_interface_values!(realm_name, client, device_id, :individual, interface_row, opts) do endpoint_rows = - Queries.retrieve_all_endpoint_ids_for_interface!(client, interface_row[:interface_id]) + Queries.retrieve_all_endpoint_ids_for_interface!(realm_name, interface_row.interface_id) + |> Repo.all() values_map = Enum.reduce(endpoint_rows, %{}, fn endpoint_row, values -> @@ -779,10 +792,10 @@ defmodule Astarte.AppEngine.API.Device do retrieve_endpoint_values( client, device_id, - Aggregation.from_int(interface_row[:aggregation]), - Type.from_int(interface_row[:type]), + interface_row.aggregation, + interface_row.type, interface_row, - endpoint_row[:endpoint_id], + endpoint_row.endpoint_id, endpoint_row, "/", opts @@ -794,43 +807,50 @@ defmodule Astarte.AppEngine.API.Device do {:ok, %InterfaceValues{data: MapTree.inflate_tree(values_map)}} end - defp do_get_interface_values!(client, device_id, :object, interface_row, opts) do + defp do_get_interface_values!(realm_name, client, device_id, :object, interface_row, opts) do # We need to know if mappings have explicit_timestamp set, so we retrieve it from the # first one. endpoint = - Queries.retrieve_all_endpoint_ids_for_interface!(client, interface_row[:interface_id]) - |> CQEx.Result.head() + Queries.retrieve_all_endpoint_ids_for_interface!(realm_name, interface_row.interface_id) + |> limit(1) + |> Repo.one!() mapping = - Queries.retrieve_mapping(client, interface_row[:interface_id], endpoint[:endpoint_id]) + Queries.retrieve_mapping(realm_name) + |> Repo.get_by!(%{ + interface_id: interface_row.interface_id, + endpoint_id: endpoint.endpoint_id + }) do_get_interface_values!( + realm_name, client, device_id, - Aggregation.from_int(interface_row[:aggregation]), - Type.from_int(interface_row[:type]), + interface_row.aggregation, + interface_row.type, interface_row, nil, - nil, "/", %{opts | explicit_timestamp: mapping.explicit_timestamp} ) end defp do_get_interface_values!( + realm_name, client, device_id, :individual, :properties, interface_row, endpoint_ids, - endpoint_query, path, opts ) do result = List.foldl(endpoint_ids, %{}, fn endpoint_id, values -> - endpoint_row = Queries.execute_value_type_query(client, endpoint_query, endpoint_id) + endpoint_row = + Queries.value_type_query(realm_name) + |> Repo.get_by!(%{interface_id: interface_row.interface_id, endpoint_id: endpoint_id}) value = retrieve_endpoint_values( @@ -861,19 +881,21 @@ defmodule Astarte.AppEngine.API.Device do end defp do_get_interface_values!( + realm_name, client, device_id, :individual, :datastream, interface_row, endpoint_ids, - endpoint_query, path, opts ) do [endpoint_id] = endpoint_ids - endpoint_row = Queries.execute_value_type_query(client, endpoint_query, endpoint_id) + endpoint_row = + Queries.value_type_query(realm_name) + |> Repo.get_by!(%{interface_id: interface_row.interface_id, endpoint_id: endpoint_id}) retrieve_endpoint_values( client, @@ -889,27 +911,33 @@ defmodule Astarte.AppEngine.API.Device do end defp do_get_interface_values!( + realm_name, client, device_id, :object, :datastream, interface_row, _endpoint_ids, - _endpoint_query, path, opts ) do # We need to know if mappings have explicit_timestamp set, so we retrieve it from the # first one. endpoint = - Queries.retrieve_all_endpoint_ids_for_interface!(client, interface_row[:interface_id]) - |> CQEx.Result.head() + Queries.retrieve_all_endpoint_ids_for_interface!(realm_name, interface_row.interface_id) + |> limit(1) + |> Repo.one!() mapping = - Queries.retrieve_mapping(client, interface_row[:interface_id], endpoint[:endpoint_id]) + Queries.retrieve_mapping(realm_name) + |> Repo.get_by!(%{ + interface_id: interface_row.interface_id, + endpoint_id: endpoint.endpoint_id + }) endpoint_rows = - Queries.retrieve_all_endpoints_for_interface!(client, interface_row[:interface_id]) + Queries.retrieve_all_endpoints_for_interface!(realm_name, interface_row.interface_id) + |> Repo.all() interface_values = retrieve_endpoint_values( @@ -983,7 +1011,7 @@ defmodule Astarte.AppEngine.API.Device do ) do path = "/" - interface_id = interface_row[:interface_id] + interface_id = interface_row.interface_id values = Queries.retrieve_all_endpoint_paths!(client, device_id, interface_id, endpoint_id) @@ -1017,7 +1045,7 @@ defmodule Astarte.AppEngine.API.Device do nice_value = AstarteValue.to_json_friendly( v, - ValueType.from_int(endpoint_row[:value_type]), + endpoint_row.value_type, fetch_biginteger_opts_or_default(opts) ) @@ -1058,9 +1086,9 @@ defmodule Astarte.AppEngine.API.Device do ) do path = "/" - interface_id = interface_row[:interface_id] + interface_id = interface_row.interface_id - endpoint_id = CQLUtils.endpoint_id(interface_row[:name], interface_row[:major_version], "") + endpoint_id = CQLUtils.endpoint_id(interface_row.name, interface_row.major_version, "") {count, paths} = Queries.retrieve_all_endpoint_paths!(client, device_id, interface_id, endpoint_id) @@ -1155,10 +1183,10 @@ defmodule Astarte.AppEngine.API.Device do Enum.reduce(endpoint_rows, {"", %{}, nil}, fn endpoint, {query_acc, atoms_map, prev_downsample_column_atom} -> - endpoint_name = endpoint[:endpoint] + endpoint_name = endpoint.endpoint column_name = CQLUtils.endpoint_to_db_column_name(endpoint_name) - value_type = endpoint[:value_type] |> ValueType.from_int() + value_type = endpoint.value_type next_query_acc = "#{query_acc} #{column_name}, " column_atom = String.to_atom(column_name) @@ -1247,7 +1275,7 @@ defmodule Astarte.AppEngine.API.Device do nice_value = AstarteValue.to_json_friendly( row_value, - ValueType.from_int(endpoint_row[:value_type]), + endpoint_row.value_type, fetch_biginteger_opts_or_default(opts) ) @@ -1380,8 +1408,7 @@ defmodule Astarte.AppEngine.API.Device do :datetime, keep_milliseconds: opts.keep_milliseconds ), - "value" => - AstarteValue.to_json_friendly(v, ValueType.from_int(endpoint_row[:value_type]), []) + "value" => AstarteValue.to_json_friendly(v, endpoint_row.value_type, []) } end @@ -1416,7 +1443,7 @@ defmodule Astarte.AppEngine.API.Device do AstarteValue.to_json_friendly(tstamp, :datetime, []), AstarteValue.to_json_friendly( v, - ValueType.from_int(endpoint_row[:value_type]), + endpoint_row.value_type, keep_milliseconds: opts.keep_milliseconds ) ] @@ -1449,7 +1476,7 @@ defmodule Astarte.AppEngine.API.Device do [{:value_timestamp, tstamp}, _, _, {_, v}] = value [ - AstarteValue.to_json_friendly(v, ValueType.from_int(endpoint_row[:value_type]), []), + AstarteValue.to_json_friendly(v, endpoint_row.value_type, []), AstarteValue.to_json_friendly( tstamp, :datetime, diff --git a/apps/astarte_appengine_api/lib/astarte_appengine_api/device/queries.ex b/apps/astarte_appengine_api/lib/astarte_appengine_api/device/queries.ex index 1c68e4406..c861f015f 100644 --- a/apps/astarte_appengine_api/lib/astarte_appengine_api/device/queries.ex +++ b/apps/astarte_appengine_api/lib/astarte_appengine_api/device/queries.ex @@ -1,7 +1,7 @@ # # This file is part of Astarte. # -# Copyright 2017-2018 Ispirata Srl +# Copyright 2017 - 2025 SECO Mind Srl # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,6 +17,8 @@ # defmodule Astarte.AppEngine.API.Device.Queries do + import Ecto.Query + alias Astarte.AppEngine.API.Config alias Astarte.AppEngine.API.Device.DeviceStatus alias Astarte.AppEngine.API.Device.DevicesList @@ -25,11 +27,13 @@ defmodule Astarte.AppEngine.API.Device.Queries do alias Astarte.Core.CQLUtils alias Astarte.Core.Device alias Astarte.Core.InterfaceDescriptor - alias Astarte.Core.Mapping - alias Astarte.Core.Mapping.ValueType - alias Astarte.Core.StorageType alias CQEx.Query, as: DatabaseQuery alias CQEx.Result, as: DatabaseResult + + alias Astarte.DataAccess.Realms.Device, as: DatabaseDevice + alias Astarte.DataAccess.Realms.Endpoint, as: DatabaseEndpoint + alias Astarte.DataAccess.Astarte.Realm + require CQEx require Logger @@ -37,88 +41,50 @@ defmodule Astarte.AppEngine.API.Device.Queries do DatabaseResult.head(values) end - @spec retrieve_interfaces_list(:cqerl.client(), binary) :: - {:ok, list(String.t())} | {:error, atom} - def retrieve_interfaces_list(client, device_id) do - device_introspection_statement = """ - SELECT introspection - FROM devices - WHERE device_id=:device_id - """ + def retrieve_interfaces_list(realm_name) do + keyspace = Realm.keyspace_name(realm_name) - device_introspection_query = - DatabaseQuery.new() - |> DatabaseQuery.statement(device_introspection_statement) - |> DatabaseQuery.put(:device_id, device_id) - - with {:ok, result} <- DatabaseQuery.call(client, device_introspection_query), - [introspection: introspection_or_nil] <- DatabaseResult.head(result) do - introspection = introspection_or_nil || [] - - interfaces_list = - for {interface_name, _interface_major} <- introspection do - interface_name - end - - {:ok, interfaces_list} - else - :empty_dataset -> - {:error, :device_not_found} - - {:error, reason} -> - _ = Logger.warning("Database error: #{inspect(reason)}.", tag: "db_error") - {:error, :database_error} - end + from DatabaseDevice, + prefix: ^keyspace, + select: [:introspection] end - def retrieve_all_endpoint_ids_for_interface!(client, interface_id) do - endpoints_with_type_statement = """ - SELECT value_type, endpoint_id - FROM endpoints - WHERE interface_id=:interface_id - """ - - endpoint_query = - DatabaseQuery.new() - |> DatabaseQuery.statement(endpoints_with_type_statement) - |> DatabaseQuery.put(:interface_id, interface_id) + def retrieve_all_endpoint_ids_for_interface!(realm_name, interface_id) do + keyspace = Realm.keyspace_name(realm_name) - DatabaseQuery.call!(client, endpoint_query) + from DatabaseEndpoint, + prefix: ^keyspace, + where: [interface_id: ^interface_id], + select: [:value_type, :endpoint_id] end - def retrieve_all_endpoints_for_interface!(client, interface_id) do - endpoints_with_type_statement = """ - SELECT value_type, endpoint - FROM endpoints - WHERE interface_id=:interface_id - """ + def retrieve_all_endpoints_for_interface!(realm_name, interface_id) do + keyspace = Realm.keyspace_name(realm_name) - endpoint_query = - DatabaseQuery.new() - |> DatabaseQuery.statement(endpoints_with_type_statement) - |> DatabaseQuery.put(:interface_id, interface_id) - - DatabaseQuery.call!(client, endpoint_query) + from DatabaseEndpoint, + prefix: ^keyspace, + where: [interface_id: ^interface_id], + select: [:value_type, :endpoint] end - def retrieve_mapping(db_client, interface_id, endpoint_id) do - mapping_statement = """ - SELECT endpoint, value_type, reliability, retention, database_retention_policy, - database_retention_ttl, expiry, allow_unset, endpoint_id, interface_id, - explicit_timestamp - FROM endpoints - WHERE interface_id=:interface_id AND endpoint_id=:endpoint_id - """ - - mapping_query = - DatabaseQuery.new() - |> DatabaseQuery.statement(mapping_statement) - |> DatabaseQuery.put(:interface_id, interface_id) - |> DatabaseQuery.put(:endpoint_id, endpoint_id) - - DatabaseQuery.call!(db_client, mapping_query) - |> DatabaseResult.head() - |> Mapping.from_db_result!() + def retrieve_mapping(realm_name) do + keyspace = Realm.keyspace_name(realm_name) + + from DatabaseEndpoint, + prefix: ^keyspace, + select: [ + :endpoint, + :value_type, + :reliability, + :retention, + :database_retention_policy, + :database_retention_ttl, + :expiry, + :allow_unset, + :endpoint_id, + :interface_id, + :explicit_timestamp + ] end def prepare_get_property_statement( @@ -262,10 +228,10 @@ defmodule Astarte.AppEngine.API.Device.Queries do ) do {values_query_statement, _count_query_statement, q_params} = prepare_get_individual_datastream_statement( - ValueType.from_int(endpoint_row[:value_type]), + endpoint_row.value_type, false, - interface_row[:storage], - StorageType.from_int(interface_row[:storage_type]), + interface_row.storage, + interface_row.storage_type, %{opts | limit: 1} ) @@ -273,7 +239,7 @@ defmodule Astarte.AppEngine.API.Device.Queries do DatabaseQuery.new() |> DatabaseQuery.statement(values_query_statement) |> DatabaseQuery.put(:device_id, device_id) - |> DatabaseQuery.put(:interface_id, interface_row[:interface_id]) + |> DatabaseQuery.put(:interface_id, interface_row.interface_id) |> DatabaseQuery.put(:endpoint_id, endpoint_id) |> DatabaseQuery.put(:path, path) |> DatabaseQuery.merge(q_params) @@ -1214,7 +1180,7 @@ defmodule Astarte.AppEngine.API.Device.Queries do "WHERE device_id=:device_id #{since_statement} AND path=:path #{to_statement} #{limit_statement} ;" values_query_statement = - "SELECT #{columns} #{timestamp_column} FROM #{interface_row[:storage]} #{where_clause};" + "SELECT #{columns} #{timestamp_column} FROM #{interface_row.storage} #{where_clause};" values_query = DatabaseQuery.new() @@ -1249,7 +1215,7 @@ defmodule Astarte.AppEngine.API.Device.Queries do values = DatabaseQuery.call!(client, values_query) count_query_statement = - "SELECT count(#{timestamp_column}) FROM #{interface_row[:storage]} #{where_clause} ;" + "SELECT count(#{timestamp_column}) FROM #{interface_row.storage} #{where_clause} ;" count_query = values_query @@ -1285,17 +1251,17 @@ defmodule Astarte.AppEngine.API.Device.Queries do def all_properties_for_endpoint!(client, device_id, interface_row, endpoint_row, endpoint_id) do query_statement = prepare_get_property_statement( - ValueType.from_int(endpoint_row[:value_type]), + endpoint_row.value_type, false, - interface_row[:storage], - StorageType.from_int(interface_row[:storage_type]) + interface_row.storage, + interface_row.storage_type ) query = DatabaseQuery.new() |> DatabaseQuery.statement(query_statement) |> DatabaseQuery.put(:device_id, device_id) - |> DatabaseQuery.put(:interface_id, interface_row[:interface_id]) + |> DatabaseQuery.put(:interface_id, interface_row.interface_id) |> DatabaseQuery.put(:endpoint_id, endpoint_id) DatabaseQuery.call!(client, query) @@ -1312,10 +1278,10 @@ defmodule Astarte.AppEngine.API.Device.Queries do ) do {values_query_statement, count_query_statement, q_params} = prepare_get_individual_datastream_statement( - ValueType.from_int(endpoint_row[:value_type]), + endpoint_row.value_type, false, - interface_row[:storage], - StorageType.from_int(interface_row[:storage_type]), + interface_row.storage, + interface_row.storage_type, opts ) @@ -1323,7 +1289,7 @@ defmodule Astarte.AppEngine.API.Device.Queries do DatabaseQuery.new() |> DatabaseQuery.statement(values_query_statement) |> DatabaseQuery.put(:device_id, device_id) - |> DatabaseQuery.put(:interface_id, interface_row[:interface_id]) + |> DatabaseQuery.put(:interface_id, interface_row.interface_id) |> DatabaseQuery.put(:endpoint_id, endpoint_id) |> DatabaseQuery.put(:path, path) |> DatabaseQuery.merge(q_params) @@ -1339,24 +1305,11 @@ defmodule Astarte.AppEngine.API.Device.Queries do {:ok, count, values} end - def prepare_value_type_query(interface_id) do - value_type_statement = """ - SELECT value_type - FROM endpoints - WHERE interface_id=:interface_id AND endpoint_id=:endpoint_id - """ - - DatabaseQuery.new() - |> DatabaseQuery.statement(value_type_statement) - |> DatabaseQuery.put(:interface_id, interface_id) - end - - def execute_value_type_query(client, value_type_query, endpoint_id) do - value_type_query = - value_type_query - |> DatabaseQuery.put(:endpoint_id, endpoint_id) + def value_type_query(realm_name) do + keyspace = Realm.keyspace_name(realm_name) - DatabaseQuery.call!(client, value_type_query) - |> DatabaseResult.head() + from DatabaseEndpoint, + prefix: ^keyspace, + select: [:value_type] end end diff --git a/apps/astarte_appengine_api/mix.exs b/apps/astarte_appengine_api/mix.exs index e9381a114..324df4965 100644 --- a/apps/astarte_appengine_api/mix.exs +++ b/apps/astarte_appengine_api/mix.exs @@ -1,7 +1,7 @@ # # This file is part of Astarte. # -# Copyright 2017-2021 Ispirata Srl +# Copyright 2017 - 2025 SECO Mind Srl # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -69,8 +69,8 @@ defmodule Astarte.AppEngine.API.Mixfile do defp astarte_required_modules(_) do [ - {:astarte_core, "~> 1.2"}, - {:astarte_data_access, "~> 1.2"}, + {:astarte_core, github: "astarte-platform/astarte_core"}, + {:astarte_data_access, github: "noaccOS/astarte_data_access", branch: "exandra"}, {:astarte_rpc, "~> 1.2"} ] end @@ -93,7 +93,6 @@ defmodule Astarte.AppEngine.API.Mixfile do # Required by :phoenix_swagger, otherwise it fails finding ex_json_schema.app {:ex_json_schema, "~> 0.7"}, {:phoenix_swagger, "~> 0.8"}, - {:xandra, "~> 0.13"}, {:pretty_log, "~> 0.1"}, {:plug_logger_with_meta, "~> 0.1"}, {:telemetry, "~> 0.4"}, diff --git a/apps/astarte_appengine_api/mix.lock b/apps/astarte_appengine_api/mix.lock index f159c784c..9b95958d1 100644 --- a/apps/astarte_appengine_api/mix.lock +++ b/apps/astarte_appengine_api/mix.lock @@ -1,10 +1,10 @@ %{ "amqp": {:hex, :amqp, "3.3.0", "056d9f4bac96c3ab5a904b321e70e78b91ba594766a1fc2f32afd9c016d9f43b", [:mix], [{:amqp_client, "~> 3.9", [hex: :amqp_client, repo: "hexpm", optional: false]}], "hexpm", "8d3ae139d2646c630d674a1b8d68c7f85134f9e8b2a1c3dd5621616994b10a8b"}, "amqp_client": {:hex, :amqp_client, "3.12.10", "dcc0d5d0037fa2b486c6eb8b52695503765b96f919e38ca864a7b300b829742d", [:make, :rebar3], [{:credentials_obfuscation, "3.4.0", [hex: :credentials_obfuscation, repo: "hexpm", optional: false]}, {:rabbit_common, "3.12.10", [hex: :rabbit_common, repo: "hexpm", optional: false]}], "hexpm", "16a23959899a82d9c2534ed1dcf1fa281d3b660fb7f78426b880647f0a53731f"}, - "astarte_core": {:hex, :astarte_core, "1.2.0", "5c989629b676f27cd3f48b655e640c59c25dff9293189bb254d04f23cdc4976b", [:mix], [{:cyanide, "~> 2.0", [hex: :cyanide, repo: "hexpm", optional: false]}, {:ecto, "~> 3.4", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_morph, "~> 0.1.23", [hex: :ecto_morph, repo: "hexpm", optional: false]}, {:elixir_uuid, "~> 1.2", [hex: :elixir_uuid, repo: "hexpm", optional: false]}, {:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: false]}, {:protobuf, "~> 0.12", [hex: :protobuf, repo: "hexpm", optional: false]}], "hexpm", "8a17f1dab5682a29384ce1dd21dab4b014cda86d31ae0c37774edacf93730306"}, - "astarte_data_access": {:hex, :astarte_data_access, "1.2.0", "97843ec1251a54c94e96027845cfe86dc667d0d2cfd5febb391324dac0cc89d6", [:mix], [{:astarte_core, "~> 1.2", [hex: :astarte_core, repo: "hexpm", optional: false]}, {:castore, "~> 1.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:cqex, "~> 1.0", [hex: :cqex, repo: "hexpm", optional: false]}, {:skogsra, "~> 2.2", [hex: :skogsra, repo: "hexpm", optional: false]}, {:xandra, "~> 0.11", [hex: :xandra, repo: "hexpm", optional: false]}], "hexpm", "20300ff2963d6fb328ce8a5ca30b3aaa1ee05b3977fc0d4cf151548068abcae5"}, + "astarte_core": {:git, "https://github.com/astarte-platform/astarte_core.git", "48eba8429624ae27ec8c9009adce41aa0280cc1f", []}, + "astarte_data_access": {:git, "https://github.com/noaccOS/astarte_data_access.git", "63e10d63bf7e63c674cea036a6c376676dc8a9d4", [branch: "exandra"]}, "astarte_rpc": {:hex, :astarte_rpc, "1.2.0", "dcef7434bf3f19ff30ff0bc245ef2d3b0f9abeb369405713cfd28916a5635926", [:mix], [{:amqp, "~> 3.3", [hex: :amqp, repo: "hexpm", optional: false]}, {:castore, "~> 1.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:protobuf, "~> 0.12", [hex: :protobuf, repo: "hexpm", optional: false]}, {:skogsra, "~> 2.2", [hex: :skogsra, repo: "hexpm", optional: false]}], "hexpm", "8470ed2f116fa8c9d70845f295f3738529aff123d9d3f98cbfa37107314763cb"}, - "castore": {:hex, :castore, "1.0.7", "b651241514e5f6956028147fe6637f7ac13802537e895a724f90bf3e36ddd1dd", [:mix], [], "hexpm", "da7785a4b0d2a021cd1292a60875a784b6caef71e76bf4917bdee1f390455cf5"}, + "castore": {:hex, :castore, "1.0.11", "4bbd584741601eb658007339ea730b082cc61f3554cf2e8f39bf693a11b49073", [:mix], [], "hexpm", "e03990b4db988df56262852f20de0f659871c35154691427a5047f4967a16a62"}, "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, "connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"}, "cors_plug": {:hex, :cors_plug, "2.0.3", "316f806d10316e6d10f09473f19052d20ba0a0ce2a1d910ddf57d663dac402ae", [:mix], [{:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "ee4ae1418e6ce117fc42c2ba3e6cbdca4e95ecd2fe59a05ec6884ca16d469aea"}, @@ -15,16 +15,18 @@ "cqex": {:hex, :cqex, "1.0.1", "bc9980ac3b82d039879f8d6ca589deab799fe08f80ff449d60ad709f2524718f", [:mix], [{:cqerl, "~> 2.0.1", [hex: :cqerl, repo: "hexpm", optional: false]}], "hexpm", "1bbf2079c044cbf0f747f60dcf0409a951eaa8f1a2447cd6d80d6ff1b7c4dc6b"}, "credentials_obfuscation": {:hex, :credentials_obfuscation, "3.4.0", "34e18b126b3aefd6e8143776fbe1ceceea6792307c99ac5ee8687911f048cfd7", [:rebar3], [], "hexpm", "738ace0ed5545d2710d3f7383906fc6f6b582d019036e5269c4dbd85dbced566"}, "cyanide": {:hex, :cyanide, "2.0.0", "f97b700b87f9b0679ae812f0c4b7fe35ea6541a4121a096cf10287941b7a6d55", [:mix], [], "hexpm", "7f9748251804c2a2115b539202568e1117ab2f0ae09875853fb89cc94ae19dd1"}, - "db_connection": {:hex, :db_connection, "2.3.1", "4c9f3ed1ef37471cbdd2762d6655be11e38193904d9c5c1c9389f1b891a3088e", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "abaab61780dde30301d840417890bd9f74131041afd02174cf4e10635b3a63f5"}, - "decimal": {:hex, :decimal, "1.9.0", "83e8daf59631d632b171faabafb4a9f4242c514b0a06ba3df493951c08f64d07", [:mix], [], "hexpm", "b1f2343568eed6928f3e751cf2dffde95bfaa19dd95d09e8a9ea92ccfd6f7d85"}, + "db_connection": {:hex, :db_connection, "2.7.0", "b99faa9291bb09892c7da373bb82cba59aefa9b36300f6145c5f201c7adf48ec", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "dcf08f31b2701f857dfc787fbad78223d61a32204f217f15e881dd93e4bdd3ff"}, + "decimal": {:hex, :decimal, "2.3.0", "3ad6255aa77b4a3c4f818171b12d237500e63525c2fd056699967a3e7ea20f62", [:mix], [], "hexpm", "a4d66355cb29cb47c3cf30e71329e58361cfcb37c34235ef3bf1d7bf3773aeac"}, "dialyxir": {:hex, :dialyxir, "1.4.2", "764a6e8e7a354f0ba95d58418178d486065ead1f69ad89782817c296d0d746a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "516603d8067b2fd585319e4b13d3674ad4f314a5902ba8130cd97dc902ce6bbd"}, "dialyzex": {:git, "https://github.com/Comcast/dialyzex.git", "cdc7cf71fe6df0ce4cf59e3f497579697a05c989", []}, - "ecto": {:hex, :ecto, "3.10.3", "eb2ae2eecd210b4eb8bece1217b297ad4ff824b4384c0e3fdd28aaf96edd6135", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "44bec74e2364d491d70f7e42cd0d690922659d329f6465e89feb8a34e8cd3433"}, - "ecto_morph": {:hex, :ecto_morph, "0.1.28", "073c3faf4ff7c496fc2ae8352ea7d8c9b89ae7b2e6995da3027454d44cb547fb", [:mix], [{:ecto, ">= 3.0.3", [hex: :ecto, repo: "hexpm", optional: false]}], "hexpm", "ce39a1252a5b7d58c601beb702eed4303b11016705f02fbae9b78f8fb971b0bc"}, + "ecto": {:hex, :ecto, "3.12.5", "4a312960ce612e17337e7cefcf9be45b95a3be6b36b6f94dfb3d8c361d631866", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6eb18e80bef8bb57e17f5a7f068a1719fbda384d40fc37acb8eb8aeca493b6ea"}, + "ecto_morph": {:hex, :ecto_morph, "0.1.29", "bc0b915779636bd2d30c54cad6922b3cb40f85b1d4ad59bdffd3c788d9d1f972", [:mix], [{:ecto, ">= 3.0.3", [hex: :ecto, repo: "hexpm", optional: false]}], "hexpm", "814bed72e3d03b278c1dfb3fbc4da37f478a37518ee54f010c1ad9254f1ca0e3"}, + "ecto_sql": {:hex, :ecto_sql, "3.12.1", "c0d0d60e85d9ff4631f12bafa454bc392ce8b9ec83531a412c12a0d415a3a4d0", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.12", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.7", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.19 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "aff5b958a899762c5f09028c847569f7dfb9cc9d63bdb8133bff8a5546de6bf5"}, "elixir_uuid": {:hex, :elixir_uuid, "1.2.1", "dce506597acb7e6b0daeaff52ff6a9043f5919a4c3315abb4143f0b00378c097", [:mix], [], "hexpm", "f7eba2ea6c3555cea09706492716b0d87397b88946e6380898c2889d68585752"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, "ex_json_schema": {:hex, :ex_json_schema, "0.7.4", "09eb5b0c8184e5702bc89625a9d0c05c7a0a845d382e9f6f406a0fc1c9a8cc3f", [:mix], [], "hexpm", "45c67fa840f0d719a2b5578126dc29bcdc1f92499c0f61bcb8a3bcb5935f9684"}, "ex_lttb": {:hex, :ex_lttb, "0.3.0", "aec7aab96be6535c4c8f143c2b5f2191a9d1a6f512690ec6d6f4f6bce0223b0f", [:mix], [], "hexpm", "6937bf70307d85781200912c3dcf5e32efdcbdf958e9107ee0a61d4fefc1fddb"}, + "exandra": {:git, "https://github.com/noaccos/exandra.git", "016d05962c41fde7a0795708f2613306109ef9ac", [ref: "push-ksolwvtqvqtr"]}, "excoveralls": {:hex, :excoveralls, "0.15.0", "ac941bf85f9f201a9626cc42b2232b251ad8738da993cf406a4290cacf562ea4", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "9631912006b27eca30a2f3c93562bc7ae15980afb014ceb8147dc5cdd8f376f1"}, "expo": {:hex, :expo, "0.5.2", "beba786aab8e3c5431813d7a44b828e7b922bfa431d6bfbada0904535342efe2", [:mix], [], "hexpm", "8c9bfa06ca017c9cb4020fabe980bc7fdb1aaec059fd004c2ab3bff03b1c599c"}, "gettext": {:hex, :gettext, "0.24.0", "6f4d90ac5f3111673cbefc4ebee96fe5f37a114861ab8c7b7d5b30a1108ce6d8", [:mix], [{:expo, "~> 0.5.1", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "bdf75cdfcbe9e4622dd18e034b227d77dd17f0f133853a1c73b97b3d6c770e8b"}, @@ -32,7 +34,7 @@ "guardian": {:hex, :guardian, "2.3.2", "78003504b987f2b189d76ccf9496ceaa6a454bb2763627702233f31eb7212881", [:mix], [{:jose, "~> 1.8", [hex: :jose, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.3 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "b189ff38cd46a22a8a824866a6867ca8722942347f13c33f7d23126af8821b52"}, "hackney": {:hex, :hackney, "1.18.1", "f48bf88f521f2a229fc7bae88cf4f85adc9cd9bcf23b5dc8eb6a1788c662c4f6", [:rebar3], [{:certifi, "~>2.9.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a4ecdaff44297e9b5894ae499e9a070ea1888c84afdd1fd9b7b2bc384950128e"}, "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, - "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, + "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, "jose": {:hex, :jose, "1.11.6", "613fda82552128aa6fb804682e3a616f4bc15565a048dabd05b1ebd5827ed965", [:mix, :rebar3], [], "hexpm", "6275cb75504f9c1e60eeacb771adfeee4905a9e182103aa59b53fed651ff9738"}, "jsx": {:hex, :jsx, "2.11.0", "08154624050333919b4ac1b789667d5f4db166dc50e190c4d778d1587f102ee0", [:rebar3], [], "hexpm", "eed26a0d04d217f9eecefffb89714452556cf90eb38f290a27a4d45b9988f8c0"}, "logfmt": {:hex, :logfmt, "3.3.2", "c432765cff9c26cf4ba78cf66ece183e56562dfeba6e2d9f077804cc4c756677", [:mix], [], "hexpm", "8dfc07bf11d362d1ffb11fa34647f4e78dba47247589cc94fd8c9155889c8fcb"}, @@ -41,6 +43,7 @@ "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"}, "mox": {:hex, :mox, "0.5.2", "55a0a5ba9ccc671518d068c8dddd20eeb436909ea79d1799e2209df7eaa98b6c", [:mix], [], "hexpm", "df4310628cd628ee181df93f50ddfd07be3e5ecc30232d3b6aadf30bdfe6092b"}, + "nimble_options": {:hex, :nimble_options, "1.1.1", "e3a492d54d85fc3fd7c5baf411d9d2852922f66e69476317787a7b2bb000a61b", [:mix], [], "hexpm", "821b2470ca9442c4b6984882fe9bb0389371b8ddec4d45a9504f00a66f650b44"}, "observer_cli": {:hex, :observer_cli, "1.6.1", "d176f967c978ab8b8a29c35c12524f78b7bb36fd4e9b8276dd75c9cb56e07e42", [:mix, :rebar3], [{:recon, "~>2.5.1", [hex: :recon, repo: "hexpm", optional: false]}], "hexpm", "3418e319764b9dff1f469e43cbdffd7fd54ea47cbf765027c557abd146a19fb3"}, "parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"}, "phoenix": {:hex, :phoenix, "1.7.2", "c375ffb482beb4e3d20894f84dd7920442884f5f5b70b9f4528cbe0cedefec63", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.4", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "1ebca94b32b4d0e097ab2444a9742ed8ff3361acad17365e4e6b2e79b4792159"}, @@ -54,14 +57,14 @@ "plug_crypto": {:hex, :plug_crypto, "1.2.5", "918772575e48e81e455818229bf719d4ab4181fcbf7f85b68a35620f78d89ced", [:mix], [], "hexpm", "26549a1d6345e2172eb1c233866756ae44a9609bd33ee6f99147ab3fd87fd842"}, "plug_logger_with_meta": {:hex, :plug_logger_with_meta, "0.1.0", "e5b88daf819b6329db8023f450662296df8d260bb00dcf87f4d1f2818505dc0b", [:mix], [{:plug, "~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "c1a82e288dac4278160f890778df9433067725de93db021b85a957573485f9d3"}, "pretty_log": {:hex, :pretty_log, "0.9.0", "f84aab76e20c551a624ddd4656f1e5f9ca2941625db07549e9cb6a84a346bd40", [:mix], [{:logfmt, "~> 3.3", [hex: :logfmt, repo: "hexpm", optional: false]}], "hexpm", "abf9605c50fdd9377a3ce02ea51696538f4f647b9bb63a8dac209427fc7badf4"}, - "protobuf": {:hex, :protobuf, "0.12.0", "58c0dfea5f929b96b5aa54ec02b7130688f09d2de5ddc521d696eec2a015b223", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "75fa6cbf262062073dd51be44dd0ab940500e18386a6c4e87d5819a58964dc45"}, - "quickrand": {:hex, :quickrand, "2.0.1", "6d861fa11e6eb51bb2343a2616eff704c2681a9997f41abc78e58fa76da33981", [:rebar3], [], "hexpm", "14db67d4aef6b8815810ec9f3ccef5e324b73b56cae3687f99d752b85bdd4c96"}, + "protobuf": {:hex, :protobuf, "0.14.0", "75b64b8c1f0c833b5e76cd841d3448f077f655c2a2eed53358651fbfe4a6b70e", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "0f747eaa54ace9617536f1cb4b2a4962bc7e43f1aa475c6fa9c60079955c4cb0"}, + "quickrand": {:hex, :quickrand, "2.0.7", "d2bd76676a446e6a058d678444b7fda1387b813710d1af6d6e29bb92186c8820", [:rebar3], [], "hexpm", "b8acbf89a224bc217c3070ca8bebc6eb236dbe7f9767993b274084ea044d35f0"}, "rabbit_common": {:hex, :rabbit_common, "3.12.10", "7fc633ee206ae48783d8a5302dfc8fe1e086a5d7de494785ed206f586ad64b34", [:make, :rebar3], [{:credentials_obfuscation, "3.4.0", [hex: :credentials_obfuscation, repo: "hexpm", optional: false]}, {:recon, "2.5.3", [hex: :recon, repo: "hexpm", optional: false]}, {:thoas, "1.0.0", [hex: :thoas, repo: "hexpm", optional: false]}], "hexpm", "908a8b1bd059f5baefe225fe9d3e2545d35a28db8f6a14d60372556ca7afe641"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "re2": {:hex, :re2, "1.9.5", "3c419527fb2cc75eda1657f04dc7e8cea9864899b43ff6cc3250fa7525431e83", [:rebar3], [], "hexpm", "4861336271ac565224e79e133cbaf90af77739cda3fff25f6965b24a1146a4d6"}, "recon": {:hex, :recon, "2.5.3", "739107b9050ea683c30e96de050bc59248fd27ec147696f79a8797ff9fa17153", [:mix, :rebar3], [], "hexpm", "6c6683f46fd4a1dfd98404b9f78dcabc7fcd8826613a89dcb984727a8c3099d7"}, "semver": {:hex, :semver_erl, "0.0.1", "e1dc99fb20ff071b240a0280611faba93eeb9c2adfb02a15e20a06a9f13dfff4", [:rebar3], [], "hexpm", "adf1cb935eeb2472b4b7bb8116c678c1077ae4cd5bdfe90010b765aecce5753b"}, - "skogsra": {:hex, :skogsra, "2.3.3", "90ea76d98ad749241b31e724ca17ed8aca0202001972aeca3cb834f44027f3ea", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}, {:yamerl, "~> 0.8", [hex: :yamerl, repo: "hexpm", optional: true]}], "hexpm", "e36880922431d41ac56d6cb4529b0526039a108fb44f8ecc90b517d494b86c28"}, + "skogsra": {:hex, :skogsra, "2.5.0", "57d57c15bb8356662177779cb10adf1272069eeb4f3c032bf7d71d522e726f06", [:mix], [{:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: true]}, {:yamerl, "~> 0.10", [hex: :yamerl, repo: "hexpm", optional: true]}], "hexpm", "b7dfe23ef3f9999a96fa330b73363b3f48d68a7ca3eb98ab1f32cd888ef207ee"}, "snappyer": {:hex, :snappyer, "1.2.6", "34181e3233f68a92044e176fe96e54fee7957acc2be554f0460d799c495166c2", [:rebar3], [], "hexpm", "d538d1e8892af09dc8b2771b2652c9d70f009cd1556246b3e22706df643f47b4"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, "stream_data": {:hex, :stream_data, "0.6.0", "e87a9a79d7ec23d10ff83eb025141ef4915eeb09d4491f79e52f2562b73e5f47", [:mix], [], "hexpm", "b92b5031b650ca480ced047578f1d57ea6dd563f5b57464ad274718c9c29501c"}, @@ -71,8 +74,8 @@ "telemetry_poller": {:hex, :telemetry_poller, "0.5.1", "21071cc2e536810bac5628b935521ff3e28f0303e770951158c73eaaa01e962a", [:rebar3], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4cab72069210bc6e7a080cec9afffad1b33370149ed5d379b81c7c5f0c663fd4"}, "thoas": {:hex, :thoas, "1.0.0", "567c03902920827a18a89f05b79a37b5bf93553154b883e0131801600cf02ce0", [:rebar3], [], "hexpm", "fc763185b932ecb32a554fb735ee03c3b6b1b31366077a2427d2a97f3bd26735"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, - "uuid": {:hex, :uuid_erl, "2.0.1", "1fd9079c544d521063897887a1c5b3302dca98f9bb06aadcdc6fb0663f256797", [:rebar3], [{:quickrand, "~> 2.0.1", [hex: :quickrand, repo: "hexpm", optional: false]}], "hexpm", "ab57caccd51f170011e5f444ce865f84b41605e483a9efcc468c1afaec87553b"}, + "uuid": {:hex, :uuid_erl, "2.0.7", "b2078d2cc814f53afa52d36c91e08962c7e7373585c623f4c0ea6dfb04b2af94", [:rebar3], [{:quickrand, ">= 2.0.7", [hex: :quickrand, repo: "hexpm", optional: false]}], "hexpm", "4e4c5ca3461dc47c5e157ed42aa3981a053b7a186792af972a27b14a9489324e"}, "websock": {:hex, :websock, "0.5.1", "c496036ce95bc26d08ba086b2a827b212c67e7cabaa1c06473cd26b40ed8cf10", [:mix], [], "hexpm", "b9f785108b81cd457b06e5f5dabe5f65453d86a99118b2c0a515e1e296dc2d2c"}, "websock_adapter": {:hex, :websock_adapter, "0.5.1", "292e6c56724e3457e808e525af0e9bcfa088cc7b9c798218e78658c7f9b85066", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "8e2e1544bfde5f9d0442f9cec2f5235398b224f75c9e06b60557debf64248ec1"}, - "xandra": {:hex, :xandra, "0.13.1", "f82866e6c47527f74f35dd3007b5311121852dd861a29ed1613e27ccfaba0102", [:mix], [{:db_connection, "~> 2.0", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.7", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "a2efdb8921e3b694bf3505e40c5ec9d353d8fa3755cec946be7c18b8236d7230"}, + "xandra": {:hex, :xandra, "0.19.2", "c3aeea02f7fb0fe913ab74c1ec515172e13fd329f340f7d59a64816dd86aa9ca", [:mix], [{:decimal, "~> 1.7 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_options, "~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9e7310e0b5acf262d48ea0f0b1cc0656b62e90a5864d02b976ed856a7eca4db6"}, } diff --git a/apps/astarte_appengine_api/test/astarte_appengine_api_web/controllers/groups_controller_test.exs b/apps/astarte_appengine_api/test/astarte_appengine_api_web/controllers/groups_controller_test.exs index 8130eb433..c1163dadf 100644 --- a/apps/astarte_appengine_api/test/astarte_appengine_api_web/controllers/groups_controller_test.exs +++ b/apps/astarte_appengine_api/test/astarte_appengine_api_web/controllers/groups_controller_test.exs @@ -1,7 +1,7 @@ # # This file is part of Astarte. # -# Copyright 2019 Ispirata Srl +# Copyright 2019 - 2025 SECO Mind Srl # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -175,7 +175,7 @@ defmodule Astarte.AppEngine.APIWeb.GroupsControllerTest do @tag issue: 904 property "creates the group with / in group name", %{conn: conn} do - check all group_name <- GroupTestGenerator.group_name() do + check all(group_name <- GroupTestGenerator.group_name()) do params = %{ "group_name" => group_name, "devices" => @group_devices diff --git a/apps/astarte_appengine_api/test/astarte_appengine_api_web/plug/group_name_decoder_test.exs b/apps/astarte_appengine_api/test/astarte_appengine_api_web/plug/group_name_decoder_test.exs index ebeef25e2..6c5a8aac6 100644 --- a/apps/astarte_appengine_api/test/astarte_appengine_api_web/plug/group_name_decoder_test.exs +++ b/apps/astarte_appengine_api/test/astarte_appengine_api_web/plug/group_name_decoder_test.exs @@ -1,7 +1,7 @@ # # This file is part of Astarte. # -# Copyright 2024 SECO Mind Srl +# Copyright 2024 - 2025 SECO Mind Srl # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ defmodule Astarte.AppEngine.APIWeb.Plug.GroupNameDecoderTest do @tag issue: 904 property "call/2 decode path" do - check all raw <- GroupTestGenerator.group_name() do + check all(raw <- GroupTestGenerator.group_name()) do conn = build_conn() # Normally, phx does encoding encoded =