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

Validate database names for SQLite handler #2924

Merged
merged 21 commits into from
Jun 30, 2023

Conversation

noisersup
Copy link
Member

@noisersup noisersup commented Jun 27, 2023

Description

Closes #2749.

[user@nixpc:~/FerretDB]$ task test-integration-sqlite TEST_RUN='TestDatabaseName'
task: [test-integration-sqlite] go test -count=1 -run='TestDatabaseName' -timeout=35m -race=true -tags=ferretdb_debug,ferretdb_tigris,ferretdb_hana -shuffle=on -coverpkg=../... -coverprofile=integration-sqlite.txt . -target-backend=ferretdb-sqlite -target-tls -compat-url='mongodb://username:password@127.0.0.1:47018/?tls=true&tlsCertificateKeyFile=../build/certs/client.pem&tlsCaFile=../build/certs/rootCA-cert.pem' -disable-filter-pushdown

ok      github.com/FerretDB/FerretDB/integration        0.820s  coverage: 40.0% of statements in ../...

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), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@noisersup noisersup self-assigned this Jun 27, 2023
@noisersup noisersup added code/chore Code maintenance improvements not ready Issues that are not ready to be worked on; PRs that should skip CI labels Jun 27, 2023
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #2924 (409396c) into main (e78942e) will decrease coverage by 3.88%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2924      +/-   ##
==========================================
- Coverage   63.97%   60.10%   -3.88%     
==========================================
  Files         451      451              
  Lines       24066    24070       +4     
==========================================
- Hits        15397    14468     -929     
- Misses       7708     8618     +910     
- Partials      961      984      +23     
Impacted Files Coverage Δ
internal/handlers/pg/pgdb/databases.go 69.07% <ø> (-3.10%) ⬇️
internal/handlers/sqlite/msg_create.go 0.00% <0.00%> (ø)

... and 39 files with indirect coverage changes

Flag Coverage Δ
integration 53.39% <0.00%> (-4.01%) ⬇️
mongodb 4.84% <0.00%> (-0.01%) ⬇️
pg 53.22% <0.00%> (-4.12%) ⬇️
shard-1 41.78% <0.00%> (-0.01%) ⬇️
shard-2 ?
shard-3 46.14% <0.00%> (+0.09%) ⬆️
unit 24.13% <0.00%> (-0.01%) ⬇️

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

@noisersup noisersup removed the not ready Issues that are not ready to be worked on; PRs that should skip CI label Jun 29, 2023
@noisersup noisersup marked this pull request as ready for review June 29, 2023 13:28
@noisersup noisersup requested a review from a team as a code owner June 29, 2023 13:28
@noisersup noisersup requested review from AlekSi and w84thesun June 29, 2023 13:28
@noisersup noisersup enabled auto-merge (squash) June 29, 2023 13:30
@noisersup noisersup requested review from a team, rumyantseva and chilagrow June 29, 2023 14:06
w84thesun
w84thesun previously approved these changes Jun 29, 2023
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

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Just few things 🤗

integration/basic_test.go Outdated Show resolved Hide resolved
integration/basic_test.go Show resolved Hide resolved
integration/basic_test.go Show resolved Hide resolved
internal/handlers/sqlite/msg_create.go Outdated Show resolved Hide resolved
@mergify
Copy link
Contributor

mergify bot commented Jun 30, 2023

@noisersup this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Jun 30, 2023
@noisersup noisersup requested review from chilagrow and w84thesun June 30, 2023 10:13
@mergify mergify bot removed the conflict PRs that have merge conflicts label Jun 30, 2023
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.

Please check TestDatabaseName/Empty - the error type needs to be changed.

@noisersup
Copy link
Member Author

Please check TestDatabaseName/Empty - the error type needs to be changed.

That's an accident after resolving merge conflicts, the Empty test should be removed.

@w84thesun w84thesun self-requested a review June 30, 2023 13:45
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
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.

Looks unified!

@AlekSi AlekSi added this to the Next milestone Jun 30, 2023
@noisersup noisersup merged commit 11a2389 into FerretDB:main Jun 30, 2023
@noisersup noisersup deleted the validate-db-2749 branch June 30, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Validate database and collection names
5 participants