Skip to content

Commit

Permalink
Removed prod feature from orb-attest
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah committed Apr 5, 2024
1 parent 41aa72f commit 6701c81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 0 additions & 4 deletions orb-attest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ serial_test = "2.0"
tempfile = "3.3"
wiremock = "0.5"

[features]
default = []
prod = [] # use prod backend

[package.metadata.deb]
maintainer-scripts = "debian/"
systemd-units = [
Expand Down
11 changes: 2 additions & 9 deletions orb-attest/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::env;

use eyre;
use eyre::{self, bail};
use tracing::warn;

const ORB_BACKEND_ENV_VAR_NAME: &str = "ORB_BACKEND";
Expand Down Expand Up @@ -38,10 +38,7 @@ pub enum Backend {
Staging,
}

#[cfg(feature = "prod")]
const DEFAULT_BACKEND: Backend = Backend::Prod;
#[cfg(not(feature = "prod"))]
const DEFAULT_BACKEND: Backend = Backend::Staging;

impl Default for Backend {
fn default() -> Self {
Expand All @@ -63,11 +60,7 @@ impl Backend {
"prod" => Ok(Backend::Prod),
"stage" | "dev" => Ok(Backend::Staging),
_ => {
warn!(
"{ORB_BACKEND_ENV_VAR_NAME} is set to an unexpected value {v}, falling back \
to default {DEFAULT_BACKEND:?}"
);
eyre::bail!("invalid backend");
bail!("unknown value for backend");
}
}
}
Expand Down

0 comments on commit 6701c81

Please sign in to comment.