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

chore: add progress log into x/collection import-genesis #938

Merged
merged 3 commits into from
Mar 21, 2023

Conversation

0Tech
Copy link
Collaborator

@0Tech 0Tech commented Mar 17, 2023

Description

This patch would add progress logs into x/collection import.

For now, the import consists of few items in the following order:

  • contract
  • next class ids
  • classes
  • next token ids
  • balances
  • nfts
  • parents
  • authorizations
  • grants
  • statistics (burnt)
  • statistics (supply)

Hence, the log would be displayed in the same order.

Motivation and context

The x/collection genesis candidate is very huge, so it would be helpful to have progress reports.

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

@0Tech 0Tech self-assigned this Mar 17, 2023
@0Tech 0Tech changed the title chore: add progress log into x/collection import chore: add progress log into x/collection import-genesis Mar 17, 2023
@codecov
Copy link

codecov bot commented Mar 17, 2023

Codecov Report

Merging #938 (555f9d3) into main (aabe516) will increase coverage by 0.01%.
The diff coverage is 90.90%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #938      +/-   ##
==========================================
+ Coverage   62.36%   62.38%   +0.01%     
==========================================
  Files         655      655              
  Lines       79763    79818      +55     
==========================================
+ Hits        49745    49795      +50     
- Misses      27334    27338       +4     
- Partials     2684     2685       +1     
Impacted Files Coverage Δ
x/collection/keeper/genesis.go 95.98% <90.56%> (-1.07%) ⬇️
x/collection/keeper/keeper.go 100.00% <100.00%> (ø)

@0Tech 0Tech marked this pull request as ready for review March 17, 2023 10:09
dudong2
dudong2 previously approved these changes Mar 20, 2023
Copy link
Contributor

@dudong2 dudong2 left a comment

Choose a reason for hiding this comment

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

LGTM

@zemyblue
Copy link
Member

How is this progress printed?

@0Tech
Copy link
Collaborator Author

0Tech commented Mar 21, 2023

How is this progress printed?

...
2023/03/21-15:16:12.373 INF Starting import contract ... module=x/collection
2023/03/21-15:16:12.373 INF Progress: 33% module=x/collection
2023/03/21-15:16:12.373 INF Progress: 66% module=x/collection
2023/03/21-15:16:12.373 INF Done import contract module=x/collection
...

Copy link
Member

@zemyblue zemyblue left a comment

Choose a reason for hiding this comment

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

Please write to description all progress reporter type and the orders.

@0Tech 0Tech merged commit 7e85625 into Finschia:main Mar 21, 2023
@0Tech 0Tech deleted the collection-import-log branch March 21, 2023 07:50
zemyblue pushed a commit to zemyblue/finschia-sdk that referenced this pull request Mar 22, 2023
* Add log into x/collection import

* Update CHANGELOG.md

(cherry picked from commit 7e85625)
zemyblue added a commit that referenced this pull request Mar 22, 2023
zemyblue added a commit to zemyblue/finschia-sdk that referenced this pull request May 2, 2023
* main: (38 commits)
  chore(deps): Bump github.com/coinbase/rosetta-sdk-go from 0.8.2 to 0.8.3 (Finschia#976)
  chore(deps): Bump github.com/prometheus/client_golang from 1.14.0 to 1.15.0 (Finschia#967)
  chore(deps): Bump golang.org/x/crypto from 0.0.0-20200622213623-75b288015ac9 to 0.1.0 in /ics23/go (Finschia#972)
  chore(deps): Bump gaurav-nelson/github-action-markdown-link-check from 1.0.14 to 1.0.15 (Finschia#975)
  chore(deps): Bump DoozyX/clang-format-lint-action from 0.15 to 0.16 (Finschia#989)
  chore(deps): Bump actions/cache from 3.2.4 to 3.3.1 (Finschia#974)
  chore(deps): Bump golang.org/x/crypto from 0.7.0 to 0.8.0 (Finschia#958)
  chore(deps): Bump github.com/spf13/cobra from 1.6.1 to 1.7.0 (Finschia#949)
  chore(deps): Bump github.com/mattn/go-isatty from 0.0.17 to 0.0.18 (Finschia#941)
  chore(deps): Bump codecov/codecov-action from 3.1.1 to 3.1.3 (Finschia#985)
  chore(deps): Bump github.com/Finschia/ostracon from 1.0.10-0.20230417071658-1c9c22cfe90d to 1.1.0 (Finschia#987)
  chore: update url path in changelog
  chore(deps): Bump google.golang.org/protobuf from 1.28.1 to 1.30.0 (Finschia#935)
  chore(deps): Bump actions/cache from 3.2.6 to 3.3.1 (Finschia#928)
  chore: add progress log into x/collection import-genesis (Finschia#938)
  chore(deps): Bump github.com/line/ostracon from 1.0.9-0.20230209043112-5aca894db3a6 to 1.0.9 (Finschia#939)
  chore: clean up x/foundation api (Finschia#933)
  chore(deps): Bump actions/setup-go from 3.5.0 to 4.0.0 (Finschia#931)
  chore(deps): Bump github.com/golang/protobuf from 1.5.2 to 1.5.3 (Finschia#926)
  chore(deps): Bump golang.org/x/crypto from 0.0.0-20200622213623-75b288015ac9 to 0.1.0 in /ics23/go (Finschia#916)
  ...

# Conflicts:
#	CHANGELOG.md
#	go.mod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants