Commit graph

2402 commits

Author SHA1 Message Date
Zach Daniel
4f26773fe0 improvement: add ash.rollback task 2024-04-09 14:54:44 -04:00
139058d4c0 fix(Ash.Reactor): crash when calling an ash reactor for the first time.
Thanks to @carlgleisner for the [detailed reproduction](https://github.com/carlgleisner/reactor_notification_worker_issue).

The problem was caused by an attempt to not have nested reactors indepdently publish their notifications separate to the parents but contained a logic flaw which caused the agent to not start, but only the first time you try and use a given reactor.

The fix involves _always_ starting a notification agent for each reactor, but nesting them.  When a reactor completes it either publishes it's notifications to the parent reactor or to ash if there are no parent reactors.
2024-04-10 06:19:38 +12:00
Zach Daniel
1854880def improvement: add config :ash, require_atomic_by_default?, false, for upgrading 2024-04-09 13:45:19 -04:00
Zach Daniel
5c70935f2f improvement: support skip_unknown_inputs in Ash.bulk_create
closes: #998
2024-04-09 13:24:03 -04:00
Zach Daniel
25c1063e45 fix: add context argument to before_action and after_action for read actions
closes #999
2024-04-09 13:21:06 -04:00
Andreas Donig
95ecc5155c
fix: add base case for Ash.Resource.Info.public_relationship/2 (#1000)
test: Add a simple test for Ash.Resource.Info.public_relationship/2

---------

Co-authored-by: Andreas Donig <git@innwiese.de>
2024-04-09 13:17:03 -04:00
321f43bd05 feat(Ash.Reactor): Add new change step type which can be used to modify changesets. 2024-04-09 09:03:04 +12:00
2973c0db94 improvement(Ash.Reactor): Allow create to be provided an initial value.
The initial value can be either a resource or a changeset.
2024-04-09 09:03:04 +12:00
c67295de6e
improvement: Allow Reactor modules to be run directly from generic actions. (#993)
- Extends the generic action runner to detect when the `run` module is a Reactor and automatically executes it in the correct way.
- Adds a verifier that detects said actions and ensures that action arguments are present for all expected inputs.
2024-04-08 16:48:58 -04:00
Zach Daniel
4cbf2d3e14 docs: more restructuring, reviewing of guides 2024-04-08 13:39:45 -04:00
Zach Daniel
5e1df439d7 chore: format 2024-04-08 12:15:09 -04:00
Zach Daniel
e91da15564 docs: moved around some documentation
docs: added changes guide
docs: moved around validations guide, removed extra one
2024-04-08 12:05:36 -04:00
Zach Daniel
05dd917af0 docs: update explanation of sort parser
fix: honor new calcualtion sort format in sort parser
2024-04-08 09:54:05 -04:00
Zach Daniel
c31fbc9c3e fix: don't raise error on keyword input to create interface 2024-04-08 08:41:33 -04:00
Zach Daniel
6d3b00f77f fix: action is an atom in erroor case for bulk update 2024-04-08 08:33:14 -04:00
Zach Daniel
d153b40dea docs: consolidate guides into relationships.md
improvement: add `Ash.Query.apply_to/3`
2024-04-07 15:31:26 -04:00
Zach Daniel
773e9cea91 docs: move identities guide 2024-04-07 14:50:18 -04:00
Zach Daniel
d2612a9ed8 docs: doc fixes, move code interface docs 2024-04-07 12:33:59 -04:00
Zach Daniel
49958975a1 chore: remove dedicated constraints guide, put it in Ash.Type 2024-04-07 10:52:18 -04:00
Zach Daniel
2226b00ca5 docs: more condensation/relocation of docs 2024-04-07 10:11:19 -04:00
Zach Daniel
957ac1880e docs: better docs on atomics & upserts 2024-04-07 09:36:09 -04:00
Zach Daniel
951eaba973 chore: fix build/test 2024-04-07 08:05:23 -04:00
Zach Daniel
d2ea5bb108 docs: rewrite action docs
improvement: synthesize attributes from atomics for better notifications
2024-04-07 08:02:10 -04:00
Dmitry Maganov
bc00873cfd
fix: undo adding primary key argument for methods with get? (#989) 2024-04-07 06:41:03 -04:00
Dmitry Maganov
5c600c1f42
fix: remove internal? and stacktraces? from common opts (#988) 2024-04-07 06:00:32 -04:00
Zach Daniel
ea463402a2 fix: pattern match error in managed relationships
closes #986
2024-04-07 05:17:05 -04:00
Rebecca Le
98d7ee759f
docs: Fix formatting of examples for Ash.Resource.Preparation.Builtins (#987)
* docs: Fix other cases of unformatted code examples
2024-04-07 05:03:21 -04:00
Riccardo Binetti
7d75e64d86
feat: add update_change function and builtin change (#976) 2024-04-07 05:02:38 -04:00
Zach Daniel
8249b6cabd fix: include options for generic action code interfaces 2024-04-07 05:00:50 -04:00
Zach Daniel
26a6efe10d fix: logic errors around arguments/changing attributes in validations 2024-04-06 18:40:40 -04:00
Riccardo Binetti
355bd73bf9
improvement: make Ash.Resource.Validation.Match partially atomic (#979)
* fix: handle partially atomic validations in run_action_changes

* improvement: make Ash.Resource.Validation.Match partially atomic
2024-04-06 17:50:54 -04:00
Zach Daniel
f9eff8810f docs: refactor security guides 2024-04-06 17:40:05 -04:00
Zach Daniel
a7b69303ca chore: properly manage sat solver dependencies 2024-04-05 15:11:09 -04:00
Zach Daniel
8927460f77 fix: more improvements to resource matching in can? 2024-04-05 15:06:44 -04:00
Jefferson Queiroz Venerando
51db6c5b1a
chore: fix typo in sort error message (#984) 2024-04-05 12:38:56 -04:00
Zach Daniel
b0ff379d00 docs: work on organizing docs
fix: detect more cases for domain extraction from resources
2024-04-05 12:24:12 -04:00
Zach Daniel
6a486a4a9a fix: properly dispatch managed relationships to proper domain 2024-04-05 09:57:52 -04:00
Zach Daniel
4e329cde31 fix: check target resource's domain before assuming it is the same as current domain 2024-04-05 06:37:20 -04:00
Riccardo Binetti
38c1ca808d
fix: return {:error, query} for invalid query in Aggregate.run/4 (#982)
Avoid making callers like Ash.aggregate crash with a WithClause error
since they expect an :ok/:error tuple
2024-04-05 06:36:05 -04:00
Zach Daniel
f473b32297 fix: allow strings in Ash.Type.Enum again 2024-04-05 06:25:54 -04:00
Zach Daniel
7534d6bcb1 chore: try again w/ domain priority 2024-04-04 22:55:30 -04:00
Zach Daniel
950ff3d060 fix: set tenant in bulk creates after setting up changeset 2024-04-04 20:34:37 -04:00
Zach Daniel
0f8c8152c7 chore: format 2024-04-04 20:07:49 -04:00
Riccardo Binetti
fb66b83670
chore: show the correct alternatives for already validated changesets (#978) 2024-04-04 18:56:00 -04:00
Zach Daniel
3f82e3fe0a fix: use the resource's domain above option domain 2024-04-04 18:44:25 -04:00
Zach Daniel
ca89ee4840 chore: format 2024-04-04 18:21:51 -04:00
Zach Daniel
3cfa980762 docs: start on docs overhaul 2024-04-04 16:24:55 -04:00
Zach Daniel
ec76778b49 chore: backport fixes from 2.0 2024-04-04 14:45:03 -04:00
Zach Daniel
cce4a0f2c3 fix: properly cast identity keys before comparison
fixes #877
2024-04-04 14:30:50 -04:00
Zach Daniel
9cf1e3a215 fix: properly handle multiple paths for checking sortable relationships 2024-04-04 09:55:12 -04:00