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

Problem: go1.20 is not used #845

Merged
merged 13 commits into from
Feb 10, 2023
Merged

Problem: go1.20 is not used #845

merged 13 commits into from
Feb 10, 2023

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Feb 7, 2023

Closes: #844
Solution:

  • use go 1.20
  • update nixpkgs to master, and remove custom rocksdb expression in favor of builtin one.
  • setup go coverage support for integration test
  • don't upload the coverage reports yet due to a bug

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

Closes: crypto-org-chain#844
Solution:
- use go 1.20
- setup go coverage support for integration test
@yihuang yihuang requested a review from a team as a code owner February 7, 2023 02:21
@yihuang yihuang requested review from JayT106 and leejw51crypto and removed request for a team February 7, 2023 02:21
.github/workflows/test.yml Outdated Show resolved Hide resolved
default.nix Show resolved Hide resolved
@yihuang yihuang requested a review from mmsqe February 8, 2023 00:40
@yihuang
Copy link
Collaborator Author

yihuang commented Feb 8, 2023

$ go tool covdata textfmt -i=integration_tests/coverage -o profile.txt
error: error: reading counter data file integration_tests/coverage/covcounters.627546bfc793cab3f06764545dba1bd1.91113.1675846217322297000: error: short read on string table

I can reproduce this issue, maybe something wrong with this new golang feature.

@mmsqe
Copy link
Collaborator

mmsqe commented Feb 8, 2023

go tool covdata textfmt -i=integration_tests/coverage -o profile.txt

I thought it error on report on 1st time, since profile.txt is normal when I tried

integration_tests/coverage/
profile.txt

@yihuang
Copy link
Collaborator Author

yihuang commented Feb 8, 2023

I guess we should merge the nixpkgs and golang version upgrade first, then debugging the coverage thing, otherwise, the integration test workflow takes 2hours each time.

Copy link
Collaborator

@JayT106 JayT106 left a comment

Choose a reason for hiding this comment

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

LGTM, could you describe the purpose we change the nixpkgs from release version to the master? Thanks.

@yihuang
Copy link
Collaborator Author

yihuang commented Feb 8, 2023

LGTM, could you describe the purpose we change the nixpkgs from release version to the master? Thanks.

just for the go 1.20 which is only in the master branch, the coverage feature is only introduced in latest golang 1.20

@yihuang
Copy link
Collaborator Author

yihuang commented Feb 9, 2023

golang/go#58411
it's indeed a bug in golang runtime, so let's update golang version only, without using the -cover for now.

@yihuang yihuang enabled auto-merge (squash) February 9, 2023 00:50
auto-merge was automatically disabled February 9, 2023 04:04

Merge queue setting changed

@yihuang yihuang changed the title Problem: integration test code coverage is not reported Problem: go1.20 is not used Feb 9, 2023
auto-merge was automatically disabled February 9, 2023 10:47

Merge queue setting changed

@yihuang yihuang enabled auto-merge (squash) February 9, 2023 11:19
@yihuang yihuang disabled auto-merge February 9, 2023 20:34
@yihuang yihuang enabled auto-merge (squash) February 9, 2023 20:38
@yihuang yihuang merged commit 62aab4c into crypto-org-chain:main Feb 10, 2023
@yihuang yihuang deleted the go_1_20 branch February 10, 2023 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem: integration test code coverage is not reported
4 participants