From d84da81b8e33db9e4f8bf15790ffaa57f3a3c5fd Mon Sep 17 00:00:00 2001 From: Joshua Beemster Date: Wed, 9 May 2018 17:43:49 +0200 Subject: [PATCH 1/5] Configurable max event size for webhook updates (closes #94) --- src/factotum/webhook/jobupdate/mod.rs | 14 +++++------- src/factotum/webhook/jobupdate/tests.rs | 30 ++++++++++++++++--------- src/factotum/webhook/mod.rs | 14 ++++++++++-- src/factotum/webhook/tests.rs | 8 +++---- src/main.rs | 19 +++++++++++----- 5 files changed, 55 insertions(+), 30 deletions(-) diff --git a/src/factotum/webhook/jobupdate/mod.rs b/src/factotum/webhook/jobupdate/mod.rs index 94da371..4c27764 100644 --- a/src/factotum/webhook/jobupdate/mod.rs +++ b/src/factotum/webhook/jobupdate/mod.rs @@ -20,8 +20,6 @@ static JOB_UPDATE_SCHEMA_NAME: &'static str = "iglu:com.snowplowanalytics.\ static TASK_UPDATE_SCHEMA_NAME: &'static str = "iglu:com.snowplowanalytics.\ factotum/task_update/jsonschema/1-0-0"; -const MAX_STDOUT_STDERR_SIZE: usize = 10_000; // 10kb - use factotum::executor::{ExecutionState, ExecutionUpdate, TaskSnapshot, Transition as ExecutorTransition}; use super::jobcontext::JobContext; @@ -215,11 +213,11 @@ pub struct JobUpdate { transition: Option, transitions: Option>, taskStates: Vec, - tags: HashMap + tags: HashMap, } impl JobUpdate { - pub fn new(context: &JobContext, execution_update: &ExecutionUpdate) -> Self { + pub fn new(context: &JobContext, execution_update: &ExecutionUpdate, max_stdouterr_size: &usize) -> Self { JobUpdate { jobName: context.job_name.clone(), jobReference: context.job_reference.clone(), @@ -231,7 +229,7 @@ impl JobUpdate { &execution_update.task_snapshot), startTime: to_string_datetime(&context.start_time), runDuration: (UTC::now() - context.start_time).to_string(), - taskStates: JobUpdate::to_task_states(&execution_update.task_snapshot), + taskStates: JobUpdate::to_task_states(&execution_update.task_snapshot, &max_stdouterr_size), transition: { match execution_update.transition { ExecutorTransition::Job(ref j) => { @@ -285,7 +283,7 @@ impl JobUpdate { json::encode(&wrapped).unwrap() } - fn to_task_states(tasks: &TaskSnapshot) -> Vec { + fn to_task_states(tasks: &TaskSnapshot, max_stdouterr_size: &usize) -> Vec { use chrono::duration::Duration as ChronoDuration; tasks.iter() @@ -312,7 +310,7 @@ impl JobUpdate { }, stdout: if let Some(ref r) = task.run_result { if let Some(ref stdout) = r.stdout { - Some(tail_n_chars(stdout, MAX_STDOUT_STDERR_SIZE).into()) + Some(tail_n_chars(stdout, *max_stdouterr_size).into()) } else { None } @@ -321,7 +319,7 @@ impl JobUpdate { }, stderr: if let Some(ref r) = task.run_result { if let Some(ref stderr) = r.stderr { - Some(tail_n_chars(stderr, MAX_STDOUT_STDERR_SIZE).into()) + Some(tail_n_chars(stderr, *max_stdouterr_size).into()) } else { None } diff --git a/src/factotum/webhook/jobupdate/tests.rs b/src/factotum/webhook/jobupdate/tests.rs index 24cf6cb..cf665fa 100644 --- a/src/factotum/webhook/jobupdate/tests.rs +++ b/src/factotum/webhook/jobupdate/tests.rs @@ -39,7 +39,8 @@ fn to_json_valid_against_schema_job_transition() { vec![], Transition::Job(ExecutorJobTransition::new(Some(ExecutionState::Running), ExecutionState::Finished))); - let job_update = JobUpdate::new(&context, &exec_update); + let max_stdouterr_size: usize = 10_000; + let job_update = JobUpdate::new(&context, &exec_update, &max_stdouterr_size); let json_wrapped = job_update.as_self_desc_json(); println!("{}", json_wrapped); let result = schemavalidator::validate_schema(&json_wrapped, schema); @@ -82,7 +83,8 @@ fn to_json_valid_against_schema_task_transition_running_to_failed() { tasks, Transition::Task(transitions)); - let job_update = JobUpdate::new(&context, &exec_update); + let max_stdouterr_size: usize = 10_000; + let job_update = JobUpdate::new(&context, &exec_update, &max_stdouterr_size); let json_wrapped = job_update.as_self_desc_json(); println!("{}", json_wrapped); @@ -123,7 +125,8 @@ fn to_json_valid_against_schema_task_transition_waiting_to_running() { tasks, Transition::Task(transitions)); - let job_update = JobUpdate::new(&context, &exec_update); + let max_stdouterr_size: usize = 10_000; + let job_update = JobUpdate::new(&context, &exec_update, &max_stdouterr_size); let json_wrapped = job_update.as_self_desc_json(); println!("{}", json_wrapped); @@ -137,7 +140,8 @@ fn to_json_valid_against_schema_task_transition_waiting_to_running() { #[test] fn to_task_states_empty() { let empty = vec![]; - assert!(JobUpdate::to_task_states(&empty).is_empty()); + let max_stdouterr_size: usize = 10_000; + assert!(JobUpdate::to_task_states(&empty, &max_stdouterr_size).is_empty()); } #[test] @@ -150,7 +154,8 @@ fn headers_correct() { vec![], Transition::Job(ExecutorJobTransition::new(Some(ExecutionState::Running), ExecutionState::Finished))); - let job_update = JobUpdate::new(&context, &exec_update); + let max_stdouterr_size: usize = 10_000; + let job_update = JobUpdate::new(&context, &exec_update, &max_stdouterr_size); assert_eq!(context.job_reference, job_update.jobReference); assert_eq!(context.run_reference, job_update.runReference); @@ -187,7 +192,8 @@ fn failed_headers_correct() { tasks, Transition::Job(ExecutorJobTransition::new(Some(ExecutionState::Running), ExecutionState::Finished))); - let upd = JobUpdate::new(&context, &exec_update); + let max_stdouterr_size: usize = 10_000; + let upd = JobUpdate::new(&context, &exec_update, &max_stdouterr_size); assert_eq!(upd.runState, JobRunState::FAILED); } @@ -205,7 +211,8 @@ fn task_states_converted_no_run_data() { ExecutionState::Started))); let context = JobContext::new("hello", "world", None); - let job_update = JobUpdate::new(&context, &start_sample); + let max_stdouterr_size: usize = 10_000; + let job_update = JobUpdate::new(&context, &start_sample, &max_stdouterr_size); let expected_state = TaskUpdate { taskName: "chocolate".to_string(), @@ -256,7 +263,8 @@ fn task_states_converted_with_run_data() { ExecutionState::Started))); let context = JobContext::new("hello", "world", None); - let job_update = JobUpdate::new(&context, &start_sample); + let max_stdouterr_size: usize = 10_000; + let job_update = JobUpdate::new(&context, &start_sample, &max_stdouterr_size); let expected_states = vec![TaskUpdate { taskName: "chocolate".to_string(), @@ -345,7 +353,8 @@ fn big_task_stdout_trimmed() { ExecutionState::Started))); let context = JobContext::new("hello", "world", None); - let job_update = JobUpdate::new(&context, &start_sample); + let max_stdouterr_size: usize = 10_000; + let job_update = JobUpdate::new(&context, &start_sample, &max_stdouterr_size); let expected_str = format!("{}tail", make_n_char_string(max_len-"tail".len())); @@ -403,7 +412,8 @@ fn big_task_stderr_trimmed() { ExecutionState::Started))); let context = JobContext::new("hello", "world", None); - let job_update = JobUpdate::new(&context, &start_sample); + let max_stdouterr_size: usize = 10_000; + let job_update = JobUpdate::new(&context, &start_sample, &max_stdouterr_size); let expected_str = format!("{}tail", make_n_char_string(max_len-"tail".len())); diff --git a/src/factotum/webhook/mod.rs b/src/factotum/webhook/mod.rs index afc6751..aceec90 100644 --- a/src/factotum/webhook/mod.rs +++ b/src/factotum/webhook/mod.rs @@ -85,6 +85,7 @@ pub struct Webhook { pub factfile_json: String, pub endpoint: String, job_context: JobContext, + pub max_stdouterr_size: usize, } impl Webhook { @@ -116,15 +117,23 @@ impl Webhook { } } - pub fn new>(factfile_job_name: S, factfile_json: S, endpoint: S, job_tags:Option>) -> Self { + pub fn new>(factfile_job_name: S, factfile_json: S, endpoint: S, job_tags:Option>, max_stdouterr_size:Option) -> Self { let ff_name: String = factfile_job_name.into(); let ff_json: String = factfile_json.into(); let jc = jobcontext::JobContext::new(ff_name.clone(), &ff_json, job_tags); + + let max_stdouterr_size_bytes: usize = if let Some(max_bytes) = max_stdouterr_size { + max_bytes + } else { + 10_000 + }; + Webhook { job_context: jc, factfile_job_name: ff_name, factfile_json: ff_json, endpoint: endpoint.into(), + max_stdouterr_size: max_stdouterr_size_bytes, } } @@ -139,6 +148,7 @@ impl Webhook { let endpoint = self.endpoint.clone(); let job_context = self.job_context.clone(); + let max_stdouterr_size = self.max_stdouterr_size.clone(); thread::spawn(move || { @@ -157,7 +167,7 @@ impl Webhook { done = true; } - let job_update = jobupdate::JobUpdate::new(&job_context, &message); + let job_update = jobupdate::JobUpdate::new(&job_context, &message, &max_stdouterr_size); let json_post_data = job_update.as_self_desc_json(); for _ in 0..MAX_RETRIES { diff --git a/src/factotum/webhook/tests.rs b/src/factotum/webhook/tests.rs index e2b4f8c..a6dd292 100644 --- a/src/factotum/webhook/tests.rs +++ b/src/factotum/webhook/tests.rs @@ -46,7 +46,7 @@ fn backoff_retry_1min_good() { #[test] fn webhook_object_constructed_good() { - let wh = Webhook::new("job_name", "hello", "https://goodplace.com", None); + let wh = Webhook::new("job_name", "hello", "https://goodplace.com", None, None); assert_eq!("hello", wh.factfile_json); assert_eq!("https://goodplace.com", wh.endpoint); assert_eq!("job_name", wh.factfile_job_name); @@ -54,7 +54,7 @@ fn webhook_object_constructed_good() { #[test] fn finish_stops_thread() { - let mut wh = Webhook::new("job_name", "hello", "https://goodplace.com", None); + let mut wh = Webhook::new("job_name", "hello", "https://goodplace.com", None, None); let (tx, rx) = mpsc::channel::(); let jh = wh.connect_webhook(rx, mock_200_ok, zero_backoff); let sent_state = @@ -91,7 +91,7 @@ fn make_mock_run() -> Vec { #[test] fn multiple_messages_sent() { - let mut wh = Webhook::new("job_name", "hello", "https://goodplace.com", None); + let mut wh = Webhook::new("job_name", "hello", "https://goodplace.com", None, None); let (tx, rx) = mpsc::channel::(); let jh = wh.connect_webhook(rx, mock_200_ok, zero_backoff); @@ -114,7 +114,7 @@ fn multiple_messages_sent() { #[test] fn failures_tried_three_times() { - let mut wh = Webhook::new("job_name", "hello", "https://goodplace.com", None); + let mut wh = Webhook::new("job_name", "hello", "https://goodplace.com", None, None); let (tx, rx) = mpsc::channel::(); let jh = wh.connect_webhook(rx, mock_500_err, zero_backoff); diff --git a/src/main.rs b/src/main.rs index 1ce2104..45755b3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -69,7 +69,7 @@ const USAGE: &'static str = Factotum. Usage: - factotum run [--start=] [--env=] [--dry-run] [--no-colour] [--webhook=] [--tag=]... [--constraint=]... + factotum run [--start=] [--env=] [--dry-run] [--no-colour] [--webhook=] [--tag=]... [--constraint=]... [--max-stdouterr-size=] factotum validate [--no-colour] factotum dot [--start=] [--output=] [--overwrite] [--no-colour] factotum (-h | --help) [--no-colour] @@ -87,6 +87,7 @@ Options: --webhook= Post updates on job execution to the specified URL. --tag= Add job metadata (tags). --constraint= Checks for an external constraint that will prevent execution; allowed constraints (host). + --max-stdouterr-size= The maximum size of the individual stdout/err sent via the webhook functions for job updates. "; #[derive(Debug, RustcDecodable)] @@ -100,6 +101,7 @@ struct Args { flag_no_colour: bool, flag_tag: Option>, flag_constraint: Option>, + flag_max_stdouterr_size: Option, arg_factfile: String, flag_version: bool, cmd_run: bool, @@ -334,6 +336,7 @@ fn parse_file_and_simulate(factfile: &str, env: Option, start_from: Opti terminate_early: vec![], }), None, + None, None) } @@ -341,7 +344,8 @@ fn parse_file_and_execute(factfile: &str, env: Option, start_from: Option, webhook_url: Option, - job_tags: Option>) + job_tags: Option>, + max_stdouterr_size: Option) -> i32 { parse_file_and_execute_with_strategy(factfile, env, @@ -349,7 +353,8 @@ fn parse_file_and_execute(factfile: &str, factotum::executor::execution_strategy::execute_os, OverrideResultMappings::None, webhook_url, - job_tags) + job_tags, + max_stdouterr_size) } fn parse_file_and_execute_with_strategy(factfile: &str, @@ -358,7 +363,8 @@ fn parse_file_and_execute_with_strategy(factfile: &str, strategy: F, override_result_map: OverrideResultMappings, webhook_url: Option, - job_tags: Option>) + job_tags: Option>, + max_stdouterr_size: Option) -> i32 where F: Fn(&str, &mut Command) -> RunResult + Send + Sync + 'static + Copy { @@ -380,7 +386,7 @@ fn parse_file_and_execute_with_strategy(factfile: &str, let (maybe_updates_channel, maybe_join_handle) = if webhook_url.is_some() { let url = webhook_url.unwrap(); - let mut wh = Webhook::new(job.name.clone(), job.raw.clone(), url, job_tags); + let mut wh = Webhook::new(job.name.clone(), job.raw.clone(), url, job_tags, max_stdouterr_size); let (tx, rx) = mpsc::channel::(); let join_handle = wh.connect_webhook(rx, Webhook::http_post, webhook::backoff_rand_1_minute); @@ -770,7 +776,8 @@ fn factotum() -> i32 { args.flag_env, args.flag_start, args.flag_webhook, - tag_map) + tag_map, + args.flag_max_stdouterr_size) } else { parse_file_and_simulate(&args.arg_factfile, args.flag_env, args.flag_start) } From fbfff6b7917816d66a74fbbf669769e8376c090b Mon Sep 17 00:00:00 2001 From: Joshua Beemster Date: Thu, 24 May 2018 15:15:20 +0200 Subject: [PATCH 2/5] Update Copyright years to 2016-2018 (closes #109) --- README.md | 2 +- src/factotum/executor/execution_strategy/mod.rs | 2 +- src/factotum/executor/execution_strategy/tests.rs | 2 +- src/factotum/executor/mod.rs | 2 +- src/factotum/executor/task_list/mod.rs | 2 +- src/factotum/executor/task_list/tests.rs | 2 +- src/factotum/executor/tests.rs | 2 +- src/factotum/factfile/dot/mod.rs | 2 +- src/factotum/factfile/dot/tests.rs | 2 +- src/factotum/factfile/mod.rs | 2 +- src/factotum/factfile/tests.rs | 2 +- src/factotum/mod.rs | 2 +- src/factotum/parser/mod.rs | 2 +- src/factotum/parser/schemavalidator/mod.rs | 2 +- src/factotum/parser/schemavalidator/tests.rs | 2 +- src/factotum/parser/templater/mod.rs | 2 +- src/factotum/parser/templater/tests.rs | 2 +- src/factotum/parser/tests.rs | 2 +- src/factotum/sequencer/mod.rs | 2 +- src/factotum/sequencer/tests.rs | 2 +- src/factotum/tests.rs | 2 +- src/factotum/webhook/jobcontext/mod.rs | 2 +- src/factotum/webhook/jobcontext/tests.rs | 2 +- src/factotum/webhook/jobupdate/mod.rs | 2 +- src/factotum/webhook/jobupdate/tests.rs | 2 +- src/factotum/webhook/mod.rs | 2 +- src/factotum/webhook/tests.rs | 2 +- src/main.rs | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index d8d01d9..2b20424 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ Factotum is written in **[Rust](https://www.rust-lang.org/)**. ## Copyright and license -Snowplow is copyright 2016 Snowplow Analytics Ltd. +Snowplow is copyright 2016-2018 Snowplow Analytics Ltd. Licensed under the **[Apache License, Version 2.0] [license]** (the "License"); you may not use this software except in compliance with the License. diff --git a/src/factotum/executor/execution_strategy/mod.rs b/src/factotum/executor/execution_strategy/mod.rs index 3666ce2..2f73417 100644 --- a/src/factotum/executor/execution_strategy/mod.rs +++ b/src/factotum/executor/execution_strategy/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/executor/execution_strategy/tests.rs b/src/factotum/executor/execution_strategy/tests.rs index 240a634..e83efa5 100644 --- a/src/factotum/executor/execution_strategy/tests.rs +++ b/src/factotum/executor/execution_strategy/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/executor/mod.rs b/src/factotum/executor/mod.rs index ad14175..47b9f21 100644 --- a/src/factotum/executor/mod.rs +++ b/src/factotum/executor/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/executor/task_list/mod.rs b/src/factotum/executor/task_list/mod.rs index 0995d69..32d4969 100644 --- a/src/factotum/executor/task_list/mod.rs +++ b/src/factotum/executor/task_list/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/executor/task_list/tests.rs b/src/factotum/executor/task_list/tests.rs index 941c03f..a420501 100644 --- a/src/factotum/executor/task_list/tests.rs +++ b/src/factotum/executor/task_list/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/executor/tests.rs b/src/factotum/executor/tests.rs index 723a764..a665b4c 100644 --- a/src/factotum/executor/tests.rs +++ b/src/factotum/executor/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/factfile/dot/mod.rs b/src/factotum/factfile/dot/mod.rs index c2e5ca9..8cd2d32 100644 --- a/src/factotum/factfile/dot/mod.rs +++ b/src/factotum/factfile/dot/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/factfile/dot/tests.rs b/src/factotum/factfile/dot/tests.rs index 84f8a2f..a52c85d 100644 --- a/src/factotum/factfile/dot/tests.rs +++ b/src/factotum/factfile/dot/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/factfile/mod.rs b/src/factotum/factfile/mod.rs index bd5a8a5..001281e 100644 --- a/src/factotum/factfile/mod.rs +++ b/src/factotum/factfile/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/factfile/tests.rs b/src/factotum/factfile/tests.rs index aa56da9..eb55e7c 100644 --- a/src/factotum/factfile/tests.rs +++ b/src/factotum/factfile/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/mod.rs b/src/factotum/mod.rs index 875067a..f02f9b4 100644 --- a/src/factotum/mod.rs +++ b/src/factotum/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/parser/mod.rs b/src/factotum/parser/mod.rs index c7df2bc..8fd3e6a 100644 --- a/src/factotum/parser/mod.rs +++ b/src/factotum/parser/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/parser/schemavalidator/mod.rs b/src/factotum/parser/schemavalidator/mod.rs index 2ded858..8269cf0 100644 --- a/src/factotum/parser/schemavalidator/mod.rs +++ b/src/factotum/parser/schemavalidator/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/parser/schemavalidator/tests.rs b/src/factotum/parser/schemavalidator/tests.rs index e4ba89c..03b548c 100644 --- a/src/factotum/parser/schemavalidator/tests.rs +++ b/src/factotum/parser/schemavalidator/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/parser/templater/mod.rs b/src/factotum/parser/templater/mod.rs index 1ed4fe5..ee04306 100644 --- a/src/factotum/parser/templater/mod.rs +++ b/src/factotum/parser/templater/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/parser/templater/tests.rs b/src/factotum/parser/templater/tests.rs index 73cae88..fc6614a 100644 --- a/src/factotum/parser/templater/tests.rs +++ b/src/factotum/parser/templater/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/parser/tests.rs b/src/factotum/parser/tests.rs index 7688b88..78855c8 100644 --- a/src/factotum/parser/tests.rs +++ b/src/factotum/parser/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/sequencer/mod.rs b/src/factotum/sequencer/mod.rs index dfcb010..c3125b6 100644 --- a/src/factotum/sequencer/mod.rs +++ b/src/factotum/sequencer/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/sequencer/tests.rs b/src/factotum/sequencer/tests.rs index 0796c0d..3bb4270 100644 --- a/src/factotum/sequencer/tests.rs +++ b/src/factotum/sequencer/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/tests.rs b/src/factotum/tests.rs index 01bb8f7..fd7309c 100644 --- a/src/factotum/tests.rs +++ b/src/factotum/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/webhook/jobcontext/mod.rs b/src/factotum/webhook/jobcontext/mod.rs index 5559822..57ed0eb 100644 --- a/src/factotum/webhook/jobcontext/mod.rs +++ b/src/factotum/webhook/jobcontext/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/webhook/jobcontext/tests.rs b/src/factotum/webhook/jobcontext/tests.rs index d44609c..49302e2 100644 --- a/src/factotum/webhook/jobcontext/tests.rs +++ b/src/factotum/webhook/jobcontext/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/webhook/jobupdate/mod.rs b/src/factotum/webhook/jobupdate/mod.rs index 4c27764..eeeee5b 100644 --- a/src/factotum/webhook/jobupdate/mod.rs +++ b/src/factotum/webhook/jobupdate/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/webhook/jobupdate/tests.rs b/src/factotum/webhook/jobupdate/tests.rs index cf665fa..d1f80e9 100644 --- a/src/factotum/webhook/jobupdate/tests.rs +++ b/src/factotum/webhook/jobupdate/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/webhook/mod.rs b/src/factotum/webhook/mod.rs index aceec90..95872e7 100644 --- a/src/factotum/webhook/mod.rs +++ b/src/factotum/webhook/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/factotum/webhook/tests.rs b/src/factotum/webhook/tests.rs index a6dd292..b9cc1e7 100644 --- a/src/factotum/webhook/tests.rs +++ b/src/factotum/webhook/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License diff --git a/src/main.rs b/src/main.rs index 45755b3..bca6904 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. +// Copyright (c) 2016-2018 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, and // you may not use this file except in compliance with the Apache License From 944718a6da285fbb72bd92a140a828d92bd046de Mon Sep 17 00:00:00 2001 From: Joshua Beemster Date: Thu, 24 May 2018 15:16:31 +0200 Subject: [PATCH 3/5] Change reference to "Snowplow" to "Factotum" in copyright notice in README (closes #93) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b20424..71f1526 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ Factotum is written in **[Rust](https://www.rust-lang.org/)**. ## Copyright and license -Snowplow is copyright 2016-2018 Snowplow Analytics Ltd. +Factotum is copyright 2016-2018 Snowplow Analytics Ltd. Licensed under the **[Apache License, Version 2.0] [license]** (the "License"); you may not use this software except in compliance with the License. From daa45ad871905d1313dd4c4e78adf2e9d5b682ff Mon Sep 17 00:00:00 2001 From: Joshua Beemster Date: Thu, 14 Jun 2018 15:01:30 +0200 Subject: [PATCH 4/5] Use pip2 instead of pip for OSX build on Travis (fixes #110) --- .travis/deploy/tasks/provision.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis/deploy/tasks/provision.sh b/.travis/deploy/tasks/provision.sh index a63dc3e..8c1ce5d 100755 --- a/.travis/deploy/tasks/provision.sh +++ b/.travis/deploy/tasks/provision.sh @@ -1,4 +1,7 @@ #!/bin/bash -e -pip install --user --upgrade pip -pip install --user release-manager==0.1.0rc3 \ No newline at end of file +if [ "${TRAVIS_OS_NAME}" == "osx" ]; then + pip2 install --user release-manager==0.1.0 +else + pip install --user release-manager==0.1.0 +fi From b1f10b20b718754a85c37098a9ca2d4765261f91 Mon Sep 17 00:00:00 2001 From: Joshua Beemster Date: Thu, 24 May 2018 15:11:13 +0200 Subject: [PATCH 5/5] Prepare for release --- CHANGELOG | 7 +++++++ Cargo.toml | 2 +- README.md | 15 +++++++++++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 14abc88..e16d00a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +Version 0.5.0 (2018-06-26) +-------------------------- +Configurable max event size for webhook updates (#94) +Update Copyright years to 2016-2018 (#109) +Change reference to "Snowplow" to "Factotum" in copyright notice in README (#93) +Use pip2 instead of pip for OSX build on Travis (#110) + Version 0.4.1 (2017-03-16) -------------------------- Fix panic!(..) on logging initialization error (#100) diff --git a/Cargo.toml b/Cargo.toml index 2e32824..7df474b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "factotum" -version = "0.4.1" +version = "0.5.0" authors = ["Ed Lewis ", "Josh Beemster "] [dependencies] diff --git a/README.md b/README.md index 71f1526..78129a8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Factotum -[![Build Status](https://travis-ci.org/snowplow/factotum.svg?branch=master)](https://travis-ci.org/snowplow/factotum) [![Release 0.4.1](http://img.shields.io/badge/release-0.4.1-blue.svg?style=flat)](https://github.com/snowplow/factotum/releases) [![Apache License 2.0](http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) +[![Build Status][travis-image]][travis] [![Release][release-image]][releases] [![Apache License 2.0][license-image]][license] A dag running tool designed for efficiently running complex jobs with non-trivial dependency trees. @@ -15,8 +15,8 @@ A dag running tool designed for efficiently running complex jobs with non-trivia Assuming you're running **64 bit Linux**: ```{bash} -wget https://bintray.com/artifact/download/snowplow/snowplow-generic/factotum_0.4.1_linux_x86_64.zip -unzip factotum_0.4.1_linux_x86_64.zip +wget https://bintray.com/artifact/download/snowplow/snowplow-generic/factotum_0.5.0_linux_x86_64.zip +unzip factotum_0.5.0_linux_x86_64.zip ./factotum --version ``` @@ -132,7 +132,7 @@ Factotum is written in **[Rust](https://www.rust-lang.org/)**. Factotum is copyright 2016-2018 Snowplow Analytics Ltd. -Licensed under the **[Apache License, Version 2.0] [license]** (the "License"); +Licensed under the **[Apache License, Version 2.0][license]** (the "License"); you may not use this software except in compliance with the License. Unless required by applicable law or agreed to in writing, software @@ -141,4 +141,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +[travis-image]: https://travis-ci.org/snowplow/factotum.svg?branch=master +[travis]: https://travis-ci.org/snowplow/factotum + +[license-image]: http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat [license]: http://www.apache.org/licenses/LICENSE-2.0 + +[release-image]: http://img.shields.io/badge/release-0.5.0-blue.svg?style=flat +[releases]: https://github.com/snowplow/factotum/releases