Update to support latest versions of ktor, exposed, kotlin, etc#85
Update to support latest versions of ktor, exposed, kotlin, etc#85kmayoral wants to merge 2 commits intoFlaxoos:mainfrom
Conversation
|
Hi @kmayoral thank you for your adoption and contribution! To help me understand the issue and review your proposed changes, would you be able to produce a minimal reproducible example? It would also help if you could attach any errors you got, if they are not related to your specific use case, but rather to any version misalignment Thanks! |
|
Hi @Flaxoos , of course! I apologize for not submitting more details earlier, I definitely should have. Repro StepsHere are some steps I went through just now to reproduce:
Upon attempting to run the task, I received this error: which is what first triggered my investigation into this repository. Initial InvestigationFrom my initial investigation, I noticed that the error we were seeing was complaining about repetitionAttempts = 0 on a Transaction object from the Exposed library. The stack trace doesn't immediately indicate that because this library was referencing the 0.44.0 version of Exposed where repetitionAttempts was still defined but at runtime the 0.60.0 version of Exposed was being used where that field had been replaced with maxAttempts. You can see this change outlined in the Exposed v0.50.0 breaking changes page here.
So that was the recap of what started my attempts at updating this repository. My ChangesI went ahead with the intention of updating the Exposed dependency version in this repo to I had also noticed this before when I saw that dependabot triggered version update PRs were not passing, but that made sense since there was an associated code change that was also required. Based on this, I decided to try and update many of the other dependencies to their latest versions and then go through to see what issues remained to fix the tests. That's what led to the remaining changes that resolved the integration test issues seen specifically in the taskscheduling plugin. And that is where this PR stands currently. Current Main Branch Test StateFor reference (I should have done this much earlier in my process), I ran the same Here are some screenshots of the test results and stacktraces for reference. So it seems that my changes didn't introduce those issues but they were already present (but should be fixed now by this PR). I'm fairly comfortable with my changes to address the testing issues that were already present with the exception of the addition of a Mutex to control local access to the redis lock manager. I'd still like to revisit that and see if we can figure out what the true root cause is and a cleaner fix. Thanks for your time in reading this and I hope it helps in some way. Perhaps it might make more sense to fix these things little by little, but I wasn't sure how much bandwidth you had to devote to smaller PRs which is why I started with this one. Thanks for a great set of plugins, these are awesome!! |
|
If we want to handle these changes in chunks, here is the first PR to handle resolving the existing integration test errors on main: #86 Thank you again! |
|
Another update for you @Flaxoos , I was able to isolate the version of Exposed that first causes the jdbc based integration tests to fail. I commented on the other PR which you can see at #86 (comment) |
|
@kmayoral Amazing, thank you for the detailed report. Let me look into this in the coming days. Your approach of updating the dependencies is a good one. Another approach would be to shadow the exposed dependencies the implementation relies on, so the implementation wouldn't rely on dependencies provided by the consuming project, since the db used by the consuming project is separate from the one the plug-in uses (I say this with limited certainty, without looking at the code at the moment of writing this) |
|
@kmayoral I finally got around to paying attention to this, sorry for the delay. I merged your other smaller PR already. |
|
Hi @Flaxoos , thanks for the reviews! Happy to help where I can. Not sure I follow though, do you mean you'd like me to push this branch to to the Flaxoos/extra-ktor-plugins repository? Wouldn't I need to have push access to your repo for that? If you'd like to add me, I'd be happy to push directly, thanks! |
|
Are you not able to crate a branch? There aren't any protection rules to any branch besides main. In any case I invited you to collaborate but please try before accepting it, I just want to see if it's possible |
|
Hi @Flaxoos , I tried pushing directly to your repo prior to accepting the invitation and got the following error: But tried again immediately after accepting the invite and was able to push successfully. I created a new PR #89 which you can see should contain the same commit and merge commit update you had applied to this branch. Thanks! |




Hi there,
I'm a new user of ktor and attempted to use the Ktor project generator (https://start.ktor.io/) to start a new project and included a few of your plugins into my project template.
When I went to run the sample, I got some build errors due to the fact that the generated project runs with Exposed 0.60.0 while the latest supported here currently is 0.44.0.
I went down the rabbit hole of checking out this repo and attempted to update to support the latest ktor (3.1.1), exposed (0.60.0) and kotlin (2.1.10) to hopefully be compatible with the project that is generated from the start.ktor.io site.
Through the process, I had to update several other dependencies and make several modifications to the task scheduling related implementations for postgres, mongo and redis implementations.
Some notes:
Thank you!