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

[Testing] Bump golangci-lint action from v2 to v3 #2956

Merged
merged 5 commits into from
Aug 10, 2022

Conversation

fxamacker
Copy link
Member

@fxamacker fxamacker commented Aug 10, 2022

Changes

  • bump golangci-lint action from v2 to v3
  • bump golangci-lint from 1.45 to 1.46

This fix is based on changes in a branch by @durkmurder. Many thanks Yurii!

This unblocks several PRs including PR 2930.

Caveats

Unfortunately, golangci-lint 1.47 and 1.48 didn't work. There were lint errors reported on lines untouched for 2 years, etc.

@fxamacker fxamacker marked this pull request as draft August 10, 2022 14:12
@fxamacker fxamacker changed the title Bump golangci-lint from 1.45 to 1.48 Bump golangci-lint action from v2 to v3 Aug 10, 2022
@fxamacker fxamacker marked this pull request as ready for review August 10, 2022 15:34
@fxamacker fxamacker merged commit a98498f into master Aug 10, 2022
@fxamacker fxamacker deleted the fxamacker/fix-linter-errors branch August 10, 2022 16:30
zhangchiqing added a commit that referenced this pull request Aug 10, 2022
* add dry-run option for collection rate limiting

* debug log when rate-limiting

* adds option to disable pool

* additional delay in close

* remove todo

* test execution without conn pool

* not request pending ancestors

* assign random ports to observers

* fixed exposed ports

* Resolve circular dependency

Moved common/encoding/encoding.go from encoding package to ledger
package.

Split common/utils/testutils.go into two files.  Common utility
functions are in common/utils/utils.go.  Common test utility functions
such as creating fixtures are in common/testutils/testutils.go.

This is needed for an upcoming commit that needs to use encoded key
in Payload (which requires encoding functions).

* Stop type casting meter before setting weights / limits

* dedup get execution weights

* Apply suggestions from code review

Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>

* Make ledger.Payload fields unexported

ledger.Payload is immutable value object with key and value fields.

This commit is needed by upcoming commit that will use encoded
payload key in the key field.

* default to disable conn pool

* Fix Compactor flaky test when GitHub CI is slow

* Fix Compactor flaky test when GitHub CI is slow

* update invalidation logic

* lint fix

* Replace decoded payload key with encoded key buf

Reduce data held in RAM by dozens of GB, reduce allocs,
and improve speed of: ledger update, checkpoint serialization,
and rebuilding Mtrie at startup by:
- keeping mtrie leaf node's payload key encoded in memory
- using encoded key directly while serializing checkpoint/WAL/TrieProof
- using encoded key directly while deserializing checkpoint/WAL/TrieProof

Benchmark is only for TrieUpdate.  Other improvements are not
benchmarked yet.

name          old time/op    new time/op    delta
TrieUpdate-4     439ms ± 2%     409ms ± 1%   -6.94%  (p=0.000 n=18+20)

name          old alloc/op   new alloc/op   delta
TrieUpdate-4    73.5MB ± 0%    34.1MB ± 0%  -53.60%  (p=0.000 n=20+20)

name          old allocs/op  new allocs/op  delta
TrieUpdate-4      187k ± 0%      147k ± 0%  -21.44%  (p=0.000 n=20+20)

* set hotstuff view

* add comment

* Apply suggestions from code review

Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>

* Apply suggestions from code review

Co-authored-by: Yurii Oleksyshyn <yuraolex@gmail.com>

* update reader & setter

* remove unused method

* fix linting

* bump up mockery version to 2.13.1

* remove pool size 0 warning

* Add comment for error

* Fix test

* default pool size to 250

* Simplify meter limits control

We never switch on/off the limits independently.

* Fix tests

* use default variable

* [Go] Bump test client go version to 1.18

* Add custom JSON and CBOR encoding for Payload

ledger.Payload's fields are unexported, so custom JSON and CBOR
encoding/decoding are needed.

* [Makefile] add support for go1.20+

* Also update the README

* Fix lint error

* Add tests for ledger.Payload for JSON & CBOR

* Add comment for ledger.Payload

* use closer

* clean up invaldiation logic

* Rename EnvContext to Tracer + Reduce dependency on Context

1. Renamed EnvContext to Tracer
2. Stop passing Context into program logger / tracer / rand gen.  Only pass
   in what's necessary.

* Don't pollute global program caches with non-address programs

It's not safe to populate non-address programs into the program cache once we
start doing parallel pre-processing since these programs are not reusable.
We'll keep track of these programs within the local environment instead.

NOTE: we'll also need to eventually keep track of addressed program locally as
well in order to invalidate outdated programs.

* switched testing.T and context.Context parameter

* [Testing] Crash Test implementation (#2941)

* use mock closer

* add tests for noop closer

* Bump golangci-lint action from v2 to v3 (#2956)

* Bump golangci-lint actions from v2 to v3
* Bump golangci-lint from 1.45 to 1.46

Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
Co-authored-by: lolpuddle <oocean.cheung@gmail.com>
Co-authored-by: danielholmes839 <daniel.holmes@dapperlabs.com>
Co-authored-by: Daniel Holmes <43529937+danielholmes839@users.noreply.github.com>
Co-authored-by: Faye Amacker <33205765+fxamacker@users.noreply.github.com>
Co-authored-by: Patrick Lee <patrick.lee@dapperlabs.com>
Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Co-authored-by: Yurii Oleksyshyn <yuraolex@gmail.com>
Co-authored-by: Alexey Ivanov <rbtz@dapperlabs.com>
Co-authored-by: Misha <misha.rybalov@dapperlabs.com>
@fxamacker fxamacker self-assigned this Aug 10, 2022
@fxamacker fxamacker changed the title Bump golangci-lint action from v2 to v3 [Testing] Bump golangci-lint action from v2 to v3 Aug 10, 2022
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.

4 participants