Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't trigger a job that uses a generic action #89

Open
andr-ec opened this issue Oct 18, 2024 · 1 comment
Open

Can't trigger a job that uses a generic action #89

andr-ec opened this issue Oct 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@andr-ec
Copy link

andr-ec commented Oct 18, 2024

Is your feature request related to a problem? Please describe.
If the action is a generic action, a job won't trigger it will error. Some times I we'll need a trigger that doesn't necessarily update or destroy.

"** (Ash.Error.Unknown.UnknownError) ** (CaseClauseError) no case clause matching: :action\n    (ash 3.4.32) lib/ash/changeset/changeset.ex:1241: Ash.Changeset.for_action/4\n    (otterwake 0.1.0) deps/ash_oban/lib/transformers/define_schedulers.ex:727: Otterwake.VideoPlatform.SimulcastTarget.AshOban.Worker.StreamSimulcast.perform/1\n    (oban 2.18.3) lib/oban/queue/executor.ex:145: Oban.Queue.Executor.perform/1\n    (oban 2.18.3) lib/oban/queue/executor.ex:77: Oban.Queue.Executor.call/1\n    (oban 2.18.3) lib/oban/engines/inline.ex:97: Oban.Engines.Inline.execute_job/2\n    (oban 2.18.3) lib/oban/engines/inline.ex:37: Oban.Engines.Inline.insert_job/3\n    (oban 2.18.3) lib/oban/engine.ex:192: anonymous fn/4 in Oban.Engine.insert_job/3\n    (oban 2.18.3) lib/oban/engine.ex:339: anonymous fn/3 in Oban.Engine.with_span/4\n    (telemetry 1.3.0) /home/andre/Documents/otterwake/deps/telemetry/src/telemetry.erl:324: :telemetry.span/3\n    (oban 2.18.3) lib/oban.ex:611: Oban.insert!/3\n    (elixir 1.17.3) elixir.erl:386: :elixir.eval_external_handler/3\n    (stdlib 4.3.1.4) erl_eval.erl:748: :erl_eval.do_apply/7\n    (elixir 1.17.3) elixir.erl:364: :elixir.eval_forms/4\n    (elixir 1.17.3) lib/module/parallel_checker.ex:112: Module.ParallelChecker.verify/1\n    lib/livebook/runtime/evaluator.ex:635: anonymous fn/3 in Livebook.Runtime.Evaluator.eval/4\n    (elixir 1.17.3) lib/code.ex:621: Code.with_diagnostics/2\n    lib/livebook/runtime/evaluator.ex:629: Livebook.Runtime.Evaluator.eval/4\n    lib/livebook/runtime/evaluator.ex:437: Livebook.Runtime.Evaluator.continue_do_evaluate_code/6\n    lib/livebook/runtime/evaluator.ex:337: Livebook.Runtime.Evaluator.loop/1\n    (stdlib 4.3.1.4) proc_lib.erl:240: :proc_lib.init_p_do_apply/3\n"

Describe the solution you'd like
A clear and concise description of what you want to happen.
triggers supporting generic actions

Describe alternatives you've considered
using an update action

Express the feature either with a change to resource syntax, or with a change to the resource interface

For example

    triggers do
      # add a trigger called `:process`
      trigger :stream_simulcast do
        # this trigger calls the `process` action
        action :say_hello
        queue(:default)
        scheduler_cron(false)

        worker_read_action(:read)
        # error :error
        # this should check that the stream is active
        # where expr(status == :active)
      end
    end
  end

Or

    action :say_hello, :string do
      run fn input, _ ->
        {:ok, "Hello"}
      end
    end

Additional context
Add any other context or screenshots about the feature request here.

@andr-ec andr-ec added the enhancement New feature or request label Oct 18, 2024
@zachdaniel
Copy link
Contributor

Generic actions are currently not supported. PRs welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants