Skip to content
Permalink
Browse files

Auto merge of #421 - pietroalbini:remove-automatic-blacklist, r=pietr…

…oalbini

Remove automatic blacklist

The automatic blacklist was added a while back and it included all crates that consistently failed for multiple past runs. It hasn't been updated since then and maintaining it is a pain. Also we're losing coverage since the crates in the blacklist might be fixed in the future.

This removes all the automatic entries from the blacklist.
  • Loading branch information...
bors committed Jun 6, 2019
2 parents 12324af + 5cd746c commit d5ce1dcfd8b2be7fbc3fad451ca3433a47e0fe79
Showing with 27 additions and 13,601 deletions.
  1. +0 −13,580 config.toml
  2. +1 −1 src/db/migrations.rs
  3. +8 −5 src/db/mod.rs
  4. +8 −5 src/logs/mod.rs
  5. +3 −3 src/report/s3.rs
  6. +1 −1 src/server/agents.rs
  7. +1 −1 src/server/routes/ui/experiments.rs
  8. +1 −1 src/tools/mod.rs
  9. +3 −3 src/utils/hex.rs
  10. +1 −1 src/utils/mod.rs
13,580 config.toml

Large diffs are not rendered by default.

@@ -10,7 +10,7 @@ fn no_args() -> impl Iterator<Item = &'static str> {

enum MigrationKind {
SQL(&'static str),
Code(Box<Fn(&Transaction) -> ::rusqlite::Result<()>>),
Code(Box<dyn Fn(&Transaction) -> ::rusqlite::Result<()>>),
}

fn migrations() -> Vec<(&'static str, MigrationKind)> {
@@ -18,7 +18,10 @@ struct ConnectionCustomizer;

impl CustomizeConnection<Connection, ::rusqlite::Error> for ConnectionCustomizer {
fn on_acquire(&self, conn: &mut Connection) -> Result<(), ::rusqlite::Error> {
conn.execute("PRAGMA foreign_keys = ON;", ::std::iter::empty::<&ToSql>())?;
conn.execute(
"PRAGMA foreign_keys = ON;",
::std::iter::empty::<&dyn ToSql>(),
)?;
Ok(())
}
}
@@ -118,7 +121,7 @@ impl<'a> TransactionHandle<'a> {
pub trait QueryUtils {
fn with_conn<T, F: FnOnce(&Connection) -> Fallible<T>>(&self, f: F) -> Fallible<T>;

fn exists(&self, sql: &str, params: &[&ToSql]) -> Fallible<bool> {
fn exists(&self, sql: &str, params: &[&dyn ToSql]) -> Fallible<bool> {
self.with_conn(|conn| {
self.trace(sql, || {
let mut prepared = conn.prepare(sql)?;
@@ -127,7 +130,7 @@ pub trait QueryUtils {
})
}

fn execute(&self, sql: &str, params: &[&ToSql]) -> Fallible<usize> {
fn execute(&self, sql: &str, params: &[&dyn ToSql]) -> Fallible<usize> {
self.with_conn(|conn| {
self.trace(sql, || {
let mut prepared = conn.prepare(sql)?;
@@ -140,7 +143,7 @@ pub trait QueryUtils {
fn get_row<T, F: FnMut(&Row) -> T>(
&self,
sql: &str,
params: &[&ToSql],
params: &[&dyn ToSql],
func: F,
) -> Fallible<Option<T>> {
self.with_conn(|conn| {
@@ -160,7 +163,7 @@ pub trait QueryUtils {
fn query<T, F: FnMut(&Row) -> T>(
&self,
sql: &str,
params: &[&ToSql],
params: &[&dyn ToSql],
func: F,
) -> Fallible<Vec<T>> {
self.with_conn(|conn| {
@@ -10,20 +10,23 @@ pub use self::storage::LogStorage;
static INIT_LOGS: Once = Once::new();

thread_local! {
static SCOPED: RefCell<Vec<Box<Log>>> = RefCell::new(Vec::new());
static SCOPED: RefCell<Vec<Box<dyn Log>>> = RefCell::new(Vec::new());
}

struct MultiLogger {
global: Vec<Box<Log>>,
scoped: &'static LocalKey<RefCell<Vec<Box<Log>>>>,
global: Vec<Box<dyn Log>>,
scoped: &'static LocalKey<RefCell<Vec<Box<dyn Log>>>>,
}

impl MultiLogger {
fn new(global: Vec<Box<Log>>, scoped: &'static LocalKey<RefCell<Vec<Box<Log>>>>) -> Self {
fn new(
global: Vec<Box<dyn Log>>,
scoped: &'static LocalKey<RefCell<Vec<Box<dyn Log>>>>,
) -> Self {
MultiLogger { global, scoped }
}

fn each<F: FnMut(&Log)>(&self, mut f: F) {
fn each<F: FnMut(&dyn Log)>(&self, mut f: F) {
for logger in &self.global {
f(logger.as_ref());
}
@@ -60,10 +60,10 @@ impl FromStr for S3Prefix {

pub struct S3Writer {
prefix: S3Prefix,
client: Box<S3>,
client: Box<dyn S3>,
}

pub fn get_client_for_bucket(bucket: &str) -> Fallible<Box<S3>> {
pub fn get_client_for_bucket(bucket: &str) -> Fallible<Box<dyn S3>> {
let make_client = |region| -> Fallible<S3Client> {
let credentials = DefaultCredentialsProvider::new().unwrap();
Ok(S3Client::new_with(HttpClient::new()?, credentials, region))
@@ -87,7 +87,7 @@ pub fn get_client_for_bucket(bucket: &str) -> Fallible<Box<S3>> {
const S3RETRIES: u64 = 4;

impl S3Writer {
pub fn create(client: Box<S3>, prefix: S3Prefix) -> Fallible<S3Writer> {
pub fn create(client: Box<dyn S3>, prefix: S3Prefix) -> Fallible<S3Writer> {
Ok(S3Writer { prefix, client })
}
}
@@ -75,7 +75,7 @@ impl Agents {
fn synchronize(&self, tokens: &Tokens) -> Fallible<()> {
self.db.transaction(|trans| {
let mut real = tokens.agents.values().collect::<HashSet<&String>>();
for agent in self.all()? {
for agent in &self.all()? {
if !real.remove(&agent.name) {
trans.execute("DELETE FROM agents WHERE name = ?1;", &[&agent.name])?;
}
@@ -68,7 +68,7 @@ pub fn endpoint_queue(data: Arc<Data>) -> Fallible<Response<Body>> {
let mut generating_report = Vec::new();
let mut report_failed = Vec::new();

for experiment in Experiment::unfinished(&data.db)? {
for experiment in &Experiment::unfinished(&data.db)? {
// Don't include completed experiments in the queue
if experiment.status == Status::Completed {
continue;
@@ -28,7 +28,7 @@ pub(crate) static RUSTUP_TOOLCHAIN_INSTALL_MASTER: BinaryCrate = BinaryCrate {
cargo_subcommand: None,
};

static INSTALLABLE_TOOLS: &[&InstallableTool] = &[
static INSTALLABLE_TOOLS: &[&dyn InstallableTool] = &[
&RUSTUP,
&CARGO_INSTALL_UPDATE,
&RUSTUP_TOOLCHAIN_INSTALL_MASTER,
@@ -19,9 +19,9 @@ pub(crate) fn from_hex(input: &str) -> Result<Vec<u8>, HexError> {
pending += 1;

current = match byte {
b'0'...b'9' => byte - b'0',
b'a'...b'f' => byte - b'a' + 10,
b'A'...b'F' => byte - b'A' + 10,
b'0'..=b'9' => byte - b'0',
b'a'..=b'f' => byte - b'a' + 10,
b'A'..=b'F' => byte - b'A' + 10,
_ => {
return Err(HexError::InvalidChar(input[i..].chars().next().unwrap()));
}
@@ -41,7 +41,7 @@ where
f()
}

pub fn report_panic(e: &Any) {
pub fn report_panic(e: &dyn Any) {
if let Some(e) = e.downcast_ref::<String>() {
error!("panicked: {}", e)
} else if let Some(e) = e.downcast_ref::<&'static str>() {

0 comments on commit d5ce1dc

Please sign in to comment.
You can’t perform that action at this time.