Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/ofborg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4ac051d8eaa8^
Choose a base ref
...
head repository: NixOS/ofborg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9aff243bc00d
Choose a head ref
  • 5 commits
  • 8 files changed
  • 1 contributor

Commits on Dec 3, 2018

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    4ac051d View commit details

Commits on Dec 4, 2018

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    3915e9d View commit details
  2. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    a40b7b9 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    9d42162 View commit details
  4. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    9aff243 View commit details
28 changes: 15 additions & 13 deletions ofborg/src/bin/builder.rs
Original file line number Diff line number Diff line change
@@ -35,12 +35,19 @@ fn main() {
panic!();
};

let worker = tasks::build::BuildWorker::new(
cloner,
nix,
cfg.nix.system.clone(),
cfg.runner.identity.clone(),
);

let mut session = easyamqp::session_from_config(&cfg.rabbitmq).unwrap();
let mut channel = session.open_channel(1).unwrap();
channel.basic_prefetch(1).unwrap();
channel
.declare_exchange(easyamqp::ExchangeConfig {
exchange: "build-jobs".to_owned(),
exchange: "build-jobs",
exchange_type: easyamqp::ExchangeType::Fanout,
passive: false,
durable: true,
@@ -55,7 +62,7 @@ fn main() {
if cfg.runner.build_all_jobs != Some(true) {
queue_name = channel
.declare_queue(easyamqp::QueueConfig {
queue: format!("build-inputs-{}", cfg.nix.system.clone()),
queue: &format!("build-inputs-{}", cfg.nix.system.clone()),
passive: false,
durable: true,
exclusive: false,
@@ -69,7 +76,7 @@ fn main() {
warn!("developing and have Graham's permission!");
queue_name = channel
.declare_queue(easyamqp::QueueConfig {
queue: "".to_owned(),
queue: "",
passive: false,
durable: false,
exclusive: true,
@@ -82,8 +89,8 @@ fn main() {

channel
.bind_queue(easyamqp::BindQueueConfig {
queue: queue_name.clone(),
exchange: "build-jobs".to_owned(),
queue: &queue_name,
exchange: "build-jobs",
routing_key: None,
no_wait: false,
arguments: None,
@@ -92,15 +99,10 @@ fn main() {

channel
.consume(
notifyworker::new(tasks::build::BuildWorker::new(
cloner,
nix,
cfg.nix.system.clone(),
cfg.runner.identity.clone(),
)),
notifyworker::new(worker),
easyamqp::ConsumeConfig {
queue: queue_name.clone(),
consumer_tag: format!("{}-builder", cfg.whoami()),
queue: &queue_name,
consumer_tag: &format!("{}-builder", cfg.whoami()),
no_local: false,
no_ack: false,
no_wait: false,
16 changes: 8 additions & 8 deletions ofborg/src/bin/evaluation-filter.rs
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ fn main() {

channel
.declare_exchange(easyamqp::ExchangeConfig {
exchange: "github-events".to_owned(),
exchange: "github-events",
exchange_type: easyamqp::ExchangeType::Topic,
passive: false,
durable: true,
@@ -45,7 +45,7 @@ fn main() {

channel
.declare_queue(easyamqp::QueueConfig {
queue: "mass-rebuild-check-jobs".to_owned(),
queue: "mass-rebuild-check-jobs",
passive: false,
durable: true,
exclusive: false,
@@ -57,7 +57,7 @@ fn main() {

channel
.declare_queue(easyamqp::QueueConfig {
queue: "mass-rebuild-check-inputs".to_owned(),
queue: "mass-rebuild-check-inputs",
passive: false,
durable: true,
exclusive: false,
@@ -69,9 +69,9 @@ fn main() {

channel
.bind_queue(easyamqp::BindQueueConfig {
queue: "mass-rebuild-check-inputs".to_owned(),
exchange: "github-events".to_owned(),
routing_key: Some("pull_request.nixos/nixpkgs".to_owned()),
queue: "mass-rebuild-check-inputs",
exchange: "github-events",
routing_key: Some("pull_request.nixos/nixpkgs"),
no_wait: false,
arguments: None,
})
@@ -84,8 +84,8 @@ fn main() {
cfg.acl(),
)),
easyamqp::ConsumeConfig {
queue: "mass-rebuild-check-inputs".to_owned(),
consumer_tag: format!("{}-evaluation-filter", cfg.whoami()),
queue: "mass-rebuild-check-inputs",
consumer_tag: &format!("{}-evaluation-filter", cfg.whoami()),
no_local: false,
no_ack: false,
no_wait: false,
16 changes: 8 additions & 8 deletions ofborg/src/bin/github-comment-filter.rs
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ fn main() {
let mut channel = session.open_channel(1).unwrap();
channel
.declare_exchange(easyamqp::ExchangeConfig {
exchange: "github-events".to_owned(),
exchange: "github-events",
exchange_type: easyamqp::ExchangeType::Topic,
passive: false,
durable: true,
@@ -44,7 +44,7 @@ fn main() {

channel
.declare_exchange(easyamqp::ExchangeConfig {
exchange: "build-jobs".to_owned(),
exchange: "build-jobs",
exchange_type: easyamqp::ExchangeType::Fanout,
passive: false,
durable: true,
@@ -57,7 +57,7 @@ fn main() {

channel
.declare_queue(easyamqp::QueueConfig {
queue: "build-inputs".to_owned(),
queue: "build-inputs",
passive: false,
durable: true,
exclusive: false,
@@ -69,9 +69,9 @@ fn main() {

channel
.bind_queue(easyamqp::BindQueueConfig {
queue: "build-inputs".to_owned(),
exchange: "github-events".to_owned(),
routing_key: Some("issue_comment.*".to_owned()),
queue: "build-inputs",
exchange: "github-events",
routing_key: Some("issue_comment.*"),
no_wait: false,
arguments: None,
})
@@ -85,8 +85,8 @@ fn main() {
cfg.github(),
)),
easyamqp::ConsumeConfig {
queue: "build-inputs".to_owned(),
consumer_tag: format!("{}-github-comment-filter", cfg.whoami()),
queue: "build-inputs",
consumer_tag: &format!("{}-github-comment-filter", cfg.whoami()),
no_local: false,
no_ack: false,
no_wait: false,
12 changes: 6 additions & 6 deletions ofborg/src/bin/github-comment-poster.rs
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ fn main() {

channel
.declare_exchange(easyamqp::ExchangeConfig {
exchange: "build-results".to_owned(),
exchange: "build-results",
exchange_type: easyamqp::ExchangeType::Fanout,
passive: false,
durable: true,
@@ -40,7 +40,7 @@ fn main() {

channel
.declare_queue(easyamqp::QueueConfig {
queue: "build-results".to_owned(),
queue: "build-results",
passive: false,
durable: true,
exclusive: false,
@@ -52,8 +52,8 @@ fn main() {

channel
.bind_queue(easyamqp::BindQueueConfig {
queue: "build-results".to_owned(),
exchange: "build-results".to_owned(),
queue: "build-results",
exchange: "build-results",
routing_key: None,
no_wait: false,
arguments: None,
@@ -67,8 +67,8 @@ fn main() {
cfg.github_app(),
)),
easyamqp::ConsumeConfig {
queue: "build-results".to_owned(),
consumer_tag: format!("{}-github-comment-poster", cfg.whoami()),
queue: "build-results",
consumer_tag: &format!("{}-github-comment-poster", cfg.whoami()),
no_local: false,
no_ack: false,
no_wait: false,
14 changes: 7 additions & 7 deletions ofborg/src/bin/log-message-collector.rs
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ fn main() {

channel
.declare_exchange(easyamqp::ExchangeConfig {
exchange: "logs".to_owned(),
exchange: "logs",
exchange_type: easyamqp::ExchangeType::Topic,
passive: false,
durable: true,
@@ -36,7 +36,7 @@ fn main() {

let queue_name = channel
.declare_queue(easyamqp::QueueConfig {
queue: "".to_owned(),
queue: "",
passive: false,
durable: false,
exclusive: true,
@@ -49,9 +49,9 @@ fn main() {

channel
.bind_queue(easyamqp::BindQueueConfig {
queue: queue_name.clone(),
exchange: "logs".to_owned(),
routing_key: Some("*.*".to_owned()),
queue: &queue_name,
exchange: "logs",
routing_key: Some("*.*"),
no_wait: false,
arguments: None,
})
@@ -64,8 +64,8 @@ fn main() {
100,
)),
easyamqp::ConsumeConfig {
queue: queue_name,
consumer_tag: format!("{}-log-collector", cfg.whoami()),
queue: &queue_name,
consumer_tag: &format!("{}-log-collector", cfg.whoami()),
no_local: false,
no_ack: false,
no_wait: false,
6 changes: 3 additions & 3 deletions ofborg/src/bin/mass-rebuilder.rs
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ fn main() {

channel
.declare_queue(easyamqp::QueueConfig {
queue: "mass-rebuild-check-jobs".to_owned(),
queue: "mass-rebuild-check-jobs",
passive: false,
durable: true,
exclusive: false,
@@ -70,8 +70,8 @@ fn main() {
.consume(
worker::new(mrw),
easyamqp::ConsumeConfig {
queue: "mass-rebuild-check-jobs".to_owned(),
consumer_tag: format!("{}-mass-rebuild-checker", cfg.whoami()),
queue: "mass-rebuild-check-jobs",
consumer_tag: &format!("{}-mass-rebuild-checker", cfg.whoami()),
no_local: false,
no_ack: false,
no_wait: false,
12 changes: 6 additions & 6 deletions ofborg/src/bin/stats.rs
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ fn main() {
let mut channel = session.open_channel(1).unwrap();
channel
.declare_exchange(easyamqp::ExchangeConfig {
exchange: "stats".to_owned(),
exchange: "stats",
exchange_type: easyamqp::ExchangeType::Fanout,
passive: false,
durable: true,
@@ -49,7 +49,7 @@ fn main() {

channel
.declare_queue(easyamqp::QueueConfig {
queue: "stats-events".to_owned(),
queue: "stats-events",
passive: false,
durable: true,
exclusive: false,
@@ -61,8 +61,8 @@ fn main() {

channel
.bind_queue(easyamqp::BindQueueConfig {
queue: "stats-events".to_owned(),
exchange: "stats".to_owned(),
queue: "stats-events",
exchange: "stats",
routing_key: None,
no_wait: false,
arguments: None,
@@ -74,8 +74,8 @@ fn main() {
.consume(
worker::new(collector),
easyamqp::ConsumeConfig {
queue: "stats-events".to_owned(),
consumer_tag: format!("{}-prometheus-stats-collector", cfg.whoami()),
queue: "stats-events",
consumer_tag: &format!("{}-prometheus-stats-collector", cfg.whoami()),
no_local: false,
no_ack: false,
no_wait: false,
Loading