-
Notifications
You must be signed in to change notification settings - Fork 378
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
Support all valid collection names #778
Support all valid collection names #778
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.
I had a look. My biggest concern is race conditions.
Should we discuss how are we going to avoid them?
…thub.com/w84thesun/FerretDB into issue-750-support-valid-collection-names
…thub.com/w84thesun/FerretDB into issue-750-support-valid-collection-names
Codecov Report
@@ Coverage Diff @@
## main #778 +/- ##
==========================================
- Coverage 59.58% 58.92% -0.66%
==========================================
Files 216 217 +1
Lines 9475 9817 +342
==========================================
+ Hits 5646 5785 +139
- Misses 3177 3323 +146
- Partials 652 709 +57
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
@w84thesun sorry, tests
See #815 |
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 looks to me that the last place where tableName
and collectionName
are mixed is in the tests. But there will be tons of tests to refactor! So, I think personally I'm ready to approve what we have now. Maybe we can refactor names in tests later?
@w84thesun you rock! That was a huge refactoring!
}, { | ||
name: "CreateCollection", | ||
f: func() error { | ||
return pool.CreateCollection(ctx, schemaName, tableName) |
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.
Is this tableName
should we a collectionName
now?
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.
Yeah, I suggest working on those tests in a separate PR. We might want to add more tests for the Pool.
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.
Ha, I did not read it before review. Good to see us on the same page
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 to unblock Elena
@@ -129,13 +128,13 @@ func Table(ctx context.Context, tb testing.TB, pool *pgdb.Pool, db string) strin | |||
table := TableName(tb) |
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.
@rumyantseva Please clean-up those helpers in your PR. For example, it is not clean if this helper return table name (with a hash) or collection name. At very least, documentation should be updated. Maybe name too
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.
👌
Closes #750.
Checklist.
task all
passes.See CONTRIBUTING.md for more details.