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
feat(postgres): default datetime/timestamp precision setting added #5311
base: master
Are you sure you want to change the base?
Conversation
I dunno why, but locally i'm getting random files that I never touched being changed and added to commits: lib/.gitignore and dialects/index.js I've removed them (hence the multiple commits), but if I try to rebase the branch or anything they appear again. Is this some magic configured together with git hooks? |
} = require('../util/knex-instance-provider'); | ||
|
||
describe('PostgreSQL dialect', () => { | ||
const dbs = getAllDbs().filter((db) => db === Db.PostgresSQL); |
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.
so uh, why do you get a list and filter it down to a single value, instead of just starting with that single value?
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.
good point, I was mostly just repeating this procedure the same way it was done in other integration tests
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.
@kibertoad so should I just fix this part and then this is ready for merge?
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.
let's try enabling tests for CockroachDB as well and see if that would also pass
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.
@kibertoad I've refactored the tests to also test CockroachDb as well. The column alteration test has to be skipped though, because apparently CockroachDB doesn't support altering columns?
Considering that I don't know anything about CockroachDb, that this PR isn't even meant for it and I'm having to deal with CockroachDB specific issues now I'd prefer it if we can just release this feature as is and if anyone needs something extra for CockroachDB, they can always submit another PR.
lib/.gitignore
Outdated
@@ -7,4 +7,4 @@ | |||
**/*.js.map | |||
|
|||
# Do not include .js files from .ts files | |||
dialects\index.js | |||
dialects/index.js |
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.
this is done automatically by one of the npm scripts, in fact I can't even get rid of this change cause it gets added back every time I revert it
@kibertoad i'd appreciate it if we could get this merged sometime soon 🙌 |
@kibertoad I see some tests are failing, but the failures don't make sense to me - There are some connection refused errors and errors in tests that don't really seem to have anything to do with my changes, so could it be a test runner issue as well? The tests did run through successfully on my end |
I will check the tests later, but it's seems you do some strange init of DB instances... |
Thank you! This is a new & foreign repo for me, so I just tried to look at how other tests are written to write mine |
@OlivierCavadenti @kibertoad Hi, any news on this? If there are any changes I need to do, let me know, but please also provide me some providers on the correct way to do things, cause this repo is new to me |
Anything I can do to push this through quicker? I'm fine making changes, if anyone can give me pointers :) |
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.
left a few comments, great job!
let's resolve those and get this thing merged
@kibertoad what about docs update?
@rluvaton I've resolved both of the issues you brought up |
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.
LGTM
@kibertoad can you please merge
@fabis94 Tests are failing |
@kibertoad @rluvaton The test failures don't make sense to me, it's a bunch of "Error: connect ECONNREFUSED ::1:26257" errors, and I didn't change any of the connection settings so it doesn't feel very related 🤔 https://github.com/knex/knex/actions/runs/7098240971/job/19422356671 |
@fabis94 Only new tests are failing, though. See the end of logs at https://github.com/knex/knex/actions/runs/7098240971/job/19422352541?pr=5311 Are they passing locally for you? |
}); | ||
|
||
// cockroachdb doesn't support altering columns at this point in time? https://github.com/cockroachdb/cockroach/issues/49329 | ||
it('if default datetime precision specified, it gets used when altering datetime/timestamp fields', async () => { |
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.
it('if default datetime precision specified, it gets used when altering datetime/timestamp fields', async () => { | |
it('if default datetime precision specified, it gets used when altering datetime/timestamp fields', async function() { |
It fails for me as well |
@rluvaton @kibertoad This project doesn't exactly have the nicest contributor onboarding experience, the contributor docs are lacking and I was never able to get all of the tests working even on the main branch! So yes, I do see test failures locally, but many of them seem unrelated to this ticket and I'd appreciate some help here considering that I don't know this project very well. I fixed the issue @rluvaton brought up, but I'm still getting test failures locally:
|
Thank you for the feedback, do you mind opening an issue with all the thing you wish was better? Are the |
closes #5308