Ash Framework
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.
JoinAsh Framework
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.
Joinash_oban discarded jobs with `trigger_no_longer_applies`
** (Oban.PerformError) MyApp.SomeDomain.SomeResource.AshOban.Worker.SomeTrigger failed with {:discard, :trigger_no_longer_applies}
. It's quite odd because as far as I can tell, it seems like the jobs are running when I'd expect them to, however I see my oban jobs littered with many of these discarded jobs. I'm curious if this is something that is common/expected in ash_oban, or if it could potentially signal some deeper issue with my setup.
I've started observing some very strange timing bugs recently (the details of which I won't go into here) which are making me suspect these errors could be indicative of something wrong on a deeper level. I'm hoping to at least get a feel for how to interpret these errors, which I can then use to go debug the setup I have....Tenancy create schema concurrency errors on Tests
Is it possible to use LangChain.NativeTools?
In ash oban infer/bypass tenancy for action
multitenancy :bypass
so it errors out with changesets require a tenant to be specified
this also if I'm specifying a read action that bypasses the tenancy. What is the best practice here allow global true in the multitenancy block?...Using a relationship in a validation (atomicly)
How to use `after_action` when soft delete is enabled in global `Change`
Ash.destroy!(Ash.get!(MishkaCms.Runtime.Site, id))
it is not triggerd
It does not work
```elixir
defmodule MishkaCms.Runtime.Resources.Changes.SendToOban do...atomic
callback depending on how you call your action and your atomic implementation isn't doing anything. But as your change only has an after_action and that's allowed in the context of atomics you can try this:
```elixir
defmodule MishkaCms.Runtime.Resources.Changes.SendToOban do
use Ash.Resource.Change...Drop unneeded column via codegen
office_id
from my ParkingLot
resource, replacing it with a belongs_to :site
relationship. However, when I run mix ash.codegen
, the migration generator is renaming the column instead of dropping the old one and creating a new one:
```
Like this instead of drop/add
rename table(:parking_lots), :office_id, to: :site_id...codegen
. This removed the old column. Then I added the new relationships to the new table and ran codegen
again. Worked perfect, and I kinda like that it forced me to make more granular migrations to drop and then create.Redirect on successful authentication
/sign-in
.
3. They log in successfully....How to implement Authentication with Multiple OAuth2 Providers?
Is It Possible to Track Create and Update Operations at the Domain Level for AshOban?
create
and update
operations at the domain level of all resources under this domain, so that whenever such actions occur, their information is sent to AshOban for further processing?
Something like
```elixir...Upsert with ON CONFLICT DO NOTHING
Ash update action inside Ecto transaction, trying to not rollback if transaction is rolled back
Ash.DataLayer.transaction
. Any ideas how I could have it not be rolled back?How can I show all validation errors (including nested) at once?
Do you have special settings for Credo for Ash projects?
Losing entries for nested forms on validate
manage_relationship(:resource, type: :direct_control)
.
- Have a button to add new form:
```
def handle_event("add-form", %{"path" => path}, socket) do...AshAuthentication with non-Postgres Data Layers?
AshJsonAPI - How to pass a tenant?
curl -XPOST -H 'Content-Type: application/vnd.api+json' localhost:4000/api/json/items -d '{"data": {"type": "item", "attributes": {"name": "test", "provider_id": "01985d4d-f0c4-73b5-8919-29946afeb08c", "deploys": []}}}'
curl -XPOST -H 'Content-Type: application/vnd.api+json' localhost:4000/api/json/items -d '{"data": {"type": "item", "attributes": {"name": "test", "provider_id": "01985d4d-f0c4-73b5-8919-29946afeb08c", "deploys": []}}}'
How to use Heroicons?
mix.exs
:
```
{:heroicons,
github: "tailwindlabs/heroicons",...Error tenant required in calculation on tenant resource
Convenience functions for many_to_many relationships?
many_to_many
relationships. Given the resources below, what I'd like to do is have an add_to_hub
action in the User
module that takes in a Hub record and creates a corresponding UsersToHubs
record.
How would I go about setting up that action, and is placing a function like this inside of my User
resource module at all idiomatic for Ash?
I cut off the TestApp.Hubs.Hub
module due to character limit, but I set it up the same way as my User
module...many_to_many
example when I was reading the docs earlier.
So it's basically just:
```elixir
update :assign_to_hub do...