-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fully overhaul package for modern Swift/Vapor/Fluent #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to say thanks for giving this package some love! ❤️
…. Remove soft-deletion support (Fluent will not support this in the future). Stop hardcoding supported database names altogether, rely on dialect flag instead. Normalize database column names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some queries but I really think we should remove all the future APIs these days for a major release
Hi, is there an ETA when this is released? This PR is still in draft otherwise I would have jumped right into it to try it out. I would love to get rid of my redis instance to simplify the stack & reduce costs. Anyway thanks for the amazing work you do with vapor. |
…del. Make `attempts` non-optional in the database. Don't use variable column names in the migration. Consolidate, document, and expand upon the SQLKit/FluentKit extensions.
|
||
public struct JobMetadataMigrate: Migration { | ||
public init() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might still need this, otherwise I get this error:
'JobMetadataMigrate' initializer is inaccessible due to 'internal' protection level
I've tried this branch, however jobs fail with following error:
This error is not visible in the console (its redacted):
I added a breakpoint in AsyncAwaitSupport.swift:70 to get the error. |
return try await self.sqlDb.update(JobModel.sqlTable) | ||
.set(\JobModel.$state, to: QueuesFluentJobState.processing) | ||
.set(\JobModel.$updatedAt, to: .now()) | ||
.where(\JobModel.$id, .equal, .group(select.query)) | ||
.returning(JobModel.sqlColumn(\.$id)) | ||
.first(decodingColumn: JobModel.key(for: \.$id), as: String.self) | ||
.map(JobIdentifier.init(string:)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My investigation shows that the error is thrown in here. However my limited knowledge with sql prevents me from investigating further or fixing it as I have no idea what's going on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Patrick-Kladek This PR is not at all ready for use yet, unfortunately 😰. I had to set it aside for a bit due to time constraints, but I will come back to finish it shortly; I wouldn't recommend trying it out until I've marked it ready for review, as you've seen, it doesn't even properly compile quite yet 😅. Sorry for any confusion! |
@gwynne thanks for the heads up. I thought I'll give it a try as it was sitting here for a while and thought I would document my experience and at least help this way. Please don't feel pressured to finish this asap, I see you are doing a lot on vapor and wanted to say thank you. If there is anything I could help you with, please let me know. |
…roperty from FluentQueuesDriver, simplify error checking in makeQueue(), rename QueuesFluentJobState -> StoredJobState, reorganize JobModel, make JobModelMigration an AsyncSQLMigration, remove unused error cases from QueuesFluentError enum, add additional SQLKit convenience methods
…ng except specifying the database at configuration time and starting transactions. No longer even uses a Fluent model.
@gwynne can I help you with this task somehow? Maybe we can discuss specific tasks/goals and then I can give this a try. Are we waiting for some other dependency to be finished first? |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
Pretty much what it says. Changes in public API:
JobMetadataMigration
is no longer configurableQueuesFluentDbType
has been removedCurrent plan is for these changes to be tagged as 3.0.0-beta.2