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

Upgrading to Oban 2.17.4 from 2.17.3 fails compilation step with no function clause matching in Ecto.Query.with_cte/3 #1041

Closed
corroded opened this issue Feb 21, 2024 · 1 comment
Labels
area:oss Related to Oban OSS kind:bug Something isn't working

Comments

@corroded
Copy link

Precheck

  • Do a quick search and make sure the bug has not yet been reported
  • For support, favor using the Elixir Forum, Slack, IRC, etc.
  • Be friendly and polite!

Environment

  • Oban Version: 2.17.4
  • PostgreSQL Version: 12.3
  • Elixir & Erlang/OTP Versions (elixir --version): elixir 1.16.1-otp-26, erlang 26.2.1

Current Behavior

Upgrading to Oban 2.17.4 from 2.17.3 fails compilation step. To add, we are using Ecto 3.9.6.

==> oban
Compiling 56 files (.ex)

== Compilation error in file lib/oban/engines/basic.ex ==
** (FunctionClauseError) no function clause matching in Ecto.Query.with_cte/3    
    (ecto 3.9.6) expanding macro: Ecto.Query.with_cte/3
    lib/oban/engines/basic.ex:107: Oban.Engines.Basic.fetch_jobs/3
    (elixir 1.16.1) expanding macro: Kernel.|>/2
    lib/oban/engines/basic.ex:107: Oban.Engines.Basic.fetch_jobs/3
    (ecto 3.9.6) expanding macro: Ecto.Query.select/3
    lib/oban/engines/basic.ex:111: Oban.Engines.Basic.fetch_jobs/3
    (elixir 1.16.1) expanding macro: Kernel.|>/2
    lib/oban/engines/basic.ex:111: Oban.Engines.Basic.fetch_jobs/3
could not compile dependency :oban, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile oban --force", update it with "mix deps.update oban" or clean it with "mix deps.clean oban"

I looked into it and Ecto.Query.with_cte/3 actually exists in Ecto 3.9.6. The with_cte function was also recently changed in 2.17.4: 02541e8

I admittedly have a limited knowledge of this specific command and function so I cannot debug further. Let me know if you need more info!

Expected Behavior

It should compile.

@sorentwo
Copy link
Member

The materialized option used in Oban v2.17.4 wasn’t released until Ecto 3.10. Bumping up Ecto will fix the problem, and we’ll update Oban’s requirement.

@sorentwo sorentwo added kind:bug Something isn't working area:oss Related to Oban OSS labels Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:oss Related to Oban OSS kind:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants