Skip to content

Commit

Permalink
Rebase + address review comments, still waiting for newtype-uuid v1
Browse files Browse the repository at this point in the history
Created using spr 1.3.5
  • Loading branch information
sunshowers committed Feb 5, 2024
2 parents f344e25 + ddd0367 commit b0a57e4
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/hakari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
toolchain: stable
- name: Install cargo-hakari
uses: taiki-e/install-action@af393be830303534bd94d7b3249fb7ed7792e7ad # v2
uses: taiki-e/install-action@e17a4e247d4a36441181d7758c499d97e1e006bd # v2
with:
tool: cargo-hakari
- name: Check workspace-hack Cargo.toml is up-to-date
Expand Down
60 changes: 30 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ gateway-sp-comms = { git = "https://github.com/oxidecomputer/management-gateway-
gateway-test-utils = { path = "gateway-test-utils" }
gethostname = "0.4.3"
glob = "0.3.1"
guppy = "0.17.4"
guppy = "0.17.5"
headers = "0.3.9"
heck = "0.4"
hex = "0.4.3"
Expand Down Expand Up @@ -345,7 +345,7 @@ serde_json = "1.0.113"
serde_path_to_error = "0.1.15"
serde_tokenstream = "0.2"
serde_urlencoded = "0.7.1"
serde_with = "3.5.1"
serde_with = "3.6.0"
sha2 = "0.10.8"
sha3 = "0.10.8"
shell-words = "1.1.0"
Expand Down Expand Up @@ -390,7 +390,7 @@ textwrap = "0.16.0"
test-strategy = "0.3.1"
thiserror = "1.0"
tofino = { git = "http://github.com/oxidecomputer/tofino", branch = "main" }
tokio = "1.35.1"
tokio = "1.36.0"
tokio-postgres = { version = "0.7", features = [ "with-chrono-0_4", "with-uuid-1" ] }
tokio-stream = "0.1.14"
tokio-tungstenite = "0.20"
Expand Down
7 changes: 4 additions & 3 deletions bootstore/src/schemes/v0/peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::trust_quorum::RackSecret;
use camino::Utf8PathBuf;
use derive_more::From;
use sled_hardware::Baseboard;
use slog::{debug, error, info, o, warn, Logger};
use slog::{error, info, o, warn, Logger};
use std::collections::{BTreeMap, BTreeSet};
use std::net::{SocketAddr, SocketAddrV6};
use std::time::Duration;
Expand Down Expand Up @@ -647,7 +647,7 @@ impl Node {
.iter()
.filter(|(id, _)| Some(*id) != excluded_peer)
{
debug!(
info!(
self.log,
"Sending network config with generation {} to {id}",
network_config.generation
Expand Down Expand Up @@ -684,7 +684,7 @@ impl Node {
if let Some(conn_handle) =
self.established_connections.get(&envelope.to)
{
debug!(
info!(
self.log,
"Sending {:?} to {}", envelope.msg, envelope.to
);
Expand Down Expand Up @@ -924,6 +924,7 @@ impl Node {
self.fsm.on_disconnected(&peer_id);
}
ConnToMainMsgInner::Received { from, msg } => {
info!(self.log, "Received {msg:?} from {from}");
match self.fsm.handle_msg(Instant::now().into(), from, msg) {
Ok(None) => (),
Ok(Some(api_output)) => {
Expand Down
1 change: 0 additions & 1 deletion clients/ddm-admin-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ impl Client {
interfaces: &'a [BootstrapInterface],
) -> Result<impl Iterator<Item = Ipv6Addr> + 'a, DdmError> {
let prefixes = self.inner.get_prefixes().await?.into_inner();
info!(self.log, "Received prefixes from ddmd"; "prefixes" => ?prefixes);
Ok(prefixes.into_iter().flat_map(|(_, prefixes)| {
prefixes.into_iter().flat_map(|prefix| {
let mut segments = prefix.destination.addr.segments();
Expand Down
24 changes: 2 additions & 22 deletions nexus/authz-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ impl<'de> serde::Deserialize<'de> for InputPrimaryKeyType {
{
let mut elements = vec![];
while let Some(element) =
seq.next_element::<InputPrimaryKeyType>()?
seq.next_element::<ParseWrapper<syn::Type>>()?
{
elements.push(element.0.into_external());
elements.push(element.into_inner());
}
Ok(PrimaryKeyType::Standard(parse_quote!((#(#elements,)*))))
}
Expand Down Expand Up @@ -251,26 +251,6 @@ impl<'de> serde::Deserialize<'de> for InputPrimaryKeyType {
}
}

// impl syn::parse::Parse for PrimaryKey {
// fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
// let lookahead = input.lookahead1();
// // If the first element is a {, then this must be a uuid_kind.
// if lookahead.peek(syn::token::Brace) {
// let content;
// syn::braced!(content in input);
// // Once we have the content, we can parse it as a uuid_kind.
// let parsed = serde_tokenstream::from_tokenstream::<ParsedUuidKind>(
// &content.cursor().token_stream(),
// )?;
// let kind_param = parsed.uuid_kind.into_inner();
// let full_ty = parse_quote!(::newtype_uuid::TypedUuid::<::omicron_uuid_kinds::#kind_param>);
// Ok(Self::UuidKind { full_ty })
// } else {
// Ok(Self::Standard(input.parse()?))
// }
// }
// }

/// How to generate the Polar snippet for this resource
#[derive(serde::Deserialize, Debug)]
enum PolarSnippet {
Expand Down
1 change: 0 additions & 1 deletion nexus/db-queries/src/authz/api_resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,6 @@ authz_resource! {
authz_resource! {
name = "LoopbackAddress",
parent = "Fleet",
// TODO: make it easier to specify the typed UUID kind
primary_key = { uuid_kind = LoopbackAddressKind },
roles_allowed = false,
polar_snippet = FleetChild,
Expand Down
4 changes: 2 additions & 2 deletions tools/console_version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
COMMIT="5bee1f5b468b17b579a0dc0c5aee6a3056146b79"
SHA2="66e73112327db5f80e32d6865cf150320ae508985cef421459107713287ed4b8"
COMMIT="e5a1f804faa913de3be5b4cddac2011247a99774"
SHA2="54ff1026062fc1a3f0de86aa558d051b8ad6248d458c1767b9e926f2606e75f5"
Loading

0 comments on commit b0a57e4

Please sign in to comment.