-
Notifications
You must be signed in to change notification settings - Fork 42
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
(5/5) [nexus] Implement Affinity/Anti-Affinity Groups in external API #7447
base: affinity-instance-integration
Are you sure you want to change the base?
Conversation
.. | ||
} => { | ||
Err(Error::invalid_request( | ||
"when providing affinity_group as an ID project should not be specified", |
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: this reads like "(ID project) should not be specified", which is a bit nonsensical, so i think it should have a comma
"when providing affinity_group as an ID project should not be specified", | |
"when providing affinity_group as an ID, project should not be specified", |
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.
Yes, and unfortunately there are quite a few more: #7298
.. | ||
} => { | ||
Err(Error::invalid_request( | ||
"when providing anti_affinity_group as an ID project should not be specified", |
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.
"when providing anti_affinity_group as an ID project should not be specified", | |
"when providing anti_affinity_group as an ID, project should not be specified", |
self.db_datastore | ||
.affinity_group_update(opctx, &authz_group, updates.clone().into()) | ||
.await | ||
.map(|g| g.into()) |
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.
huh, can this not be
.map(|g| g.into()) | |
.map(Into::into) |
updates.clone().into(), | ||
) | ||
.await | ||
.map(|g| g.into()) |
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.
similarly, could be
.map(|g| g.into()) | |
.map(Into::into) |
right?
Pulled out of #7076
This PR is a partial implementation of RFD 522
It adds:
nexus/db-queries/src/db/datastore/sled.rs
, within (4/5) [nexus] Consider Affinity/Anti-Affinity Groups during instance placement #7446Fixes #1705