ryanwinchester
When adding :deps to Workflow.add_cascade/4 I get a LSP/Dialyzer error
The function call will not succeed.
Oban.Pro.Workflow.add_cascade(
%Oban.Pro.Workflow{
:changesets => [
%Ecto.Changeset{
:action => atom(),
:changes => %{atom() => _},
:constraints => [
%{
:constraint =>
binary()
| %Regex{
:opts => binary() | [any()],
:re_pattern => _,
:re_version => _,
:source => binary()
},
:error_message => binary(),
:error_type => atom(),
:field => atom(),
:match => :exact | :prefix | :suffix,
:type => :check | :exclusion | :foreign_key | :unique
}
],
:data => %Oban.Job{
:__meta__ => _,
:args => map(),
:attempt => non_neg_integer(),
:attempted_at =>
nil
| %DateTime{
:calendar => atom(),
:day => pos_integer(),
:hour => non_neg_integer(),
:microsecond => {non_neg_integer(), non_neg_integer()},
:minute => non_neg_integer(),
:month => pos_integer(),
:second => non_neg_integer(),
:std_offset => integer(),
:time_zone => binary(),
:utc_offset => integer(),
:year => integer(),
:zone_abbr => binary()
},
:attempted_by => nil | [binary()],
:cancelled_at =>
nil
| %DateTime{
:calendar => atom(),
:day => pos_integer(),
:hour => non_neg_integer(),
:microsecond => {non_neg_integer(), non_neg_integer()},
:minute => non_neg_integer(),
:month => pos_integer(),
:second => non_neg_integer(),
:std_offset => integer(),
:time_zone => binary(),
:utc_offset => integer(),
:year => integer(),
:zone_abbr => binary()
},
:completed_at =>
nil
| %DateTime{
:calendar => atom(),
:day => pos_integer(),
:hour => non_neg_integer(),
:microsecond => {non_neg_integer(), non_neg_integer()},
:minute => non_neg_integer(),
:month => pos_integer(),
:second => non_neg_integer(),
:std_offset => integer(),
:time_zone => binary(),
:utc_offset => integer(),
:year => integer(),
:zone_abbr => binary()
},
:conf =>
nil
| %Oban.Config{
:dispatch_cooldown => pos_integer(),
:engine => atom(),
:get_dynamic_repo => nil | (-> atom() | pid()) | {atom(), atom(), [any()]},
:insert_trigger => boolean(),
:log =>
:alert
| :critical
| :debug
| :emergency
| :error
| false
| :info
| :notice
| :warn
| :warning,
:name => _,
:node => binary(),
:notifier => {atom(), Keyword.t()},
:peer => {atom(), Keyword.t()},
:plugins => [atom() | {atom() | Keyword.t()}],
:prefix => false | binary(),
:queues => Keyword.t(Keyword.t()),
:repo => atom(),
:shutdown_grace_period => non_neg_integer(),
:stage_interval => timeout(),
:testing => :disabled | :inline | :manual
},
:conflict? => boolean(),
:discarded_at =>
nil
| %DateTime{
:calendar => atom(),
:day => pos_integer(),
:hour => non_neg_integer(),
:microsecond => {non_neg_integer(), non_neg_integer()},
:minute => non_neg_integer(),
:month => pos_integer(),
:second => non_neg_integer(),
:std_offset => integer(),
:time_zone => binary(),
:utc_offset => integer(),
:year => integer(),
:zone_abbr => binary()
},
:errors => [
%{
:at => %DateTime{
:calendar => atom(),
:day => pos_integer(),
:hour => non_neg_integer(),
:microsecond => {non_neg_integer(), non_neg_integer()},
:minute => non_neg_integer(),
:month => pos_integer(),
:second => non_neg_integer(),
:std_offset => integer(),
:time_zone => binary(),
:utc_offset => integer(),
:year => integer(),
:zone_abbr => binary()
},
:attempt => pos_integer(),
:error => binary()
}
],
:id => pos_integer(),
:inserted_at => %DateTime{
:calendar => atom(),
:day => pos_integer(),
:hour => non_neg_integer(),
:microsecond => {non_neg_integer(), non_neg_integer()},
:minute => non_neg_integer(),
:month => pos_integer(),
:second => non_neg_integer(),
:std_offset => integer(),
:time_zone => binary(),
:utc_offset => integer(),
:year => integer(),
:zone_abbr => binary()
},
:max_attempts => pos_integer(),
:meta => map(),
:priority => 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9,
:queue => binary(),
:replace =>
nil
| [
[
:args
| :max_attempts
| :meta
| :priority
| :queue
| :scheduled_at
| :tags
| :worker
]
| {:available
| :cancelled
| :completed
| :discarded
| :executing
| :retryable
| :scheduled,
[
[
:args
| :max_attempts
| :meta
| :priority
| :queue
| :scheduled_at
| :tags
| :worker
]
]}
],
:scheduled_at => %DateTime{
:calendar => atom(),
:day => pos_integer(),
:hour => non_neg_integer(),
:microsecond => {non_neg_integer(), non_neg_integer()},
:minute => non_neg_integer(),
:month => pos_integer(),
:second => non_neg_integer(),
:std_offset => integer(),
:time_zone => binary(),
:utc_offset => integer(),
:year => integer(),
:zone_abbr => binary()
},
:state => binary(),
:tags => [binary()],
:unique =>
nil
| %{
:fields => [:args | :meta | :queue | :worker],
:keys => [atom()],
:period =>
:infinity
| pos_integer()
| {pos_integer(),
:day
| :days
| :hour
| :hours
| :minute
| :minutes
| :second
| :seconds
| :week
| :weeks},
:states => [
[
:available
| :cancelled
| :completed
| :discarded
| :executing
| :retryable
| :scheduled
]
],
:timestamp => :inserted_at | :scheduled_at
},
:unsaved_error =>
nil
| %{
:kind => :error | :exit | :throw | {:EXIT, pid()},
:reason => _,
:stacktrace => [
{(... -> any), [any()] | non_neg_integer(), Keyword.t()}
| {atom(), atom(), [any()] | non_neg_integer(), Keyword.t()}
]
},
:worker => binary()
},
:empty_values => _,
:errors => Keyword.t({binary(), Keyword.t()}),
:filters => %{atom() => _},
:params => nil | %{binary() => _},
:prepare => [
(%Ecto.Changeset{:action => atom(), :changes => map(), _ => _} ->
%Ecto.Changeset{:action => atom(), :changes => map(), _ => _})
],
:repo => atom(),
:repo_opts => Keyword.t(),
:required => [atom()],
:types => %{
atom() =>
atom()
| {:array | :assoc | :embed | :in | :map | :parameterized | :supertype | :try,
_}
},
:valid? => boolean(),
:validations => Keyword.t()
},
...
],
:check_deps => boolean(),
:grafts => _,
:id => binary(),
:names => %MapSet{:map => MapSet.internal(_) | :sets.set(_)},
:opts => map(),
:subs => map()
},
:orders,
(_ -> {[any()], [any()]}),
[{:deps, :init}]
)
breaks the contract
(t(), name(), cascade_capture(), add_cascade_opts()) :: t()
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted”
Version...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 2- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
al2o3cr
I believe there’s a bug in the type for
add_cascade_opts():The
|operator normally expects options also separated with|, likeOban.Job.option():As currently written, the type means “a list where elements are either tuples from
Oban.Job.option()or a keyword list shaped likeadd_opts()”, so something like[[deps: :init]]would match the current spec. (but presumably fail catastrophically where options are parsed)I don’t currently have access to Oban Pro, but updating the definition of
add_cascade_optswould likely remove the error you’re seeing:Beware that changes to files in
deps/won’t get picked up by Dialyzer until you nuke_buildand any cached PLTs.sorentwo
Thanks for reporting the issue (and thanks @al2o3cr for the resolution). This is fixed for the Pro v1.6 release