From 418f0a0a572611e5d241db1c387ce2aa13735171 Mon Sep 17 00:00:00 2001 From: Ash Berlin-Taylor Date: Wed, 28 Jul 2021 13:59:09 +0100 Subject: [PATCH] Update to vector 0.15 syntax (#36) Vector 0.15 had a breaking change that stopped our config working, so rather than only noticing at run time, fail at build time --- github-runner-ami/packer/files/install-dependencies.sh | 5 ++++- github-runner-ami/packer/files/vector.toml | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/github-runner-ami/packer/files/install-dependencies.sh b/github-runner-ami/packer/files/install-dependencies.sh index 81d1663..801522e 100644 --- a/github-runner-ami/packer/files/install-dependencies.sh +++ b/github-runner-ami/packer/files/install-dependencies.sh @@ -39,8 +39,11 @@ apt-get install -yq --no-install-recommends -o Dpkg::Options::="--force-confold" python3-venv \ python3-wheel \ yarn \ - vector + vector='0.15.*' # Re-enabled in clout-init once AWS_DEFAULT_REGION env var is set systemctl disable vector + +# validate the vector config file we have already installed +sudo -u vector vector validate --no-environment diff --git a/github-runner-ami/packer/files/vector.toml b/github-runner-ami/packer/files/vector.toml index 07da3a0..81112e6 100644 --- a/github-runner-ami/packer/files/vector.toml +++ b/github-runner-ami/packer/files/vector.toml @@ -59,8 +59,7 @@ data_dir = "/var/lib/vector" [transforms.filter-runner-logs] type = "filter" inputs = ['grok-runner-logs'] - condition.type = "remap" - condition.source = ''' + condition = ''' if .logger == "JobServerQueue" { !match!(.message, r'Try to append \d+ batches web console lines for record') } else if .logger == "HostContext" {