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

Improve building with test coverage information #3059

Merged
merged 25 commits into from Aug 17, 2023

Conversation

durgakiran
Copy link
Contributor

@durgakiran durgakiran commented Jul 17, 2023

Description

Closes #2102.

Added new task to start ferretdb proxy server with coverage build. The coverage will be stored in directory GOCOVERDIR: covdatafiles at the root level.

env-ferretdb-build:
    desc: "Run ferretdb proxy"
    cmds:
      - rm -rf covdatafiles
      - mkdir covdatafiles
      - go build -cover -v  -o=bin/ferretdb{{exeExt}} -race=true -coverpkg=./... ./cmd/ferretdb
      - ./bin/ferretdb{{exeExt}} --log-level="warn"

Updated task test-integration-pg: so that it runs the test cases against ferretdb proxy server, and generates integration-pg.txt as it used to be. To generate I have used the command ./bin/ferretdb --append-coverage-meta to emit coverage data into given directory (GOCOVERDIR: covdatafiles) and then go tooling to generate text report.

Note: task security is failing, asking for some minor updates. But I didn't work on changing anything here.

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

@CLAassistant
Copy link

CLAassistant commented Jul 17, 2023

CLA assistant check
All committers have signed the CLA.

@AlekSi
Copy link
Member

AlekSi commented Jul 20, 2023

@durgakiran please click the CLA button in the message above

@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #3059 (4b2ae36) into main (f1f284e) will decrease coverage by 2.50%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3059      +/-   ##
==========================================
- Coverage   75.17%   72.67%   -2.50%     
==========================================
  Files         396      396              
  Lines       22210    22210              
==========================================
- Hits        16696    16142     -554     
- Misses       4526     5025     +499     
- Partials      988     1043      +55     
Files Changed Coverage Δ
build/version/version.go 67.64% <ø> (ø)

... and 57 files with indirect coverage changes

Flag Coverage Δ
hana ?
integration 68.74% <ø> (-2.77%) ⬇️
mongodb 5.30% <ø> (ø)
pg 60.43% <ø> (-4.79%) ⬇️
shard-1 56.67% <ø> (-0.03%) ⬇️
shard-2 29.97% <ø> (-24.15%) ⬇️
shard-3 55.28% <ø> (-0.20%) ⬇️
sqlite 37.37% <ø> (+2.02%) ⬆️
unit 24.68% <ø> (-0.05%) ⬇️

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

@durgakiran durgakiran marked this pull request as ready for review July 20, 2023 13:06
@durgakiran durgakiran requested review from AlekSi, ptrfarkas and a team as code owners July 20, 2023 13:06
cmd/ferretdb/main.go Outdated Show resolved Hide resolved
cmd/ferretdb/main.go Outdated Show resolved Hide resolved
build/version/version.go Outdated Show resolved Hide resolved
build/docker/development.Dockerfile Outdated Show resolved Hide resolved
build/docker/all-in-one.Dockerfile Outdated Show resolved Hide resolved
@durgakiran durgakiran requested a review from AlekSi July 20, 2023 14:22
build/docker/development.Dockerfile Outdated Show resolved Hide resolved
cmd/ferretdb/main.go Outdated Show resolved Hide resolved
Taskfile.yml Outdated Show resolved Hide resolved
Taskfile.yml Outdated Show resolved Hide resolved
Taskfile.yml Outdated Show resolved Hide resolved
@AlekSi AlekSi added the code/chore Code maintenance improvements label Jul 20, 2023
@AlekSi AlekSi added this to the Next milestone Jul 20, 2023
@chilagrow
Copy link
Contributor

chilagrow commented Jul 21, 2023

task security is failing, asking for some minor updates. But I didn't work on changing anything here.

Try using go1.20.6 version, that patch has fixed some vulnerabilities 🤗

$ go version
go version go1.20.6 linux/amd64

@AlekSi AlekSi added this to the Next milestone Jul 31, 2023
@AlekSi AlekSi modified the milestones: v1.8.0, Next Aug 14, 2023
@AlekSi AlekSi self-assigned this Aug 17, 2023
@AlekSi AlekSi added the not ready Issues that are not ready to be worked on; PRs that should skip CI label Aug 17, 2023
@AlekSi AlekSi changed the title 2102 update test coverage tool Improve building with test coverage information Aug 17, 2023
@AlekSi AlekSi removed the not ready Issues that are not ready to be worked on; PRs that should skip CI label Aug 17, 2023
@AlekSi AlekSi enabled auto-merge (squash) August 17, 2023 14:31
@AlekSi AlekSi requested review from a team, rumyantseva and noisersup and removed request for ptrfarkas August 17, 2023 14:32
AlekSi
AlekSi previously approved these changes Aug 17, 2023
Copy link
Member

@AlekSi AlekSi left a comment

Choose a reason for hiding this comment

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

I did some small final cleanups, the PR should be merged soon. Thank you!

@AlekSi AlekSi added trust PRs that can access Actions secrets not ready Issues that are not ready to be worked on; PRs that should skip CI packages PRs that should build packages labels Aug 17, 2023
@AlekSi AlekSi removed the not ready Issues that are not ready to be worked on; PRs that should skip CI label Aug 17, 2023
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!

@AlekSi AlekSi merged commit 39e53ed into FerretDB:main Aug 17, 2023
36 of 55 checks passed
yonarw pushed a commit to yonarw/FerretDB that referenced this pull request Aug 31, 2023
Closes FerretDB#2102.

Co-authored-by: Alexey Palazhchenko <alexey.palazhchenko@ferretdb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements packages PRs that should build packages trust PRs that can access Actions secrets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Improve building with test coverage information
5 participants