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

HAL-08 use of deprecated functions #3242

Open
juniuszhou opened this issue Sep 15, 2022 · 3 comments
Open

HAL-08 use of deprecated functions #3242

juniuszhou opened this issue Sep 15, 2022 · 3 comments
Assignees
Labels
Peggy Team Peggy team task

Comments

@juniuszhou
Copy link
Contributor

juniuszhou commented Sep 15, 2022

Description

Deprecated Go functions were identified in the codebase. The function(s)
are:
• grpc.WithInsecure
• package ioutil

Code Location:

Listing 14: Uses of deprecated function grpc.WithInsecure
1 355: gRpcClientConn , err := grpc . Dial (sub . SifnodeGrpc , grpc . ë WithInsecure () )
23 cmd / ebrelayer / relayer / ethereum .go
4 477: conn , err := grpc . Dial ( sub . SifnodeGrpc , grpc . WithInsecure
ë () )
56 cmd / ebrelayer / relayer / prophecyHandler .go
7 160: conn , err := grpc . Dial ( sifnodeGrpc , grpc . WithInsecure () )
Listing 15: Uses of deprecated package ioutil
1 x/ dispensation / utils / parser .go
2 26: input , err := ioutil . ReadFile ( file ) 3 44: o, err := ioutil . ReadFile ( file ) 45 x/clp / client /cli /tx.go
6 70: input , err := ioutil . ReadFile ( file ) 7 421: input , err := ioutil . ReadFile ( file ) 8 436: input , err = ioutil . ReadFile ( file ) 9 725: input , err := ioutil . ReadFile ( file )
10
11 x/clp / test / test_common .go
12 306: input , err := ioutil . ReadFile ( file )
14 x/ tokenregistry / utils / parse_denom_list .go
15 18: o, err := ioutil . ReadFile ( file )
16
17 scripts / ibc / tokenregistration / main .go
18 65: input , err := ioutil . ReadFile ( file )
19
20 x/ ethbridge / client /cli /tx.go
21 422: contents , err := ioutil . ReadFile ( file )
22
23 tools / sifgen / genesis / genesis .go
24 134: body , err := ioutil . ReadFile ( genesisPath )
25
26 cmd / ebrelayer / internal / symbol_translator / symbol_translator .go
27 28: contents , err := ioutil . ReadFile ( filename )
28
29 tools / sifgen / node / node .go
30 373: content , err := ioutil . ReadFile (n. CLI . ConfigFilePath () )
31 388: content , err := ioutil . ReadFile (n. CLI . AppFilePath () )
32
33 tools / sifgen / network / network .go
34 36: data , err := ioutil . ReadFile (fmt . Sprintf ("%s/%s. yml ", ë networkDir , file ) )
35 355: content , err := ioutil . ReadFile ( configFile )
36 388: input , err := ioutil . ReadFile ( srcFile )

Recommendation

Replace deprecated functions with up-to-date functions.
The packages io or os can be used in place of ioutil.
Consider using the following implementation instead of grpc.WithInsecure():

@juniuszhou juniuszhou self-assigned this Sep 15, 2022
@juniuszhou
Copy link
Contributor Author

juniuszhou commented Sep 17, 2022

  1. For ioutil package, use same method in io and os package to replace functions in ioutil.
  2. Current grpc version doesn't support WithInsecure parameter.
    remove ioutils #3243 merged.

@juniuszhou juniuszhou changed the title remove deprecated ioutils package HAL-08 use of deprecated functions Sep 18, 2022
@juniuszhou juniuszhou added Peggy Team Peggy team task and removed Epic labels Sep 18, 2022
@juniuszhou juniuszhou reopened this Sep 18, 2022
@juniuszhou
Copy link
Contributor Author

reopen and wait for one more team mate confirm it.

@juniuszhou juniuszhou pinned this issue Sep 29, 2022
@juniuszhou juniuszhou assigned Brando753 and smartyalgo and unassigned juniuszhou Sep 29, 2022
@juniuszhou
Copy link
Contributor Author

We can use the grpc.WithInsecure after grpc upgraded. Now we can close the issue if @smartyalgo or @Brando753 agree on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Peggy Team Peggy team task
Projects
None yet
Development

No branches or pull requests

3 participants