Dmitry Maganov
ed4655cd83
improvement: add matches
built-in policy check ( #937 )
2024-03-21 08:39:21 -04:00
Hannes Wüthrich
b398107ca3
fix: don't double-encode vector data ( #934 )
2024-03-20 16:32:45 -04:00
Tun Cham Roeun
7d7bcaa3d7
fi: fetch_count/4
use the query after applying before_action
hooks ( #922 )
...
---------
Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2024-03-12 20:28:52 -04:00
e5f01bbd59
improvement(Ash.Reactor): Backport improvements from 3.0 branch.
2024-03-08 10:51:40 +13:00
Zach Daniel
18cc9c9b26
fix: ensure that message is honored in atomic validations
...
fix: don't require actor when constructing aggregate query
2024-03-07 10:47:43 -05:00
9b88628b07
improvement: Make undo actions for update
and destroy
actions more explicit. ( #920 )
...
* chore(Ash.Reactor): Follow on from `get` -> `read_one` rename.
* improvement(Ash.Reactor): Make undo actions for `update` and `destroy` more explicit.
2024-03-05 11:30:35 +13:00
Zach Daniel
7f0e2d8037
improvement: rename get
to read_one
in Ash.Reactor
2024-03-02 16:51:00 -05:00
86d74ed789
feat(Ash.Reactor): Add a Reactor extension that makes working with resources easy. ( #683 )
...
* feat: Add `Ash.Reactor` with create support.
* improvement: Add `Ash.Reactor` update support.
* improvement: Add `Ash.Reactor` destroy support.
* improvement(Ash.Reactor): Support for transactional handling of notifications.
* improvement(Ash.Reactor): Add `read` and `get` steps.
* docs: Add the beginnings of a Reactor topic.
* improvement(Ash.Reactor): add support for generic actions.
* improvement: Add `undo` capability to `create` step.
* improvement: transaction and undo working.
* docs: Start documenting undo behaviour.
* chore: Update to Reactor 0.6.
* improvement: Automatically thread Ash tracers through Reactor.
* improvement(Ash.Reactor): Add undo to generic actions.
* docs: Improve reactor documentation.
* fix: Mimic copying `Ash.Notifier` seems to break the compiler for some reason.
2024-03-02 10:26:25 +13:00
Zach Daniel
650205a9bc
fix: ensure calculation arguments are not ignored when parsing filters
...
fixes #917
2024-02-29 00:41:24 -05:00
Zach Daniel
1a99098f52
fix: ensure that policies are applied to aggregates referenced in calculations
2024-02-26 13:00:12 -05:00
Zach Daniel
0e1fe24f46
fix: ensure actor context is set in filter
2024-02-25 08:24:19 -05:00
Zach Daniel
eab194fac5
fix: properly handle limit/offset for aggregates
2024-02-24 20:21:13 -05:00
Zach Daniel
0fd4e36b2e
add test for read_one
and limit
2024-02-23 08:46:17 -05:00
Zach Daniel
701f9b4cc6
fix: honor soft destroys for atomic bulk destroys
2024-02-22 08:02:01 -05:00
Zach Daniel
3027afe5fc
fix: pass correct options into Api.stream!
for bulk_destroy
2024-02-21 08:09:20 -05:00
Robert Graff
8fd0106528
test: add test for bulk_destroy with policy and query ( #908 )
2024-02-21 08:00:20 -05:00
Zach Daniel
944f69b16e
fix: properly annotate run_flow
's recursive DSL tag
...
docs: update spark & docs
2024-02-16 21:25:18 -05:00
Jechol Lee
3a353c2fa0
test: Reproduce run_flow is not counted as step inside map, branch ( #902 )
2024-02-16 20:21:22 -05:00
Zach Daniel
a06912f9b0
fix: honor not_found_error?
in read_one
...
improvement: pass `tenant` to context in custom changes
improvement: `Ash.context_to_opts` now checks for a `tenant`
2024-02-16 17:56:23 -05:00
Jechol Lee
b4ade107cd
test: Reproduce flow custom step has no tenant in context ( #901 )
2024-02-16 17:47:54 -05:00
Zach Daniel
f847f0d971
test: update test w/ not_found_error?
fix
2024-02-15 23:38:52 -05:00
Zach Daniel
ba2ab31f8d
test: correct flow tests
2024-02-15 23:30:09 -05:00
Jechol Lee
aa7278fe79
test: Reproducing a bug where the flow does not honor tenant ( #900 )
2024-02-15 23:26:44 -05:00
Jechol Lee
e214043218
chore: Rename test/flow_test to test/flow ( #899 )
2024-02-15 23:23:57 -05:00
Jechol Lee
896725597b
test: Reproducing a bug where Flow ignores the authorization setup. ( #895 )
2024-02-15 08:57:11 -05:00
Zach Daniel
3d30fd848f
fix: ensure we retain the sort order of embedded resources
...
fixes #883
2024-02-13 13:55:07 -05:00
Dmitry Kulakov
5846b70315
feat: allow using custom delimiters for pubsub topics
2024-02-11 16:45:05 -04:00
Zach Daniel
45999cac07
chore: test fix for after transaction hooks
2024-02-11 11:44:11 -05:00
Zach Daniel
2b7a99905c
improvement: support policies requiring original data
2024-02-09 17:19:45 -05:00
Zach Daniel
0893518f39
improvement: change atomicity requirements when datalayers don't support it
...
test: make tests pass on 3.0
2024-02-08 15:17:32 -05:00
Dmitry Maganov
5eccdcd7f8
improvement: add on_match: :update_join
to manage_relationship
( #875 )
2024-02-08 11:18:32 -05:00
Dmitry Maganov
d47eb086a2
fix: continue cleanup in ManagedRelationshipHelpers
( #873 )
2024-02-07 14:56:04 -05:00
Zach Daniel
2cd6360379
fix: fix pattern match error on certain policy conditions
...
improvement: various policy behavior cleanups
2024-02-06 19:30:18 -05:00
Zach Daniel
e707758c93
fix: retain metadata on updates, atomic and otherwise
...
fix: properly load expression -> runtime calculation deps
2024-02-01 10:21:22 -05:00
Zach Daniel
fc3cbc4e2c
improvement: change nested field filtering to be done with at_path
2024-01-31 15:41:10 -05:00
Zach Daniel
f7716c5222
improvement: support referencing non-array embeds in input filters
2024-01-31 12:11:36 -05:00
Zach Daniel
6602ae63e6
fix: support expression calculations referencing runtime calculations
2024-01-30 16:34:17 -05:00
Zach Daniel
550a9c1424
chore: fix file name
2024-01-30 15:23:04 -05:00
Zach Daniel
9f748b5c55
test: update authorizer tests
...
fix: properly handle the case where all valid scenarios are pruned
2024-01-30 13:11:47 -05:00
Barnabas Jovanovics
406a076ef1
test: add test that shows expr condition does not work with access_type :strict ( #858 )
2024-01-30 12:53:23 -05:00
Zach Daniel
9e02b0d0c7
improvement: introduce require_atomic?
, which defaults to false
in 2.0, true
in 3.0
...
fix: properly prevent the atomic handling of manual update actions
improvement: better support around the mixing of atomic and non atomic changes/validations
2024-01-30 12:32:41 -05:00
Zach Daniel
c02bced508
improvement: support loading and selecting in bulk operations
2024-01-29 14:29:50 -05:00
Dmitry Maganov
c40f762eee
fix: use correct option for relationship in atomic relate_actor
( #855 )
...
---------
Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2024-01-27 09:53:03 -05:00
Barnabas Jovanovics
fb3e7050a1
fix: only count resources the actor is allowed to see ( #853 )
...
* fix: only count resources the actor is allowed to see
* remove specc added by vscode
2024-01-26 13:33:03 -05:00
Barnabas Jovanovics
f2994502b9
add test for selecting policy ( #852 )
2024-01-25 11:08:31 -05:00
Jechol Lee
0d504ec429
test: Remove unnecessary authorize?: false in belongs_to_test ( #849 )
2024-01-25 10:50:37 -05:00
Zach Daniel
1807523ba2
improvement: support transactions in bulk updates
2024-01-23 21:36:17 -05:00
Zach Daniel
878011bd3e
improvement: count_nils/1
function
...
improvement: `present/absent` atomic implementation
improvement: add `atomic_ref/1` template helper
2024-01-23 19:13:14 -05:00
Nduati Kuria
d229ade9fc
Add :decimal
aggregate support to DataLayer.Ets
[WIP] ( #841 )
...
* Add `:decimal` aggregate support to `DataLayer.Ets`
* Add regression test
* Fix dialyzer
* Handle nils in `:avg` calculation
* Refactor nested ifs
* Refactor test
2024-01-22 16:03:34 -05:00
Zach Daniel
7aaea7bd55
fix: only load through calculations in the correct order
2024-01-20 13:53:35 -05:00
Zach Daniel
e5d78ae074
fix: get tests passing for bulk creates again
2024-01-19 10:49:26 -05:00
Zach Daniel
c48cb08026
improvement: rewrite read actions to not use Ash.Engine
( #836 )
2024-01-19 00:05:42 -05:00
Zach Daniel
4c96fdd40f
fix: don't ignore stream batch size
2024-01-13 21:48:11 -05:00
Zach Daniel
59e50f8dfa
fix: set tenant attribute in bulk create
...
fixes : #830
2024-01-12 08:19:55 -05:00
Jechol Lee
250c4ab8c8
improvement: support Ash.CiString in string_join ( #832 )
2024-01-12 00:21:30 -05:00
Zach Daniel
bbd866956d
improvement: authorize each related join using join_filters
2024-01-12 00:17:37 -05:00
Rebecca Le
0a4a7c057d
feat: Allow :self
as an option when requesting a relative page from a given page ( #833 )
2024-01-12 00:16:41 -05:00
Zach Daniel
35573a6f4e
improvement: support join_filters
in aggregates
2024-01-11 14:57:22 -05:00
Zach Daniel
5b82ce293f
fix: authorize aggregate references in calculations
2024-01-10 07:11:02 -05:00
Alan Heywood
dbb4a38ea3
fix: only put keywords to be interpolated in message in error vars ( #821 )
...
* fix: only put keywords to be interpolated in message in error vars
---------
Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2024-01-08 18:08:17 -05:00
Zach Daniel
a12131cf70
improvement: simplify aggregate loading, remove Ash.Engine
from it
...
improvement: add atomic implementation for builtin `increment` change
improvement: simplify related path authorization, use same tool as aggregates now use
2024-01-08 15:31:09 -05:00
Zach Daniel
6061a2a16a
improvement: add some atomic implementations
2024-01-03 16:48:15 -05:00
Zach Daniel
40aa17eab8
fix: ensure __source__
is set on nested embedded attributes
2023-12-28 14:47:40 -05:00
Robert Graff
69ff044214
test: pass the source context with data to embedded resource validations ( #811 )
2023-12-28 13:25:49 -05:00
Dmitry Maganov
a6d381a171
test: fix typo in a test name ( #815 )
2023-12-28 12:07:55 -05:00
Zach Daniel
4ee80297d7
improvement: support using the new api
option in actions
2023-12-27 18:14:29 -05:00
Zach Daniel
31879077b7
chore: comment out test for 3.0 fix
2023-12-27 17:48:13 -05:00
Zach Daniel
3e296a4bba
Revert "chore: comment out test for now
...
This reverts commit cc21661559
.
2023-12-27 17:47:50 -05:00
Zach Daniel
17afb821a7
fix: don't include unknown authorize?
value in changesets
2023-12-27 17:37:51 -05:00
Zach Daniel
14d4e26d9c
chore: remove IO.inspect
2023-12-27 17:36:09 -05:00
Zach Daniel
cc21661559
chore: comment out test for now
2023-12-27 17:28:52 -05:00
Rohan Relan
750dc17286
test: Adds a test to ensure authorization occurs when the actor is set and authorization? is by_default ( #813 )
...
Co-authored-by: Rohan Relan <roresemail@gmail.com>
2023-12-27 10:27:22 -05:00
Zach Daniel
eb05e9be63
improvement: support streaming without keyset pagination
...
use the new `allow_stream_with` and `stream_with` options to control
what strategy may be used to stream query results.
2023-12-21 08:35:49 -05:00
Zach Daniel
ed887413d7
improvement: base case iterative bulk destroy implemented
2023-12-20 21:08:40 -05:00
Zach Daniel
8c17434803
improvement: add iterative, streaming implementation for bulk updates
2023-12-20 17:33:43 -05:00
Zach Daniel
2233a33523
improvement: support tenancy on manual actions
...
docs: update cheat shets
fix: honor tenant option on aggregates
closes #805
2023-12-16 10:33:10 -05:00
Zach Daniel
3be83d6ca4
improvement: lay the groundwork for fully atomic actions
2023-12-16 10:14:02 -05:00
Zach Daniel
52a62c7c45
chore: fix tests
2023-12-15 15:45:23 -05:00
Zach Daniel
e22c6c7927
fix: ensure actions always raise an error class
2023-12-15 15:33:10 -05:00
Zach Daniel
ad22eeb7e9
improvement: rewrite creates to not use Ash.Engine
2023-12-15 15:10:01 -05:00
Thales Grilo
9d2da58fb2
improvement: Adds %Ash.NotSelected{} to ash 3 ( !634 ) ( #804 )
...
* ✨ create Ash.NotSelected, add test
* ✅ add ash_three test
* 👌 fix formatting
* 👌 add missing field value
---------
Co-authored-by: thales <thales@uplearn.co.uk>
2023-12-14 16:14:15 -05:00
Robert Graff
014621cc09
test: reproduce bug casting embedded union arguments ( #803 )
2023-12-14 09:04:56 -05:00
Zach Daniel
d09c694132
fix: thread context through when setting source constraint on embeds
2023-12-13 17:11:52 -05:00
Robert Graff
e13bb6e0b4
test: Failing test for threading source information through embedded attributes ( #801 )
2023-12-13 16:47:11 -05:00
Zach Daniel
7298a4b51b
improvement: honor field policies in sort expressions
2023-12-13 15:08:39 -05:00
Zach Daniel
5c0275a78b
test: add test for simple data layer pagination
2023-12-11 19:58:14 -05:00
Zach Daniel
c38cba51b0
fix: test failures and credo issue
2023-12-10 13:13:06 -05:00
Jechol Lee
30deb8c32e
test: Remove unnecessary 'authorize?: false' and explicitly specify the filter policy results. ( #798 )
2023-12-07 20:22:46 -05:00
Zach Daniel
c7e6133317
improvement: support embed_nil_values?
for trimming down stored embeds
2023-12-06 10:29:39 -05:00
Robert Graff
636f99fb2d
test: Add test for updating embedded union values ( #796 )
2023-12-06 10:16:19 -05:00
Jechol Lee
7b70c3a58e
test: Fix ParentTest ( #793 )
2023-12-05 01:36:40 -05:00
Jechol Lee
86e171a0c1
test: various test improvements ( #795 )
2023-12-05 01:34:21 -05:00
Jechol Lee
728226bfee
test: Fix typo in MultitenancyTest ( #789 )
2023-12-01 13:02:06 -05:00
Darren Black
7106c61545
test: Failing test for Api.get ( #786 )
2023-11-29 20:05:36 -05:00
Zach Daniel
be935723d2
fix: properly resolve nested calculation dependencies
2023-11-24 07:23:38 -05:00
Jeremy Grant
1ce05562aa
fix: change_attribute failing on a union attribute ( #778 )
2023-11-20 19:10:35 -05:00
Zach Daniel
b9f804db10
fix: properly set actor context on calc expressions in ets data layer
2023-11-16 08:18:39 -05:00
Daniel Newman
8103831cf6
Bug: Actor not being passed
2023-11-15 17:05:31 -05:00
Simon Bergström
b0d5c08f5d
fix: properly include relationship name message when relationship cannot be found ( #770 )
2023-11-13 17:04:35 -05:00
Barnabas Jovanovics
abb0854ae9
fix: remove destroyed or unrelated data from the relationship ( #767 )
2023-11-13 13:58:09 -05:00