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

Fixes some build issues when importing flow-go as a dependency #1333

Merged
merged 7 commits into from Sep 23, 2021

Conversation

jordanschalm
Copy link
Member

This fixes 2 build issues when using flow-go as a dependency.

  1. The dkg controller factory mock did not have a relic build tag set, but made use of a relic-tagged interface. Solution: Move the interface to a non-relic-tagged file.
../flow-go/module/mock/dkg_controller_factory.go:18:108: undefined: module.DKGController
../flow-go/module/mock/dkg_controller_factory.go:21:9: undefined: module.DKGController
../flow-go/module/mock/dkg_controller_factory.go:22:67: undefined: module.DKGController
../flow-go/module/mock/dkg_controller_factory.go:26:21: undefined: module.DKGController
  1. The networking layer imported a function which did not exist in the crypto version pinned by flow-go. For local development this worked, because we replace with the local crypto module, but failed when used as a dependency.
../flow-go/network/p2p/keyutils/keyTranslator.go:169:14: undefined: "github.com/onflow/flow-go/crypto".DecodePublicKeyCompressed

Copy link
Contributor

@m4ksio m4ksio left a comment

Choose a reason for hiding this comment

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

Thanks!

@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2021

Codecov Report

Merging #1333 (29e24ab) into master (be99790) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1333      +/-   ##
==========================================
+ Coverage   56.25%   56.29%   +0.03%     
==========================================
  Files         500      500              
  Lines       31140    31140              
==========================================
+ Hits        17518    17529      +11     
+ Misses      11253    11242      -11     
  Partials     2369     2369              
Flag Coverage Δ
unittests 56.29% <ø> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
engine/collection/synchronization/engine.go 63.97% <0.00%> (+1.07%) ⬆️
admin/command_runner.go 80.00% <0.00%> (+1.48%) ⬆️
...ngine/common/synchronization/finalized_snapshot.go 72.91% <0.00%> (+4.16%) ⬆️
...sus/approvals/assignment_collector_statemachine.go 47.11% <0.00%> (+4.80%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be99790...29e24ab. Read the comment docs.

Copy link
Contributor

@peterargue peterargue left a comment

Choose a reason for hiding this comment

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

💯

Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

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

Of course. I wonder if we can test the crypto-version pin desync in CI. @tarakby, would you have any idea?

@jordanschalm
Copy link
Member Author

bors merge

bors bot added a commit that referenced this pull request Sep 22, 2021
1333: Fixes some build issues when importing `flow-go` as a dependency r=jordanschalm a=jordanschalm

This fixes 2 build issues when using `flow-go` as a dependency.

1. The dkg controller factory mock did not have a relic build tag set, but made use of a relic-tagged interface. Solution: Move the interface to a non-relic-tagged file.
```
../flow-go/module/mock/dkg_controller_factory.go:18:108: undefined: module.DKGController
../flow-go/module/mock/dkg_controller_factory.go:21:9: undefined: module.DKGController
../flow-go/module/mock/dkg_controller_factory.go:22:67: undefined: module.DKGController
../flow-go/module/mock/dkg_controller_factory.go:26:21: undefined: module.DKGController
```
2. The networking layer imported a function which did not exist in the `crypto` version pinned by `flow-go`. For local development this worked, because we replace with the local `crypto` module, but failed when used as a dependency.
```
../flow-go/network/p2p/keyutils/keyTranslator.go:169:14: undefined: "github.com/onflow/flow-go/crypto".DecodePublicKeyCompressed
```

Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
@bors
Copy link
Contributor

bors bot commented Sep 22, 2021

Canceled.

@m4ksio
Copy link
Contributor

m4ksio commented Sep 23, 2021

Hmmm, I just tried to run DPS with this branch as a dependency and got

/home/m4ksio/go/pkg/mod/github.com/onflow/flow-go@v0.21.1-0.20210923005303-29e24ab80b89/model/convert/service_event.go:339:16: undefined: signature.NewAggregationProvider

@m4ksio m4ksio merged commit bef5863 into master Sep 23, 2021
@m4ksio m4ksio deleted the jordan/hf/dkg-controller-factor-build branch September 23, 2021 03:46
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.

None yet

6 participants