-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add OnStart callback for emulator start #566
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #566 +/- ##
==========================================
+ Coverage 52.62% 53.30% +0.68%
==========================================
Files 29 29
Lines 3795 3876 +81
==========================================
+ Hits 1997 2066 +69
- Misses 1646 1652 +6
- Partials 152 158 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Nice! What is the |
@turbolent we need a way to still release non v1 features now that everything has been merged to master. I cut this branch off of the v0.59.0 commit, so have the ability to do more releases like v0.60.0 if we need a change in the meantime. This means we'll have to cherry pick everything we do over here into a PR for the master branch as well. Don't foresee many changes though. |
Sounds good! 👍 There's a discussion about having such a branch in #564, maybe good to coordinate and document it, so we don't end up with multiple different ones |
Thanks for the heads up @turbolent . Left a comment on there. |
@chasefleming is this works? afaik start call is blocking (library we used there, graceland is blocking actually) I think emulator should start after the start call anyway, what was the issue there? Is there something creating delay ? |
@bluesign you're right. I need to rethink my approach. Moving this to a draft PR. Sorry, what do you mean by "start after start call." If |
@chasefleming who is the caller here? who is starting emulator I mean. I think if you call Listen before Start, emulator should be ready anyway, OS will make socket wait till it is handled. |
@bluesign In one use case, the CLI is the caller. I tried this, but unless I put a sleep to delay it the following code fails because it's not actually ready: err := emulatorServer.Listen()
if err != nil {
// TODO: handle error
}
go func() {
emulatorServer.Start()
}()
fmt.Println("Emulator server is ready") Any ideas or see anything I'm doing wrong? |
This is addressed by this: onflow/flow-go-sdk#578 |
Closes #565
For contributor use:
master
branchFiles changed
in the GitHub PR explorer