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

Cleanup shotover::Runner api #1103

Merged
merged 4 commits into from Apr 3, 2023
Merged

Conversation

rukai
Copy link
Member

@rukai rukai commented Mar 28, 2023

To give custom transform users a nicer setup process.

List of changes:

  • User no longer has to provide ConfigOpts
  • The user no longer has to manually set with_observability_interface, this method was originally added as a hack for specific integration tests but that hack is no longer needed so the function can just be removed and the observability interface always enabled.
  • Runner::new() now internally performs the backup tracing reporter logic that was previously in shotover-proxy/src/main.rs
  • run_block now returns !
  • Runner renamed to Shotover as from the users perspective that type is shotover.

We could have just done a single run_shotover() method but Shotover::new().run_block() adds barely any more complication and gives us room to expand without breaking changes in the future.

@rukai rukai force-pushed the cleanup_shotover_runner_api branch 2 times, most recently from 6ae50bd to 3c8d969 Compare March 28, 2023 04:37
Copy link
Member

@conorbros conorbros left a comment

Choose a reason for hiding this comment

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

LGTM. Just that one comment

@rukai rukai force-pushed the cleanup_shotover_runner_api branch from 7346268 to 19e8b04 Compare March 29, 2023 07:02
Copy link
Member

@benbromhead benbromhead left a comment

Choose a reason for hiding this comment

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

As this is a clean up for an external consumer of the api, do you want to add some doc strings to run_block?

@rukai rukai force-pushed the cleanup_shotover_runner_api branch from d28d654 to 292d95a Compare April 3, 2023 04:00
@rukai rukai enabled auto-merge (squash) April 3, 2023 06:04
@rukai rukai merged commit 6c7388a into shotover:main Apr 3, 2023
9 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.

None yet

3 participants