-
Notifications
You must be signed in to change notification settings - Fork 82
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 driver submission address to the autopilot #3065
base: main
Are you sure you want to change the base?
Conversation
faf5c2a
to
b52a744
Compare
b52a744
to
42bf53a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code to make things optional is pretty convoluted. Let's make it required from the start.
Would also be good to prepare the infra PR in the meantime.
ef21e9d
to
4910d52
Compare
4910d52
to
df34e7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add a manual step (to the tutorial for solver submission keys rotation in notion) to
- Update the infra configuration for autopilot
- To make sure the solver switched their submission to use new account
.await | ||
.with_context(|| { | ||
let msg = format!("Unable to load KMS account {:?}", key_id); | ||
tracing::error!(?name, msg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nit: maybe move out tracing::error
to the caller so that message formatting is cleaner
.await
.with_context(|| format!("Unable to load KMS account {:?}", key_id))?;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunce86 I thought of that, but then we need to have the same trace in two places in the code, potentially creating inconsistencies in the future (if one log is reformatted, etc).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this gets way better by introducing the error you suggested above 👌
f556294
to
02c199b
Compare
17886e0
to
e7dd8ab
Compare
e7dd8ab
to
e3a6f7a
Compare
Ok(driver) => Some(Arc::new(driver)), | ||
Err(_) => None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to introduce a new error when it is completely ignored on the caller's side? Either an Option should be returned or the error needs to be logged here instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Introducing an error is good for the function itself, that we don't use it now doesn't mean it won't be used. The logging is done within the function instead of the caller, mostly to avoid code repetition since this is instantiated in multiple times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that we don't use it now doesn't mean it won't be used.
IMO, then it should only be introduced then. Currently, it is redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. If we design a function that errors, then it has to emit an error. How the error is treated is responsibility of the caller.
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
1137f42
to
bbf1691
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just that this will cause issues with https://cowservices.slack.com/archives/C036JAGRQ04/p1732005732731009
@@ -372,6 +380,77 @@ impl std::fmt::Display for Arguments { | |||
} | |||
} | |||
|
|||
/// External solver driver configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: does it make sense to move this type into it's own arguments module?
@@ -372,6 +380,77 @@ impl std::fmt::Display for Arguments { | |||
} | |||
} | |||
|
|||
/// External solver driver configuration | |||
#[derive(Debug, Clone, PartialEq, Eq, Hash)] | |||
pub struct ExternalSolver { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming nit (there is no such thing as an internal solver anymore)
pub struct ExternalSolver { | |
pub struct Solver { |
.into_iter() | ||
.filter(|participant| { | ||
let submission_address = participant.driver().submission_address; | ||
let is_solution_from_driver = participant.solution().solver() == submission_address; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will cause issues in case copium wants to use multiple different solvers, cc @bram-vdberg
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
Description
This PR should solve: #3045 and #2780
Changes
/solve
to drivers which have been deny listedHow to test
Related Issues
Fixes #3045
Fixes #2780