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

feat(orchestrator): create orchestrator package #43

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

tremarkley
Copy link
Contributor

@tremarkley tremarkley commented Jul 10, 2024

Closes #6

Creates the orchestrator package with the following properties:

  • no config or arguments are read in and orchestrator spins up a default configuration of chains
  • refactors supersim package to use orchestrator and moves all startup code for op-simulator and anvil into the orchestrator package

@tremarkley
Copy link
Contributor Author

tremarkley commented Jul 10, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @tremarkley and the rest of your teammates on Graphite Graphite

@tremarkley tremarkley force-pushed the harry/orchestrator branch 5 times, most recently from 72c019f to 42706a0 Compare July 10, 2024 21:05
@tremarkley tremarkley marked this pull request as ready for review July 10, 2024 21:07
@tremarkley tremarkley requested a review from a team as a code owner July 10, 2024 21:07
func (o *Orchestrator) WaitUntilReady() error {
var once sync.Once
var err error
ctx, cancel := context.WithCancel(context.Background())
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we should consider adding a timeout at all https://pkg.go.dev/context#WithTimeout

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nitaliano I think for now we dont need one since this is only waiting on anvil instances to be ready, and that wait function already has a timeout in it:

timeoutCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
. In the future it could be necessary if there are other services we need to wait on. I'll leave it out for now since we don't currently need it. Let me know if you think otherwise!

Copy link
Contributor

@nitaliano nitaliano left a comment

Choose a reason for hiding this comment

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

Good job! I'm starting to think you've been writing go longer than you're saying 😄

@tremarkley tremarkley force-pushed the harry/orchestrator branch 2 times, most recently from dcf29b3 to c33a48e Compare July 11, 2024 17:36
@tremarkley tremarkley merged commit 93d8c5b into main Jul 11, 2024
3 checks passed
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.

orchestrator: configuration & vanilla mode
2 participants