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

External solver support in e2e tests #2515

Merged

Conversation

devanoneth
Copy link
Contributor

Description

A new function start_protocol_external_solver is created which allows e2e tests to easily setup the protocol with an external solver that uses the new solver API.

Changes

  • Add a start_protocol_external_solver function
  • Add a run_baseline flag to the start_protocol functions that use external solvers, which if set to true will also run a baseline solver alongside the external solver.

How to test

  • CI will run, but as I'm not a contributor, forked tests can't run until merge. I've run them locally and they pass.
  • Enso CI tests run and pass against this commit hash.

@devanoneth devanoneth requested a review from a team as a code owner March 14, 2024 03:30
@squadgazzz
Copy link
Contributor

LG. However, can't currently approve it since the forked node tests fail locally for some reason(even on the main branch).

@devanoneth
Copy link
Contributor Author

LG. However, can't currently approve it since the forked node tests fail locally for some reason(even on the main branch).

Thanks! Forked node tests are working locally for me on the latest commit on my branch (just merged main in).

Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Code looks correct although a bit sketchy.
I think eventually we need to find a way to configure these CLI arguments more reasonably but this is probably a bigger endeavor.

@@ -193,13 +193,15 @@ impl<'a> Services<'a> {
}

/// Starts a basic version of the protocol with a single legacy solver and
/// quoter.
/// quoter. Optionally starts a baseline solver and uses it for price
/// estimation.
pub async fn start_protocol_legacy_solver(
Copy link
Contributor

Choose a reason for hiding this comment

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

This function is not used in our code base. Given that we are transitioning towards dropping the legacy API are you still using this function?
If not we should just delete it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, thanks! We don't need it anymore. Deleted in my new commit.

@devanoneth
Copy link
Contributor Author

I think eventually we need to find a way to configure these CLI arguments more reasonably but this is probably a bigger endeavor.

I agree, there's too much string manipulation for my liking. I think something along the lines of a builder pattern to scaffold the arguments to the services would be best. Do you have some other ideas? If so, I'd be happy to do it in a follow-up PR.

@MartinquaXD MartinquaXD enabled auto-merge (squash) March 27, 2024 17:53
@MartinquaXD MartinquaXD merged commit 36ceefc into cowprotocol:main Mar 27, 2024
8 of 9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2024
@devanoneth devanoneth deleted the feat/external-solver-e2e-new-api branch March 27, 2024 18:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants