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

Implement ListCollections, CreateCollection and DropCollection #3444

Merged

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented Sep 27, 2023

Description

Closes #3406.

Readiness checklist

  • I added/updated unit tests (and they pass).
  • I added/updated integration/compatibility tests (and they pass).
  • 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), Milestone (Next), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@chilagrow chilagrow added the code/feature Some user-visible feature is not implemented yet label Sep 27, 2023
@chilagrow chilagrow added this to the Next milestone Sep 27, 2023
@chilagrow chilagrow self-assigned this Sep 27, 2023
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #3444 (e479dec) into main (5a6881d) will decrease coverage by 0.94%.
The diff coverage is 20.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3444      +/-   ##
==========================================
- Coverage   74.06%   73.12%   -0.94%     
==========================================
  Files         422      422              
  Lines       26346    26375      +29     
==========================================
- Hits        19512    19288     -224     
- Misses       5687     5923     +236     
- Partials     1147     1164      +17     
Files Coverage Δ
internal/backends/postgresql/metadata/registry.go 62.55% <100.00%> (+0.50%) ⬆️
internal/backends/postgresql/database.go 9.85% <0.00%> (-4.73%) ⬇️

... and 24 files with indirect coverage changes

Flag Coverage Δ
filter-true 68.25% <0.00%> (-1.10%) ⬇️
hana-1 ?
integration 68.25% <0.00%> (-1.10%) ⬇️
mongodb-1 4.63% <0.00%> (-0.01%) ⬇️
pg-1 ?
pg-2 43.24% <0.00%> (-0.05%) ⬇️
pg-3 42.90% <0.00%> (-0.05%) ⬇️
postgresql-1 ∅ <ø> (∅)
sort-false 68.25% <0.00%> (-1.10%) ⬇️
sqlite-1 39.74% <0.00%> (-0.03%) ⬇️
sqlite-2 42.47% <0.00%> (-0.05%) ⬇️
sqlite-3 42.40% <0.00%> (-0.05%) ⬇️
unit 24.45% <20.58%> (-0.01%) ⬇️

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

@chilagrow
Copy link
Member Author

chilagrow commented Sep 27, 2023

$ task test-integration-postgresql TEST_RUN='^TestCommandsAdministrationCreateDropList$|ListCollections|TestCollectionName'
task: [test-integration-postgresql] go test -count=1 -run='^TestCommandsAdministrationCreateDropList$|ListCollections|TestCollectionName' -timeout=35m -race=true -tags=ferretdb_debug,ferretdb_hana -shuffl
e=on -coverpkg=../... -coverprofile=integration-postgresql.txt -target-backend=ferretdb-pg -target-tls -postgresql-url='postgres://username@127.0.0.1:5432/ferretdb?pool_max_conns=50&search_path=' -compat-
url='mongodb://username:password@127.0.0.1:47018/?tls=true&tlsCertificateKeyFile=../build/certs/client.pem&tlsCaFile=../build/certs/rootCA-cert.pem' -use-new-pg -disable-filter-pushdown=false -enable-sort
-pushdown=false                                              
                                                                                                                           
2023-09-28T11:25:12.358+0900    INFO    setup/startup.go:94     Target system: ferretdb-pg (built-in).                     
2023-09-28T11:25:12.358+0900    INFO    debug   debug/debug.go:92       Starting debug server on http://127.0.0.1:41947/   
2023-09-28T11:25:12.481+0900    INFO    setup/startup.go:105    Compat system: MongoDB (mongodb://username:password@127.0.0.1:47018/?tls=true&tlsCertificateKeyFile=../build/certs/client.pem&tlsCaFile=../b
uild/certs/rootCA-cert.pem).                       
-test.shuffle 1695867912481266586                                                                     
PASS                                               
coverage: 18.8% of statements in ../...                                                               
ok      github.com/FerretDB/FerretDB/integration        3.202s                                                                                                                                              

@chilagrow chilagrow marked this pull request as ready for review September 27, 2023 10:21
@chilagrow chilagrow requested a review from AlekSi as a code owner September 27, 2023 10:21
@chilagrow chilagrow requested review from a team, rumyantseva and noisersup September 27, 2023 10:22
@chilagrow chilagrow enabled auto-merge (squash) September 27, 2023 10:22
@chilagrow chilagrow requested a review from AlekSi September 28, 2023 02:42
@chilagrow chilagrow requested a review from AlekSi September 28, 2023 09:56
Copy link
Contributor

@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

@chilagrow chilagrow merged commit 3572f9b into FerretDB:main Sep 28, 2023
23 of 27 checks passed
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
Archived in project
Development

Successfully merging this pull request may close these issues.

Implement ListCollections, CreateCollection, and DropCollection
3 participants