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

Allow dashes (-) in collection names #1312

Merged
merged 14 commits into from Oct 25, 2022

Conversation

noisersup
Copy link
Member

@noisersup noisersup commented Oct 24, 2022

Description

Closes #1280 .

Readiness checklist

  • I added tests for new functionality or bugfixes.
  • I ran task all, and it passed.
  • I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
  • I checked comments rendering with task godocs.
  • I ensured that the title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@vercel
Copy link

vercel bot commented Oct 24, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ferret-db ✅ Ready (Inspect) Visit Preview Oct 25, 2022 at 4:53PM (UTC)

@vercel vercel bot temporarily deployed to Preview October 24, 2022 13:39 Inactive
@noisersup noisersup self-assigned this Oct 24, 2022
@vercel vercel bot temporarily deployed to Preview October 24, 2022 13:47 Inactive
@vercel vercel bot temporarily deployed to Preview October 24, 2022 13:58 Inactive
@vercel vercel bot temporarily deployed to Preview October 24, 2022 14:02 Inactive
@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Merging #1312 (03bd269) into main (1df8ad6) will increase coverage by 20.60%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1312       +/-   ##
===========================================
+ Coverage   46.82%   67.42%   +20.60%     
===========================================
  Files         279      279               
  Lines       13100    13100               
===========================================
+ Hits         6134     8833     +2699     
+ Misses       6231     3342     -2889     
- Partials      735      925      +190     
Impacted Files Coverage Δ
internal/handlers/pg/pgdb/collections.go 50.00% <ø> (+2.27%) ⬆️
internal/handlers/pg/pgdb/databases.go 55.00% <ø> (+5.00%) ⬆️
internal/util/version/version.go 48.52% <0.00%> (-4.42%) ⬇️
internal/clientconn/conn.go 44.01% <0.00%> (+0.70%) ⬆️
integration/helpers.go 87.23% <0.00%> (+1.06%) ⬆️
internal/handlers/pg/pgdb/tables.go 64.70% <0.00%> (+2.94%) ⬆️
internal/handlers/pg/pgdb/settings.go 44.18% <0.00%> (+6.97%) ⬆️
internal/handlers/common/limit.go 75.00% <0.00%> (+8.33%) ⬆️
... and 51 more
Flag Coverage Δ
integration 63.33% <ø> (+25.98%) ⬆️
mongodb 14.23% <ø> (-0.03%) ⬇️
pg 52.89% <ø> (?)
tigris 34.73% <ø> (-0.03%) ⬇️
unit 25.86% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@vercel vercel bot temporarily deployed to Preview October 24, 2022 14:19 Inactive
@vercel vercel bot temporarily deployed to Preview October 25, 2022 11:04 Inactive
@vercel vercel bot temporarily deployed to Preview October 25, 2022 11:21 Inactive
@vercel vercel bot temporarily deployed to Preview October 25, 2022 11:30 Inactive
@vercel vercel bot temporarily deployed to Preview October 25, 2022 11:37 Inactive
@noisersup noisersup added the code/enhancement Some user-visible feature could work better label Oct 25, 2022
@noisersup
Copy link
Member Author

We don't check for dashes inside the dance tests so I'm not sure what should we change there

@vercel vercel bot temporarily deployed to Preview October 25, 2022 12:10 Inactive
@noisersup noisersup marked this pull request as ready for review October 25, 2022 12:15
@noisersup noisersup requested a review from a team October 25, 2022 12:15
@noisersup noisersup requested a review from a team as a code owner October 25, 2022 12:15
@noisersup noisersup requested a review from AlekSi October 25, 2022 12:15
@noisersup noisersup requested review from Fashander, w84thesun, rumyantseva, a team and chilagrow and removed request for a team October 25, 2022 12:15
@vercel vercel bot temporarily deployed to Preview October 25, 2022 12:46 Inactive
@vercel vercel bot temporarily deployed to Preview October 25, 2022 13:43 Inactive
Copy link
Member

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me in general.
I remember, at planning, we were discussing if we should start using dashes instead of undescores in CollectionName testutil's handler -

func CollectionName(tb testing.TB) string {
. So, you decided not doing it?

@vercel vercel bot temporarily deployed to Preview October 25, 2022 16:53 Inactive
@noisersup
Copy link
Member Author

@rumyantseva I was confused about this part and thought that discussion and mention about this function was only because it would not work correctly. Now, I can see that the point of this change is different. Do we finally prefer using underscores there or dashes?

@rumyantseva
Copy link
Member

@noisersup I think the idea was to have more test cases. Personally, I'm ok with either dashes or underscores.

Copy link
Member

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as everything is tested.

@noisersup noisersup merged commit 97d8407 into FerretDB:main Oct 25, 2022
@noisersup noisersup deleted the allow-dashes-coll-1280 branch October 25, 2022 17:32
@AlekSi AlekSi added this to the v0.6.0 Alpha milestone Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/enhancement Some user-visible feature could work better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow dashes (-) in collection names
3 participants