James Harton
|
6cc88c82b4
|
improvement: Allow resources to opt out of the primary key requirement. (#166)
|
2023-09-06 01:18:57 -04:00 |
|
Tommaso Patrizi
|
96165a58ea
|
tests: added test for bulk upsert (#148)
Co-authored-by: Tommaso Patrizi <tommasop@gmail.com>
|
2023-05-26 23:58:04 -04:00 |
|
Alan Heywood
|
f290ae47b8
|
Add failing test for policy + aggregate issue
The conditions for this issue to occur seem to be:
- DataLayer is Postgres
- Resource has a relates_to_actor_via policy on read
- The relates_to_actor_via path includes a has_many relationship
- An aggregate is loaded
The following error is produced:
1) test relates to actor via has_many and with an aggregate (AshPostgres.AggregateTest)
test/aggregate_test.exs:8
** (Ash.Error.Unknown.UnknownError) ** (ArgumentError) No such entity nil found.
code: |> Api.read_one!(actor: user)
stacktrace:
nil.spark_dsl_config()
(spark 0.3.8) lib/spark/dsl/extension.ex:129: Spark.Dsl.Extension.dsl!/1
(spark 0.3.8) lib/spark/dsl/extension.ex:158: Spark.Dsl.Extension.get_persisted/3
(ash 2.5.10) lib/ash/filter/filter.ex:2986: Ash.Filter.do_hydrate_refs/2
(ash 2.5.10) lib/ash/policy/check/relates_to_actor_via.ex:3: Ash.Policy.Check.RelatesToActorVia.try_eval/2
(ash 2.5.10) lib/ash/policy/check/relates_to_actor_via.ex:3: Ash.Policy.Check.RelatesToActorVia.try_strict_check/3
(ash 2.5.10) lib/ash/policy/checker.ex:63: Ash.Policy.Checker.do_strict_check_facts/3
(ash 2.5.10) lib/ash/policy/checker.ex:88: anonymous fn/2 in Ash.Policy.Checker.strict_check_policies/3
(elixir 1.14.2) lib/enum.ex:4751: Enumerable.List.reduce/3
(elixir 1.14.2) lib/enum.ex:2514: Enum.reduce_while/3
(ash 2.5.10) lib/ash/policy/checker.ex:9: anonymous fn/2 in Ash.Policy.Checker.strict_check_facts/1
(elixir 1.14.2) lib/enum.ex:4751: Enumerable.List.reduce/3
(elixir 1.14.2) lib/enum.ex:2514: Enum.reduce_while/3
(ash 2.5.10) lib/ash/policy/authorizer.ex:790: Ash.Policy.Authorizer.do_strict_check_facts/1
(ash 2.5.10) lib/ash/policy/authorizer.ex:372: Ash.Policy.Authorizer.strict_check/2
(ash 2.5.10) lib/ash/engine/request.ex:550: Ash.Engine.Request.do_strict_check/3
(ash 2.5.10) lib/ash/engine/request.ex:518: anonymous fn/2 in Ash.Engine.Request.strict_check/2
(elixir 1.14.2) lib/enum.ex:4751: Enumerable.List.reduce/3
(elixir 1.14.2) lib/enum.ex:2514: Enum.reduce_while/3
(ash 2.5.10) lib/ash/engine/request.ex:255: Ash.Engine.Request.do_next/1
(ash 2.5.10) lib/ash/engine/request.ex:211: Ash.Engine.Request.next/1
(ash 2.5.10) lib/ash/engine/engine.ex:650: Ash.Engine.advance_request/2
(ash 2.5.10) lib/ash/engine/engine.ex:556: Ash.Engine.fully_advance_request/2
(ash 2.5.10) lib/ash/engine/engine.ex:497: Ash.Engine.do_run_iteration/2
(elixir 1.14.2) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(ash 2.5.10) lib/ash/engine/engine.ex:440: Ash.Engine.run_iteration/1
(ash 2.5.10) lib/ash/engine/engine.ex:257: Ash.Engine.run_to_completion/1
(ash 2.5.10) lib/ash/engine/engine.ex:202: Ash.Engine.do_run/2
(ash 2.5.10) lib/ash/engine/engine.ex:141: Ash.Engine.run/2
(ash 2.5.10) lib/ash/actions/read.ex:170: Ash.Actions.Read.do_run/3
(ash 2.5.10) lib/ash/actions/read.ex:90: Ash.Actions.Read.run/3
(ash 2.5.10) lib/ash/api/api.ex:1005: Ash.Api.read_one/3
(ash 2.5.10) lib/ash/api/api.ex:998: Ash.Api.read_one!/3
test/aggregate_test.exs:44: (test)
|
2023-01-29 16:15:16 +10:00 |
|
Alan Heywood
|
df3b4fd82c
|
Add a failing test to repro a bug with calculation loads
|
2022-12-17 22:57:25 +10:00 |
|
Zach Daniel
|
d04fd201f2
|
fix: test and confirm behavior of schemas
|
2022-05-22 18:30:20 -04:00 |
|
Zach Daniel
|
2fdcea7ef8
|
improvement: support default on aggregates
chore: update to latest ash patterns for testing
|
2021-10-25 18:53:34 -04:00 |
|