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

Support listIndexes command #1960

Merged
merged 30 commits into from Feb 14, 2023

Conversation

rumyantseva
Copy link
Member

@rumyantseva rumyantseva commented Feb 13, 2023

Description

Closes #278.

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration/compatibility tests.
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR 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.

@rumyantseva rumyantseva self-assigned this Feb 13, 2023
@rumyantseva rumyantseva added code/feature Some user-visible feature is not implemented yet no ci labels Feb 13, 2023
@rumyantseva rumyantseva removed the no ci label Feb 13, 2023
@rumyantseva rumyantseva marked this pull request as ready for review February 13, 2023 14:50
@rumyantseva rumyantseva requested a review from a team February 13, 2023 14:50
@rumyantseva rumyantseva requested a review from a team as a code owner February 13, 2023 14:50
@rumyantseva rumyantseva enabled auto-merge (squash) February 13, 2023 14:50
@rumyantseva rumyantseva requested review from a team and noisersup February 13, 2023 14:51
Copy link
Contributor

@w84thesun w84thesun left a comment

Choose a reason for hiding this comment

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

Nice one! Added some comments.

website/docs/reference/supported_commands.md Outdated Show resolved Hide resolved
integration/commands_administration_test.go Show resolved Hide resolved
integration/commands_administration_test.go Outdated Show resolved Hide resolved
Co-authored-by: Dmitry <dmitry.eremenko@ferretdb.io>
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Merging #1960 (4e95409) into main (12a702e) will increase coverage by 8.03%.
The diff coverage is 68.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1960      +/-   ##
==========================================
+ Coverage   62.00%   70.03%   +8.03%     
==========================================
  Files         317      317              
  Lines       15654    15702      +48     
==========================================
+ Hits         9706    10997    +1291     
+ Misses       5121     3737    -1384     
- Partials      827      968     +141     
Impacted Files Coverage Δ
internal/handlers/tigris/msg_listindexes.go 72.22% <64.70%> (+72.22%) ⬆️
internal/handlers/pg/msg_listindexes.go 74.13% <68.42%> (+74.13%) ⬆️
internal/handlers/tigris/tigrisdb/collections.go 61.90% <100.00%> (ø)
internal/handlers/tigris/tigrisdb/insert.go 65.07% <100.00%> (+50.79%) ⬆️
internal/handlers/common/filter.go 84.65% <0.00%> (ø)
internal/handlers/common/params.go 96.32% <0.00%> (+1.33%) ⬆️
...nternal/handlers/tigris/tigrisdb/query_iterator.go 82.81% <0.00%> (+1.56%) ⬆️
internal/handlers/tigris/tjson/schema.go 81.52% <0.00%> (+1.63%) ⬆️
internal/handlers/tigris/tjson/tjson.go 78.33% <0.00%> (+2.77%) ⬆️
internal/handlers/tigris/tjson/document.go 46.98% <0.00%> (+3.61%) ⬆️
... and 45 more
Flag Coverage Δ
integration 66.28% <68.00%> (+11.70%) ⬆️
mongodb 14.22% <0.00%> (-0.05%) ⬇️
pg 54.59% <34.66%> (+0.12%) ⬆️
tigris 44.93% <33.33%> (?)
unit 28.96% <2.66%> (-0.10%) ⬇️

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

Copy link
Contributor

@w84thesun w84thesun left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@noisersup noisersup left a comment

Choose a reason for hiding this comment

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

💯

@rumyantseva rumyantseva merged commit 10399ee into FerretDB:main Feb 14, 2023
@rumyantseva rumyantseva deleted the issue-278-list-indexes branch February 14, 2023 17:36
}

// TestCommandsAdministrationRunCommandListIndexes tests the behavior when listIndexes is called through RunCommand.
// It's handy to use it to test the correctness of errors.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should test through RunCommand in general: we want compatibility with apps through drivers, not with specs/docs via RunCommand. There are some exceptions like drop that hide some errors, but they are exceptions. There is no need to over-test simple commands like listIndexes

@AlekSi AlekSi added this to the v0.9.1 milestone Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/feature Some user-visible feature is not implemented yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support listIndexes command
5 participants