From a1dc9f1639c63c9b5e82f6c14fa8649538f60640 Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 14:04:16 -0600 Subject: [PATCH 01/33] move chronicle into gcp --- scripts/integration/chronicle/compose.yaml | 12 ---------- scripts/integration/chronicle/test.yaml | 10 --------- .../integration/{chronicle => gcp}/auth.json | 0 scripts/integration/gcp/compose.yaml | 9 ++++++++ .../{chronicle => gcp}/invalidauth.json | 0 .../integration/{chronicle => gcp}/public.pem | 0 scripts/integration/gcp/test.yaml | 2 ++ src/sinks/gcp/chronicle_unstructured.rs | 22 ++++++++----------- 8 files changed, 20 insertions(+), 35 deletions(-) delete mode 100644 scripts/integration/chronicle/compose.yaml delete mode 100644 scripts/integration/chronicle/test.yaml rename scripts/integration/{chronicle => gcp}/auth.json (100%) rename scripts/integration/{chronicle => gcp}/invalidauth.json (100%) rename scripts/integration/{chronicle => gcp}/public.pem (100%) diff --git a/scripts/integration/chronicle/compose.yaml b/scripts/integration/chronicle/compose.yaml deleted file mode 100644 index 09097e24a97de..0000000000000 --- a/scripts/integration/chronicle/compose.yaml +++ /dev/null @@ -1,12 +0,0 @@ -version: '3' - -services: - chronicle-emulator: - image: docker.io/plork/chronicle-emulator:${CONFIG_VERSION} - ports: - - 3000:3000 - volumes: - - ./public.pem:/public.pem:ro - command: - - -p - - /public.pem diff --git a/scripts/integration/chronicle/test.yaml b/scripts/integration/chronicle/test.yaml deleted file mode 100644 index 048e7adbc3aa9..0000000000000 --- a/scripts/integration/chronicle/test.yaml +++ /dev/null @@ -1,10 +0,0 @@ -features: -- chronicle-integration-tests - -test_filter: '::chronicle_unstructured::' - -env: - CHRONICLE_ADDRESS: http://chronicle-emulator:3000 - -matrix: - version: [latest] diff --git a/scripts/integration/chronicle/auth.json b/scripts/integration/gcp/auth.json similarity index 100% rename from scripts/integration/chronicle/auth.json rename to scripts/integration/gcp/auth.json diff --git a/scripts/integration/gcp/compose.yaml b/scripts/integration/gcp/compose.yaml index 643362a2bc76e..3ab1673228b9d 100644 --- a/scripts/integration/gcp/compose.yaml +++ b/scripts/integration/gcp/compose.yaml @@ -6,3 +6,12 @@ services: environment: - PUBSUB_PROJECT1=testproject,topic1:subscription1 - PUBSUB_PROJECT2=sourceproject,topic2:subscription2 + chronicle-emulator: + image: docker.io/plork/chronicle-emulator:${CONFIG_VERSION} + ports: + - 3000:3000 + volumes: + - ./public.pem:/public.pem:ro + command: + - -p + - /public.pem diff --git a/scripts/integration/chronicle/invalidauth.json b/scripts/integration/gcp/invalidauth.json similarity index 100% rename from scripts/integration/chronicle/invalidauth.json rename to scripts/integration/gcp/invalidauth.json diff --git a/scripts/integration/chronicle/public.pem b/scripts/integration/gcp/public.pem similarity index 100% rename from scripts/integration/chronicle/public.pem rename to scripts/integration/gcp/public.pem diff --git a/scripts/integration/gcp/test.yaml b/scripts/integration/gcp/test.yaml index c63a4de29b613..dc6ae4285cb4e 100644 --- a/scripts/integration/gcp/test.yaml +++ b/scripts/integration/gcp/test.yaml @@ -1,10 +1,12 @@ features: - gcp-integration-tests +- chronicle-integration-tests test_filter: '::gcp::' env: EMULATOR_ADDRESS: http://gcloud-pubsub:8681 + CHRONICLE_ADDRESS: http://chronicle-emulator:3000 matrix: version: [latest] diff --git a/src/sinks/gcp/chronicle_unstructured.rs b/src/sinks/gcp/chronicle_unstructured.rs index 3f7b3d4494d25..89a8d7df189e4 100644 --- a/src/sinks/gcp/chronicle_unstructured.rs +++ b/src/sinks/gcp/chronicle_unstructured.rs @@ -546,12 +546,10 @@ mod integration_tests { trace_init(); let log_type = random_string(10); - let (sink, healthcheck) = config_build( - &log_type, - "/home/vector/scripts/integration/chronicle/auth.json", - ) - .await - .expect("Building sink failed"); + let (sink, healthcheck) = + config_build(&log_type, "/home/vector/scripts/integration/gcp/auth.json") + .await + .expect("Building sink failed"); healthcheck.await.expect("Health check failed"); @@ -581,7 +579,7 @@ mod integration_tests { // Test with an auth file that doesnt match the public key sent to the dummy chronicle server. let sink = config_build( &log_type, - "/home/vector/scripts/integration/chronicle/invalidauth.json", + "/home/vector/scripts/integration/gcp/invalidauth.json", ) .await; @@ -595,12 +593,10 @@ mod integration_tests { // The chronicle-emulator we are testing against is setup so a `log_type` of "INVALID" // will return a `400 BAD_REQUEST`. let log_type = "INVALID"; - let (sink, healthcheck) = config_build( - log_type, - "/home/vector/scripts/integration/chronicle/auth.json", - ) - .await - .expect("Building sink failed"); + let (sink, healthcheck) = + config_build(log_type, "/home/vector/scripts/integration/gcp/auth.json") + .await + .expect("Building sink failed"); healthcheck.await.expect("Health check failed"); From e9672485e2ff82af6281a1be8720283534a52cf3 Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 14:11:51 -0600 Subject: [PATCH 02/33] vdev changes to allow option to not remove runner image --- vdev/src/commands/integration/start.rs | 2 +- vdev/src/commands/integration/stop.rs | 2 +- vdev/src/commands/integration/test.rs | 14 ++++++-- vdev/src/testing/integration.rs | 32 ++++++++++++++--- vdev/src/testing/runner.rs | 50 +++++++++++++++++--------- 5 files changed, 75 insertions(+), 25 deletions(-) diff --git a/vdev/src/commands/integration/start.rs b/vdev/src/commands/integration/start.rs index b697029d3dca9..63e4d51bcb59c 100644 --- a/vdev/src/commands/integration/start.rs +++ b/vdev/src/commands/integration/start.rs @@ -24,6 +24,6 @@ impl Cli { let env = envs.keys().next().expect("Integration has no environments"); env.clone() }; - IntegrationTest::new(self.integration, environment)?.start() + IntegrationTest::new(self.integration, environment, false)?.start() } } diff --git a/vdev/src/commands/integration/stop.rs b/vdev/src/commands/integration/stop.rs index 319c9d4643435..ac2081e5f2d71 100644 --- a/vdev/src/commands/integration/stop.rs +++ b/vdev/src/commands/integration/stop.rs @@ -14,7 +14,7 @@ pub struct Cli { impl Cli { pub fn exec(self) -> Result<()> { if let Some(active) = EnvsDir::new(&self.integration).active()? { - IntegrationTest::new(self.integration, active)?.stop() + IntegrationTest::new(self.integration, active, false)?.stop() } else { println!("No environment for {:?} is active.", self.integration); Ok(()) diff --git a/vdev/src/commands/integration/test.rs b/vdev/src/commands/integration/test.rs index 459224183973b..edafd11f6ca62 100644 --- a/vdev/src/commands/integration/test.rs +++ b/vdev/src/commands/integration/test.rs @@ -20,6 +20,10 @@ pub struct Cli { /// The desired environment (optional) environment: Option, + /// Whether to compile the test runner with all integration test features + #[arg(short = 'a', long)] + all: bool, + /// Extra test command arguments args: Vec, } @@ -30,17 +34,21 @@ impl Cli { let envs = config.environments(); let active = EnvsDir::new(&self.integration).active()?; + match (self.environment, active) { (Some(environment), Some(active)) if environment != active => { bail!("Requested environment {environment:?} does not match active one {active:?}") } (Some(environment), _) => { - IntegrationTest::new(self.integration, environment)?.test(self.args) + IntegrationTest::new(self.integration, environment, self.all)?.test(self.args) + } + (None, Some(active)) => { + IntegrationTest::new(self.integration, active, self.all)?.test(self.args) } - (None, Some(active)) => IntegrationTest::new(self.integration, active)?.test(self.args), (None, None) => { for env_name in envs.keys() { - IntegrationTest::new(&self.integration, env_name)?.test(self.args.clone())?; + IntegrationTest::new(&self.integration, env_name, self.all)? + .test(self.args.clone())?; } Ok(()) } diff --git a/vdev/src/testing/integration.rs b/vdev/src/testing/integration.rs index ecac804a98842..d4076e5bc41d3 100644 --- a/vdev/src/testing/integration.rs +++ b/vdev/src/testing/integration.rs @@ -6,7 +6,8 @@ use tempfile::{Builder, NamedTempFile}; use super::config::ComposeConfig; use super::config::{Environment, IntegrationTestConfig}; use super::runner::{ - ContainerTestRunner as _, IntegrationTestRunner, TestRunner as _, CONTAINER_TOOL, DOCKER_SOCKET, + full_runner_available, ContainerTestRunner as _, IntegrationTestRunner, TestRunner as _, + CONTAINER_TOOL, DOCKER_SOCKET, }; use super::state::EnvsDir; use crate::app::CommandExt as _; @@ -21,10 +22,15 @@ pub struct IntegrationTest { runner: IntegrationTestRunner, compose: Option, env_config: Environment, + all: bool, } impl IntegrationTest { - pub fn new(integration: impl Into, environment: impl Into) -> Result { + pub fn new( + integration: impl Into, + environment: impl Into, + all: bool, + ) -> Result { let integration = integration.into(); let environment = environment.into(); let (test_dir, config) = IntegrationTestConfig::load(&integration)?; @@ -34,8 +40,15 @@ impl IntegrationTest { }; let network_name = format!("vector-integration-tests-{integration}"); let compose = Compose::new(test_dir, env_config.clone(), network_name.clone())?; + + let full_runner_avail = full_runner_available()?; + + let runner_name = (!full_runner_avail) + .then(|| (!all).then(|| integration.clone())) + .flatten(); + let runner = IntegrationTestRunner::new( - integration.clone(), + runner_name, &config.runner, compose.is_some().then_some(network_name), )?; @@ -48,6 +61,9 @@ impl IntegrationTest { runner, compose, env_config, + // no need to recompile a specific context for a single integration test feature if we've already got a context + // with all of the int test features pre compiled. + all: all || full_runner_avail, }) } @@ -69,7 +85,12 @@ impl IntegrationTest { let mut args = self.config.args.clone().unwrap_or_default(); args.push("--features".to_string()); - args.push(self.config.features.join(",")); + + if self.all { + args.push("all-integration-tests".to_string()); + } else { + args.push(self.config.features.join(",")); + } // If the test field is not present then use the --lib flag match self.config.test { @@ -91,6 +112,9 @@ impl IntegrationTest { args.push("--no-capture".to_string()); } + args.push("--retries".to_string()); + args.push("4".to_string()); + self.runner .test(&env_vars, &self.config.runner.env, &args)?; diff --git a/vdev/src/testing/runner.rs b/vdev/src/testing/runner.rs index 566eaa268f453..b1376bd39c364 100644 --- a/vdev/src/testing/runner.rs +++ b/vdev/src/testing/runner.rs @@ -47,6 +47,29 @@ fn detect_container_tool() -> OsString { fatal!("No container tool could be detected."); } +fn get_rust_version() -> String { + match RustToolchainConfig::parse() { + Ok(config) => config.channel, + Err(error) => fatal!("Could not read `rust-toolchain.toml` file: {error}"), + } +} + +/// True if a docker image exists that has all of the integration tests +/// features compiled. +pub fn full_runner_available() -> Result { + let mut command = dockercmd([ + "image", + "ls", + &format!("vector-test-runner-{}", get_rust_version()), + ]); + + // $ docker image ls vector-test-runner-1.69.0 + // REPOSITORY TAG IMAGE ID CREATED SIZE + // vector-test-runner-1.69.0 latest 7e5e70a96428 13 days ago 1.76GB + + Ok(command.check_output()?.lines().count() == 2) +} + fn dockercmd>(args: impl IntoIterator) -> Command { let mut command = Command::new(&*CONTAINER_TOOL); command.args(args); @@ -93,13 +116,6 @@ pub trait ContainerTestRunner: TestRunner { .wait(format!("Stopping container {}", self.container_name())) } - fn get_rust_version(&self) -> String { - match RustToolchainConfig::parse() { - Ok(config) => config.channel, - Err(error) => fatal!("Could not read `rust-toolchain.toml` file: {error}"), - } - } - fn state(&self) -> Result { let mut command = dockercmd(["ps", "-a", "--format", "{{.Names}} {{.State}}"]); let container_name = self.container_name(); @@ -183,8 +199,10 @@ pub trait ContainerTestRunner: TestRunner { &self.image_name(), "--file", dockerfile.to_str().unwrap(), + "--label", + "vector-test-runner=true", "--build-arg", - &format!("RUST_VERSION={}", self.get_rust_version()), + &format!("RUST_VERSION={}", get_rust_version()), ".", ]); @@ -295,7 +313,7 @@ where } pub(super) struct IntegrationTestRunner { - integration: String, + integration: Option, needs_docker_socket: bool, network: Option, volumes: Vec, @@ -303,7 +321,7 @@ pub(super) struct IntegrationTestRunner { impl IntegrationTestRunner { pub(super) fn new( - integration: String, + integration: Option, config: &IntegrationRunnerConfig, network: Option, ) -> Result { @@ -344,11 +362,11 @@ impl ContainerTestRunner for IntegrationTestRunner { } fn container_name(&self) -> String { - format!( - "vector-test-runner-{}-{}", - self.integration, - self.get_rust_version() - ) + if let Some(integration) = self.integration.as_ref() { + format!("vector-test-runner-{}-{}", integration, get_rust_version()) + } else { + format!("vector-test-runner-{}", get_rust_version()) + } } fn image_name(&self) -> String { @@ -372,7 +390,7 @@ impl ContainerTestRunner for DockerTestRunner { } fn container_name(&self) -> String { - format!("vector-test-runner-{}", self.get_rust_version()) + format!("vector-test-runner-{}", get_rust_version()) } fn image_name(&self) -> String { From cd2f0fffa27bf0274e1f47d0cf966d5baf74b1a1 Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 14:32:38 -0600 Subject: [PATCH 03/33] changes to integration test suite workflow to save on building runner each time --- .github/workflows/integration.yml | 408 ++++++++++++++++++++++++------ 1 file changed, 325 insertions(+), 83 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 898d4c6f4a649..566a21b6a4453 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -22,6 +22,9 @@ env: CONTAINER_TOOL: "docker" DD_ENV: "ci" DD_API_KEY: ${{ secrets.DD_API_KEY }} + TEST_DATADOG_API_KEY: ${{ secrets.CI_TEST_DATADOG_API_KEY }} + TEST_APPSIGNAL_PUSH_API_KEY: ${{ secrets.TEST_APPSIGNAL_PUSH_API_KEY }} + AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }} RUST_BACKTRACE: full TEST_LOG: vector=debug VERBOSE: true @@ -40,94 +43,333 @@ jobs: head_ref: ${{ github.event.pull_request.head.ref }} secrets: inherit - # Calls the Integration Test workflow for each integration that was detected to have files changed that impact it. - integration-matrix: - uses: ./.github/workflows/integration-test.yml - with: - if: ${{ matrix.run.if }} - test_name: ${{ matrix.run.test_name }} - secrets: inherit + integration-tests: + name: Integration Tests + runs-on: [linux, ubuntu-20.04-8core] needs: changes - strategy: - fail-fast: false - matrix: - run: - - test_name: 'amqp' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.amqp == 'true' }} - - test_name: 'appsignal' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.appsignal == 'true' }} - - test_name: 'aws' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.aws == 'true' }} - - test_name: 'axiom' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.axiom == 'true' }} - - test_name: 'azure' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.azure == 'true' }} - - test_name: 'clickhouse' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.clickhouse == 'true' }} - - test_name: 'databend' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.databend == 'true' }} - - test_name: 'datadog-agent' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} - - test_name: 'datadog-logs' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} - - test_name: 'datadog-metrics' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} - - test_name: 'datadog-traces' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} - - test_name: 'dnstap' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.dnstap == 'true' }} - - test_name: 'docker-logs' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.docker-logs == 'true' }} - - test_name: 'elasticsearch' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.elasticsearch == 'true' }} - - test_name: 'eventstoredb' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.eventstoredb == 'true' }} - - test_name: 'fluent' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.fluent == 'true' }} - - test_name: 'gcp' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.gcp == 'true' }} - - test_name: 'humio' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.humio == 'true' }} - - test_name: 'http-client' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.http-client == 'true' }} - - test_name: 'influxdb' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.influxdb == 'true' }} - - test_name: 'kafka' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.kafka == 'true' }} - - test_name: 'logstash' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.logstash == 'true' }} - - test_name: 'loki' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.loki == 'true' }} - - test_name: 'mongodb' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.mongodb == 'true' }} - - test_name: 'nats' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.nats == 'true' }} - - test_name: 'nginx' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.nginx == 'true' }} - - test_name: 'opentelemetry' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.opentelemetry == 'true' }} - - test_name: 'postgres' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.postgres == 'true' }} - - test_name: 'prometheus' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.prometheus == 'true' }} - - test_name: 'pulsar' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.pulsar == 'true' }} - - test_name: 'redis' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.redis == 'true' }} - - test_name: 'shutdown' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' }} - - test_name: 'splunk' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.splunk == 'true' }} - - test_name: 'webhdfs' - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.webhdfs == 'true' }} - - # This is a required status check, so it always needs to run if prior jobs failed, in order to mark the status correctly. - integration: + if: | + github.event_name == 'merge_group' || ( + needs.changes.outputs.int-all == 'true' + || needs.changes.outputs.amqp == 'true' + || needs.changes.outputs.appsignal == 'true' + || needs.changes.outputs.aws == 'true' + || needs.changes.outputs.axiom == 'true' + || needs.changes.outputs.azure == 'true' + || needs.changes.outputs.clickhouse == 'true' + || needs.changes.outputs.databend == 'true' + || needs.changes.outputs.datadog == 'true' + || needs.changes.outputs.dnstap == 'true' + || needs.changes.outputs.docker-logs == 'true' + || needs.changes.outputs.elasticsearch == 'true' + || needs.changes.outputs.eventstoredb == 'true' + || needs.changes.outputs.fluent == 'true' + || needs.changes.outputs.gcp == 'true' + || needs.changes.outputs.humio == 'true' + || needs.changes.outputs.http-client == 'true' + || needs.changes.outputs.influxdb == 'true' + || needs.changes.outputs.kafka == 'true' + || needs.changes.outputs.logstash == 'true' + || needs.changes.outputs.loki == 'true' + || needs.changes.outputs.mongodb == 'true' + || needs.changes.outputs.nats == 'true' + || needs.changes.outputs.nginx == 'true' + || needs.changes.outputs.opentelemetry == 'true' + || needs.changes.outputs.postgres == 'true' + || needs.changes.outputs.prometheus == 'true' + || needs.changes.outputs.pulsar == 'true' + || needs.changes.outputs.redis == 'true' + || needs.changes.outputs.splunk == 'true' + || needs.changes.outputs.webhdfs == 'true' + ) + timeout-minutes: 60 + steps: + - uses: actions/checkout@v3 + + - run: sudo npm -g install @datadog/datadog-ci + + - run: docker image prune -af ; docker container prune -f + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.amqp == 'true' }} + name: amqp + uses: nick-fields/retry@v2 + with: + timeout_minutes: 25 + max_attempts: 3 + retry_on: error + command: cargo vdev -v int start amqp ; sleep 10 ; cargo vdev -v int test -a amqp ; RET=$? ; cargo vdev -v int stop amqp ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.appsignal == 'true' }} + name: appsignal + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_on: error + command: cargo vdev -v int start appsignal ; sleep 10 ; cargo vdev -v int test -a appsignal ; RET=$? ; cargo vdev -v int stop appsignal ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.aws == 'true' }} + name: aws + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_on: error + command: cargo vdev -v int start aws ; sleep 10 ; cargo vdev -v int test -a aws ; RET=$? ; cargo vdev -v int stop aws ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.axiom == 'true' }} + name: axiom + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_on: error + command: cargo vdev -v int start axiom ; sleep 10 ; cargo vdev -v int test -a axiom ; RET=$? ; cargo vdev -v int stop axiom ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.azure == 'true' }} + name: azure + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start azure ; sleep 10 ; cargo vdev -v int test -a azure ; RET=$? ; cargo vdev -v int stop azure ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.clickhouse == 'true' }} + name: clickhouse + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start clickhouse ; sleep 10 ; cargo vdev -v int test -a clickhouse ; RET=$? ; cargo vdev -v int stop clickhouse ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.databend == 'true' }} + name: databend + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start databend ; sleep 10 ; cargo vdev -v int test -a databend ; RET=$? ; cargo vdev -v int stop databend ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} + name: datadog-agent + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start datadog-agent ; sleep 10 ; cargo vdev -v int test -a datadog-agent ; RET=$? ; cargo vdev -v int stop datadog-agent ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} + name: datadog-logs + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start datadog-logs ; sleep 10 ; cargo vdev -v int test -a datadog-logs ; RET=$? ; cargo vdev -v int stop datadog-logs ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} + name: datadog-metrics + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start datadog-metrics ; sleep 10 ; cargo vdev -v int test -a datadog-metrics ; RET=$? ; cargo vdev -v int stop datadog-metrics ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} + name: datadog-traces + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start datadog-traces ; sleep 10 ; cargo vdev -v int test -a datadog-traces ; RET=$? ; cargo vdev -v int stop datadog-traces ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.dnstap == 'true' }} + name: dnstap + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start dnstap ; sleep 10 ; cargo vdev -v int test -a dnstap ; RET=$? ; cargo vdev -v int stop dnstap ; exit $RET + + - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.docker-logs == 'true' }} + name: docker-logs + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start docker-logs ; sleep 10 ; cargo vdev -v int test -a docker-logs ; RET=$? ; cargo vdev -v int stop docker-logs ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.elasticsearch == 'true' }} + name: elasticsearch + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start elasticsearch ; sleep 10 ; cargo vdev -v int test -a elasticsearch ; RET=$? ; cargo vdev -v int stop elasticsearch ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.eventstoredb == 'true' }} + name: eventstoredb + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start eventstoredb ; sleep 10 ; cargo vdev -v int test -a eventstoredb ; RET=$? ; cargo vdev -v int stop eventstoredb ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.fluent == 'true' }} + name: fluent + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start fluent ; sleep 10 ; cargo vdev -v int test -a fluent ; RET=$? ; cargo vdev -v int stop fluent ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.gcp == 'true' }} + name: gcp + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start gcp ; sleep 10 ; cargo vdev -v int test -a gcp ; RET=$? ; cargo vdev -v int stop gcp ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.humio == 'true' }} + name: humio + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start humio ; sleep 10 ; cargo vdev -v int test -a humio ; RET=$? ; cargo vdev -v int stop humio ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.http-client == 'true' }} + name: http-client + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start http-client ; sleep 10 ; cargo vdev -v int test -a http-client ; RET=$? ; cargo vdev -v int stop http-client ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.influxdb == 'true' }} + name: influxdb + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start influxdb ; sleep 10 ; cargo vdev -v int test -a influxdb ; RET=$? ; cargo vdev -v int stop influxdb ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.kafka == 'true' }} + name: kafka + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start kafka ; sleep 10 ; cargo vdev -v int test -a kafka ; RET=$? ; cargo vdev -v int stop kafka ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.logstash == 'true' }} + name: logstash + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start logstash ; sleep 10 ; cargo vdev -v int test -a logstash ; RET=$? ; cargo vdev -v int stop logstash ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.loki == 'true' }} + name: loki + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start loki ; sleep 10 ; cargo vdev -v int test -a loki ; RET=$? ; cargo vdev -v int stop loki ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.mongodb == 'true' }} + name: mongodb + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start mongodb ; sleep 10 ; cargo vdev -v int test -a mongodb ; RET=$? ; cargo vdev -v int stop mongodb ; exit $RET + + - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.nats == 'true' }} + name: nats + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start nats ; sleep 10 ; cargo vdev -v int test -a nats ; RET=$? ; cargo vdev -v int stop nats ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.nginx == 'true' }} + name: nginx + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start nginx ; sleep 10 ; cargo vdev -v int test -a nginx ; RET=$? ; cargo vdev -v int stop nginx ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.opentelemetry == 'true' }} + name: opentelemetry + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start opentelemetry ; sleep 10 ; cargo vdev -v int test -a opentelemetry ; RET=$? ; cargo vdev -v int stop opentelemetry ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.postgres == 'true' }} + name: postgres + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start postgres ; sleep 10 ; cargo vdev -v int test -a postgres ; RET=$? ; cargo vdev -v int stop postgres ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.prometheus == 'true' }} + name: prometheus + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start prometheus ; sleep 10 ; cargo vdev -v int test -a prometheus ; RET=$? ; cargo vdev -v int stop prometheus ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.pulsar == 'true' }} + name: pulsar + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start pulsar ; sleep 10 ; cargo vdev -v int test -a pulsar ; RET=$? ; cargo vdev -v int stop pulsar ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.redis == 'true' }} + name: redis + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start redis ; sleep 10 ; cargo vdev -v int test -a redis ; RET=$? ; cargo vdev -v int stop redis ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' }} + name: shutdown + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start shutdown ; sleep 10 ; cargo vdev -v int test -a shutdown ; RET=$? ; cargo vdev -v int stop shutdown ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.splunk == 'true' }} + name: splunk + uses: nick-fields/retry@v2 + with: + timeout_minutes: 7 + max_attempts: 3 + command: cargo vdev -v int start splunk ; sleep 10 ; cargo vdev -v int test -a splunk ; RET=$? ; cargo vdev -v int stop splunk ; exit $RET + + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.webhdfs == 'true' }} + name: webhdfs + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start webhdfs ; sleep 10 ; cargo vdev -v int test -a webhdfs ; RET=$? ; cargo vdev -v int stop webhdfs ; exit $RET + + integration-test-suite: name: Integration Test Suite runs-on: ubuntu-latest if: always() needs: - - integration-matrix + - integration-tests env: FAILED: ${{ contains(needs.*.result, 'failure') }} steps: From 1e2892b815609ebf1228774c79baef067c0ef99e Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 15:20:27 -0600 Subject: [PATCH 04/33] combine build steps for integration comment workflow --- .github/workflows/integration-comment.yml | 364 +++++++++++++++++----- 1 file changed, 287 insertions(+), 77 deletions(-) diff --git a/.github/workflows/integration-comment.yml b/.github/workflows/integration-comment.yml index 629278ff95c20..bf11b72d448b9 100644 --- a/.github/workflows/integration-comment.yml +++ b/.github/workflows/integration-comment.yml @@ -66,84 +66,294 @@ jobs: status: pending test-integration: - uses: ./.github/workflows/integration-test.yml - with: - if: ${{ matrix.run.if }} - test_name: ${{ matrix.run.test_name }} needs: prep-pr - secrets: inherit - strategy: - fail-fast: false - matrix: - run: - - test_name: 'amqp' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-amqp') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'appsignal' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-appsignal') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'aws' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-aws') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'axiom' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-axiom') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'azure' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-azure') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'clickhouse' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-clickhouse') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'databend' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-databend') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'datadog-agent' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'datadog-logs' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'datadog-metrics' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'datadog-traces' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'dnstap' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-dnstap') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'docker-logs' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-docker-logs') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'elasticsearch' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-elasticsearch') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'eventstoredb' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-eventstoredb') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'fluent' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-fluent') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'gcp' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-gcp') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'humio' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-humio') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'http-client' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-http-client') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'influxdb' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-influxdb') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'kafka' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-kafka') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'logstash' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-logstash') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'loki' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-loki') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'mongodb' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-mongodb') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'nats' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-nats') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'nginx' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-nginx') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'opentelemetry' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-opentelemetry') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'postgres' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-postgres') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'prometheus' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-prometheus') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'pulsar' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-pulsar') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'redis' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-redis') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'shutdown' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-shutdown') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'splunk' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-splunk') || contains(github.event.comment.body, '/ci-run-all') }} - - test_name: 'webhdfs' - if: ${{ contains(github.event.comment.body, '/ci-run-integration-webhdfs') || contains(github.event.comment.body, '/ci-run-all') }} + runs-on: [linux, ubuntu-20.04-8core] + steps: + - uses: actions/checkout@v3 + + - run: sudo npm -g install @datadog/datadog-ci + + - run: docker image prune -af ; docker container prune -f + + - name: amqp + if: ${{ contains(github.event.comment.body, '/ci-run-integration-amqp') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 25 + max_attempts: 3 + retry_on: error + command: cargo vdev -v int start amqp ; sleep 10 ; cargo vdev -v int test -a amqp ; cargo vdev -v int stop amqp + + - name: appsignal + if: ${{ contains(github.event.comment.body, '/ci-run-integration-appsignal') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 25 + max_attempts: 3 + retry_on: error + command: cargo vdev -v int start appsignal ; sleep 10 ; cargo vdev -v int test -a appsignal ; cargo vdev -v int stop appsignal + + - name: aws + if: ${{ contains(github.event.comment.body, '/ci-run-integration-aws') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_on: error + command: cargo vdev -v int start aws ; sleep 10 ; cargo vdev -v int test -a aws ; RET=$? ; cargo vdev -v int stop aws ; exit $RET + + - name: axiom + if: ${{ contains(github.event.comment.body, '/ci-run-integration-axiom') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_on: error + command: cargo vdev -v int start axiom ; sleep 10 ; cargo vdev -v int test -a axiom ; RET=$? ; cargo vdev -v int stop axiom ; exit $RET + + - name: azure + if: ${{ contains(github.event.comment.body, '/ci-run-integration-azure') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start azure ; sleep 10 ; cargo vdev -v int test -a azure ; RET=$? ; cargo vdev -v int stop azure ; exit $RET + + - name: clickhouse + if: ${{ contains(github.event.comment.body, '/ci-run-integration-clickhouse') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start clickhouse ; sleep 10 ; cargo vdev -v int test -a clickhouse ; RET=$? ; cargo vdev -v int stop clickhouse ; exit $RET + + - name: databend + if: ${{ contains(github.event.comment.body, '/ci-run-integration-databeng') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start databend ; sleep 10 ; cargo vdev -v int test -a databend ; RET=$? ; cargo vdev -v int stop databend ; exit $RET + + - name: datadog-agent + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start datadog-agent ; sleep 10 ; cargo vdev -v int test -a datadog-agent ; RET=$? ; cargo vdev -v int stop datadog-agent ; exit $RET + + - name: datadog-logs + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start datadog-logs ; sleep 10 ; cargo vdev -v int test -a datadog-logs ; RET=$? ; cargo vdev -v int stop datadog-logs ; exit $RET + + - name: datadog-metrics + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start datadog-metrics ; sleep 10 ; cargo vdev -v int test -a datadog-metrics ; RET=$? ; cargo vdev -v int stop datadog-metrics ; exit $RET + + - name: datadog-traces + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start datadog-traces ; sleep 10 ; cargo vdev -v int test -a datadog-traces ; RET=$? ; cargo vdev -v int stop datadog-traces ; exit $RET + + - name: dnstap + if: ${{ contains(github.event.comment.body, '/ci-run-integration-dnstap') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start dnstap ; sleep 10 ; cargo vdev -v int test -a dnstap ; RET=$? ; cargo vdev -v int stop dnstap ; exit $RET + + - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f + + - name: docker-logs + if: ${{ contains(github.event.comment.body, '/ci-run-integration-docker-logs') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start docker-logs ; sleep 10 ; cargo vdev -v int test -a docker-logs ; RET=$? ; cargo vdev -v int stop docker-logs ; exit $RET + + - name: elasticsearch + if: ${{ contains(github.event.comment.body, '/ci-run-integration-elasticsearch') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start elasticsearch ; sleep 10 ; cargo vdev -v int test -a elasticsearch ; RET=$? ; cargo vdev -v int stop elasticsearch ; exit $RET + + - name: eventstoredb + if: ${{ contains(github.event.comment.body, '/ci-run-integration-eventstoredb') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start eventstoredb ; sleep 10 ; cargo vdev -v int test -a eventstoredb ; RET=$? ; cargo vdev -v int stop eventstoredb ; exit $RET + + - name: fluent + if: ${{ contains(github.event.comment.body, '/ci-run-integration-fluent') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start fluent ; sleep 10 ; cargo vdev -v int test -a fluent ; RET=$? ; cargo vdev -v int stop fluent ; exit $RET + + - name: gcp + if: ${{ contains(github.event.comment.body, '/ci-run-integration-gcp') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start gcp ; sleep 10 ; cargo vdev -v int test -a gcp ; RET=$? ; cargo vdev -v int stop gcp ; exit $RET + + - name: humio + if: ${{ contains(github.event.comment.body, '/ci-run-integration-humio') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start humio ; sleep 10 ; cargo vdev -v int test -a humio ; RET=$? ; cargo vdev -v int stop humio ; exit $RET + + - name: http-client + if: ${{ contains(github.event.comment.body, '/ci-run-integration-http-client') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start http-client ; sleep 10 ; cargo vdev -v int test -a http-client ; RET=$? ; cargo vdev -v int stop http-client ; exit $RET + + - name: influxdb + if: ${{ contains(github.event.comment.body, '/ci-run-integration-influxdb') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start influxdb ; sleep 10 ; cargo vdev -v int test -a influxdb ; RET=$? ; cargo vdev -v int stop influxdb ; exit $RET + + - name: kafka + if: ${{ contains(github.event.comment.body, '/ci-run-integration-kafka') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start kafka ; sleep 10 ; cargo vdev -v int test -a kafka ; RET=$? ; cargo vdev -v int stop kafka ; exit $RET + + - name: logstash + if: ${{ contains(github.event.comment.body, '/ci-run-integration-logstash') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start logstash ; sleep 10 ; cargo vdev -v int test -a logstash ; RET=$? ; cargo vdev -v int stop logstash ; exit $RET + + - name: loki + if: ${{ contains(github.event.comment.body, '/ci-run-integration-loki') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start loki ; sleep 10 ; cargo vdev -v int test -a loki ; RET=$? ; cargo vdev -v int stop loki ; exit $RET + + - name: mongodb + if: ${{ contains(github.event.comment.body, '/ci-run-integration-mongodb') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start mongodb ; sleep 10 ; cargo vdev -v int test -a mongodb ; RET=$? ; cargo vdev -v int stop mongodb ; exit $RET + + - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f + + - name: nats + if: ${{ contains(github.event.comment.body, '/ci-run-integration-nats') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start nats ; sleep 10 ; cargo vdev -v int test -a nats ; RET=$? ; cargo vdev -v int stop nats ; exit $RET + + - name: nginx + if: ${{ contains(github.event.comment.body, '/ci-run-integration-nginx') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start nginx ; sleep 10 ; cargo vdev -v int test -a nginx ; RET=$? ; cargo vdev -v int stop nginx ; exit $RET + + - name: opentelemetry + if: ${{ contains(github.event.comment.body, '/ci-run-integration-opentelemetry') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start opentelemetry ; sleep 10 ; cargo vdev -v int test -a opentelemetry ; RET=$? ; cargo vdev -v int stop opentelemetry ; exit $RET + + - name: postgres + if: ${{ contains(github.event.comment.body, '/ci-run-integration-postgres') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start postgres ; sleep 10 ; cargo vdev -v int test -a postgres ; RET=$? ; cargo vdev -v int stop postgres ; exit $RET + + - name: prometheus + if: ${{ contains(github.event.comment.body, '/ci-run-integration-prometheus') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start prometheus ; sleep 10 ; cargo vdev -v int test -a prometheus ; RET=$? ; cargo vdev -v int stop prometheus ; exit $RET + + - name: pulsar + if: ${{ contains(github.event.comment.body, '/ci-run-integration-pulsar') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start pulsar ; sleep 10 ; cargo vdev -v int test -a pulsar ; RET=$? ; cargo vdev -v int stop pulsar ; exit $RET + + - name: redis + if: ${{ contains(github.event.comment.body, '/ci-run-integration-redis') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start redis ; sleep 10 ; cargo vdev -v int test -a redis ; RET=$? ; cargo vdev -v int stop redis ; exit $RET + + - name: shutdown + if: ${{ contains(github.event.comment.body, '/ci-run-integration-shutdown') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start shutdown ; sleep 10 ; cargo vdev -v int test -a shutdown ; RET=$? ; cargo vdev -v int stop shutdown ; exit $RET + + - name: splunk + if: ${{ contains(github.event.comment.body, '/ci-run-integration-splunk') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 7 + max_attempts: 3 + command: cargo vdev -v int start splunk ; sleep 10 ; cargo vdev -v int test -a splunk ; RET=$? ; cargo vdev -v int stop splunk ; exit $RET + + - name: webhdfs + if: ${{ contains(github.event.comment.body, '/ci-run-integration-webhdfs') || contains(github.event.comment.body, '/ci-run-all') }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: cargo vdev -v int start webhdfs ; sleep 10 ; cargo vdev -v int test -a webhdfs ; RET=$? ; cargo vdev -v int stop webhdfs ; exit $RET update-pr-status: name: Signal result to PR From 3afaf282abcbbc714d2cbb6fe383cc0976f2858d Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 15:29:05 -0600 Subject: [PATCH 05/33] update called workflow --- .github/workflows/integration-test.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 36c563732c417..b4fb77a21481e 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -1,22 +1,12 @@ -# This workflow is used to run an integration test. -# The most common use case is that it is triggered by another workflow, -# such as the Master Merge Queue Suite, or the Integration Comment. +# Integration Test # -# It can also be triggered on manual dispatch in CI however. -# In that use case, an input for the test name needs to be provided. +# This workflow is used to run an integration test on demand. +# An input for the test name needs to be provided. # TODO: check if the input is "all" , and run all, without a timeout? name: Integration Test on: - workflow_call: - inputs: - if: - required: false - type: boolean - test_name: - required: true - type: string workflow_dispatch: inputs: test_name: From 4cc1dbf02ba59c9bc86cfe23f83be814df6f199f Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 15:30:16 -0600 Subject: [PATCH 06/33] upload test results --- .github/workflows/integration-comment.yml | 4 ++++ .github/workflows/integration.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/integration-comment.yml b/.github/workflows/integration-comment.yml index bf11b72d448b9..ba6bb09334f91 100644 --- a/.github/workflows/integration-comment.yml +++ b/.github/workflows/integration-comment.yml @@ -355,6 +355,10 @@ jobs: max_attempts: 3 command: cargo vdev -v int start webhdfs ; sleep 10 ; cargo vdev -v int test -a webhdfs ; RET=$? ; cargo vdev -v int stop webhdfs ; exit $RET + - name: Upload test results + run: scripts/upload-test-results.sh + if: always() + update-pr-status: name: Signal result to PR runs-on: ubuntu-latest diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 566a21b6a4453..887e0cec96796 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -364,6 +364,10 @@ jobs: max_attempts: 3 command: cargo vdev -v int start webhdfs ; sleep 10 ; cargo vdev -v int test -a webhdfs ; RET=$? ; cargo vdev -v int stop webhdfs ; exit $RET + - name: Upload test results + run: scripts/upload-test-results.sh + if: always() + integration-test-suite: name: Integration Test Suite runs-on: ubuntu-latest From 7da25200618fd402a82a7307c7681ae398f03f3f Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 15:42:31 -0600 Subject: [PATCH 07/33] copy pasta --- .github/workflows/integration.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 887e0cec96796..6ad5da92d823b 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -143,6 +143,7 @@ jobs: - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.databend == 'true' }} name: databend + uses: nick-fields/retry@v2 with: timeout_minutes: 5 max_attempts: 3 @@ -150,6 +151,7 @@ jobs: - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-agent + uses: nick-fields/retry@v2 with: timeout_minutes: 5 max_attempts: 3 @@ -157,6 +159,7 @@ jobs: - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-logs + uses: nick-fields/retry@v2 with: timeout_minutes: 5 max_attempts: 3 @@ -164,6 +167,7 @@ jobs: - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-metrics + uses: nick-fields/retry@v2 with: timeout_minutes: 5 max_attempts: 3 @@ -171,6 +175,7 @@ jobs: - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-traces + uses: nick-fields/retry@v2 with: timeout_minutes: 5 max_attempts: 3 From bb43805eef8a209051e0e49e753e60fedd8048a2 Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 15:46:25 -0600 Subject: [PATCH 08/33] typo --- .github/workflows/integration-comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-comment.yml b/.github/workflows/integration-comment.yml index ba6bb09334f91..f8f34c3ffde2e 100644 --- a/.github/workflows/integration-comment.yml +++ b/.github/workflows/integration-comment.yml @@ -128,7 +128,7 @@ jobs: command: cargo vdev -v int start clickhouse ; sleep 10 ; cargo vdev -v int test -a clickhouse ; RET=$? ; cargo vdev -v int stop clickhouse ; exit $RET - name: databend - if: ${{ contains(github.event.comment.body, '/ci-run-integration-databeng') || contains(github.event.comment.body, '/ci-run-all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-databend') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: timeout_minutes: 5 From 3b7bdff2cea796f66df877d6ed8ea7058fe30dfc Mon Sep 17 00:00:00 2001 From: neuronull Date: Thu, 22 Jun 2023 17:10:17 -0600 Subject: [PATCH 09/33] oopsie --- .github/workflows/integration.yml | 72 +++++++++++++++---------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 6ad5da92d823b..8b35269251d76 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -13,7 +13,7 @@ on: concurrency: # `github.event.number` exists for pull requests, otherwise fall back to SHA for merge queue - group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }} + group: ${{ github.workflow }}-${{ github.59cd306e5 event.number || github.event.merge_group.head_sha }} cancel-in-progress: true env: @@ -49,7 +49,7 @@ jobs: needs: changes if: | github.event_name == 'merge_group' || ( - needs.changes.outputs.int-all == 'true' + needs.changes.outputs.all-int == 'true' || needs.changes.outputs.amqp == 'true' || needs.changes.outputs.appsignal == 'true' || needs.changes.outputs.aws == 'true' @@ -89,7 +89,7 @@ jobs: - run: docker image prune -af ; docker container prune -f - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.amqp == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.amqp == 'true' }} name: amqp uses: nick-fields/retry@v2 with: @@ -98,7 +98,7 @@ jobs: retry_on: error command: cargo vdev -v int start amqp ; sleep 10 ; cargo vdev -v int test -a amqp ; RET=$? ; cargo vdev -v int stop amqp ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.appsignal == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.appsignal == 'true' }} name: appsignal uses: nick-fields/retry@v2 with: @@ -107,7 +107,7 @@ jobs: retry_on: error command: cargo vdev -v int start appsignal ; sleep 10 ; cargo vdev -v int test -a appsignal ; RET=$? ; cargo vdev -v int stop appsignal ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.aws == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.aws == 'true' }} name: aws uses: nick-fields/retry@v2 with: @@ -116,7 +116,7 @@ jobs: retry_on: error command: cargo vdev -v int start aws ; sleep 10 ; cargo vdev -v int test -a aws ; RET=$? ; cargo vdev -v int stop aws ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.axiom == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.axiom == 'true' }} name: axiom uses: nick-fields/retry@v2 with: @@ -125,7 +125,7 @@ jobs: retry_on: error command: cargo vdev -v int start axiom ; sleep 10 ; cargo vdev -v int test -a axiom ; RET=$? ; cargo vdev -v int stop axiom ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.azure == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.azure == 'true' }} name: azure uses: nick-fields/retry@v2 with: @@ -133,7 +133,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start azure ; sleep 10 ; cargo vdev -v int test -a azure ; RET=$? ; cargo vdev -v int stop azure ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.clickhouse == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.clickhouse == 'true' }} name: clickhouse uses: nick-fields/retry@v2 with: @@ -141,7 +141,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start clickhouse ; sleep 10 ; cargo vdev -v int test -a clickhouse ; RET=$? ; cargo vdev -v int stop clickhouse ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.databend == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.databend == 'true' }} name: databend uses: nick-fields/retry@v2 with: @@ -149,7 +149,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start databend ; sleep 10 ; cargo vdev -v int test -a databend ; RET=$? ; cargo vdev -v int stop databend ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-agent uses: nick-fields/retry@v2 with: @@ -157,7 +157,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start datadog-agent ; sleep 10 ; cargo vdev -v int test -a datadog-agent ; RET=$? ; cargo vdev -v int stop datadog-agent ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-logs uses: nick-fields/retry@v2 with: @@ -165,7 +165,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start datadog-logs ; sleep 10 ; cargo vdev -v int test -a datadog-logs ; RET=$? ; cargo vdev -v int stop datadog-logs ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-metrics uses: nick-fields/retry@v2 with: @@ -173,7 +173,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start datadog-metrics ; sleep 10 ; cargo vdev -v int test -a datadog-metrics ; RET=$? ; cargo vdev -v int stop datadog-metrics ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.datadog == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-traces uses: nick-fields/retry@v2 with: @@ -181,7 +181,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start datadog-traces ; sleep 10 ; cargo vdev -v int test -a datadog-traces ; RET=$? ; cargo vdev -v int stop datadog-traces ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.dnstap == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.dnstap == 'true' }} name: dnstap uses: nick-fields/retry@v2 with: @@ -191,7 +191,7 @@ jobs: - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.docker-logs == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.docker-logs == 'true' }} name: docker-logs uses: nick-fields/retry@v2 with: @@ -199,7 +199,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start docker-logs ; sleep 10 ; cargo vdev -v int test -a docker-logs ; RET=$? ; cargo vdev -v int stop docker-logs ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.elasticsearch == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.elasticsearch == 'true' }} name: elasticsearch uses: nick-fields/retry@v2 with: @@ -207,7 +207,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start elasticsearch ; sleep 10 ; cargo vdev -v int test -a elasticsearch ; RET=$? ; cargo vdev -v int stop elasticsearch ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.eventstoredb == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.eventstoredb == 'true' }} name: eventstoredb uses: nick-fields/retry@v2 with: @@ -215,7 +215,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start eventstoredb ; sleep 10 ; cargo vdev -v int test -a eventstoredb ; RET=$? ; cargo vdev -v int stop eventstoredb ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.fluent == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.fluent == 'true' }} name: fluent uses: nick-fields/retry@v2 with: @@ -223,7 +223,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start fluent ; sleep 10 ; cargo vdev -v int test -a fluent ; RET=$? ; cargo vdev -v int stop fluent ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.gcp == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.gcp == 'true' }} name: gcp uses: nick-fields/retry@v2 with: @@ -231,7 +231,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start gcp ; sleep 10 ; cargo vdev -v int test -a gcp ; RET=$? ; cargo vdev -v int stop gcp ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.humio == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.humio == 'true' }} name: humio uses: nick-fields/retry@v2 with: @@ -239,7 +239,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start humio ; sleep 10 ; cargo vdev -v int test -a humio ; RET=$? ; cargo vdev -v int stop humio ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.http-client == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.http-client == 'true' }} name: http-client uses: nick-fields/retry@v2 with: @@ -247,7 +247,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start http-client ; sleep 10 ; cargo vdev -v int test -a http-client ; RET=$? ; cargo vdev -v int stop http-client ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.influxdb == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.influxdb == 'true' }} name: influxdb uses: nick-fields/retry@v2 with: @@ -255,7 +255,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start influxdb ; sleep 10 ; cargo vdev -v int test -a influxdb ; RET=$? ; cargo vdev -v int stop influxdb ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.kafka == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.kafka == 'true' }} name: kafka uses: nick-fields/retry@v2 with: @@ -263,7 +263,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start kafka ; sleep 10 ; cargo vdev -v int test -a kafka ; RET=$? ; cargo vdev -v int stop kafka ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.logstash == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.logstash == 'true' }} name: logstash uses: nick-fields/retry@v2 with: @@ -271,7 +271,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start logstash ; sleep 10 ; cargo vdev -v int test -a logstash ; RET=$? ; cargo vdev -v int stop logstash ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.loki == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.loki == 'true' }} name: loki uses: nick-fields/retry@v2 with: @@ -279,7 +279,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start loki ; sleep 10 ; cargo vdev -v int test -a loki ; RET=$? ; cargo vdev -v int stop loki ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.mongodb == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.mongodb == 'true' }} name: mongodb uses: nick-fields/retry@v2 with: @@ -289,7 +289,7 @@ jobs: - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.nats == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.nats == 'true' }} name: nats uses: nick-fields/retry@v2 with: @@ -297,7 +297,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start nats ; sleep 10 ; cargo vdev -v int test -a nats ; RET=$? ; cargo vdev -v int stop nats ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.nginx == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.nginx == 'true' }} name: nginx uses: nick-fields/retry@v2 with: @@ -305,7 +305,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start nginx ; sleep 10 ; cargo vdev -v int test -a nginx ; RET=$? ; cargo vdev -v int stop nginx ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.opentelemetry == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.opentelemetry == 'true' }} name: opentelemetry uses: nick-fields/retry@v2 with: @@ -313,7 +313,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start opentelemetry ; sleep 10 ; cargo vdev -v int test -a opentelemetry ; RET=$? ; cargo vdev -v int stop opentelemetry ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.postgres == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.postgres == 'true' }} name: postgres uses: nick-fields/retry@v2 with: @@ -321,7 +321,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start postgres ; sleep 10 ; cargo vdev -v int test -a postgres ; RET=$? ; cargo vdev -v int stop postgres ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.prometheus == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.prometheus == 'true' }} name: prometheus uses: nick-fields/retry@v2 with: @@ -329,7 +329,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start prometheus ; sleep 10 ; cargo vdev -v int test -a prometheus ; RET=$? ; cargo vdev -v int stop prometheus ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.pulsar == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.pulsar == 'true' }} name: pulsar uses: nick-fields/retry@v2 with: @@ -337,7 +337,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start pulsar ; sleep 10 ; cargo vdev -v int test -a pulsar ; RET=$? ; cargo vdev -v int stop pulsar ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.redis == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.redis == 'true' }} name: redis uses: nick-fields/retry@v2 with: @@ -345,7 +345,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start redis ; sleep 10 ; cargo vdev -v int test -a redis ; RET=$? ; cargo vdev -v int stop redis ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' }} name: shutdown uses: nick-fields/retry@v2 with: @@ -353,7 +353,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start shutdown ; sleep 10 ; cargo vdev -v int test -a shutdown ; RET=$? ; cargo vdev -v int stop shutdown ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.splunk == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.splunk == 'true' }} name: splunk uses: nick-fields/retry@v2 with: @@ -361,7 +361,7 @@ jobs: max_attempts: 3 command: cargo vdev -v int start splunk ; sleep 10 ; cargo vdev -v int test -a splunk ; RET=$? ; cargo vdev -v int stop splunk ; exit $RET - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.int-all == 'true' || needs.changes.outputs.webhdfs == 'true' }} + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.webhdfs == 'true' }} name: webhdfs uses: nick-fields/retry@v2 with: From 7e83f4050c807307da0b007601a4235df6c3bfd6 Mon Sep 17 00:00:00 2001 From: neuronull Date: Thu, 22 Jun 2023 17:17:59 -0600 Subject: [PATCH 10/33] remove duplicated syntax --- .github/workflows/integration.yml | 84 +++++++++++++++++-------------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8b35269251d76..8dd9b2ef548a4 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -89,14 +89,25 @@ jobs: - run: docker image prune -af ; docker container prune -f + - name: Create test script + run: | + echo " + cargo vdev -v int test -a \$1 + RET=\$? + cargo vdev -v int stop \$1 + ./scripts/upload-test-results.sh + exit $RET + " > int_test.sh + cat int_test.sh + - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.amqp == 'true' }} name: amqp uses: nick-fields/retry@v2 with: + # First one requires more time, as we need to build the image from scratch timeout_minutes: 25 max_attempts: 3 - retry_on: error - command: cargo vdev -v int start amqp ; sleep 10 ; cargo vdev -v int test -a amqp ; RET=$? ; cargo vdev -v int stop amqp ; exit $RET + command: sh int_test.sh amqp - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.appsignal == 'true' }} name: appsignal @@ -104,8 +115,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - retry_on: error - command: cargo vdev -v int start appsignal ; sleep 10 ; cargo vdev -v int test -a appsignal ; RET=$? ; cargo vdev -v int stop appsignal ; exit $RET + command: sh int_test.sh appsignal - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.aws == 'true' }} name: aws @@ -113,8 +123,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - retry_on: error - command: cargo vdev -v int start aws ; sleep 10 ; cargo vdev -v int test -a aws ; RET=$? ; cargo vdev -v int stop aws ; exit $RET + command: sh int_test.sh aws - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.axiom == 'true' }} name: axiom @@ -122,8 +131,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - retry_on: error - command: cargo vdev -v int start axiom ; sleep 10 ; cargo vdev -v int test -a axiom ; RET=$? ; cargo vdev -v int stop axiom ; exit $RET + command: sh int_test.sh axiom - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.azure == 'true' }} name: azure @@ -131,7 +139,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start azure ; sleep 10 ; cargo vdev -v int test -a azure ; RET=$? ; cargo vdev -v int stop azure ; exit $RET + command: sh int_test.sh azure - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.clickhouse == 'true' }} name: clickhouse @@ -139,7 +147,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start clickhouse ; sleep 10 ; cargo vdev -v int test -a clickhouse ; RET=$? ; cargo vdev -v int stop clickhouse ; exit $RET + command: sh int_test.sh clickhouse - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.databend == 'true' }} name: databend @@ -147,7 +155,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start databend ; sleep 10 ; cargo vdev -v int test -a databend ; RET=$? ; cargo vdev -v int stop databend ; exit $RET + command: sh int_test.sh databend - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-agent @@ -155,7 +163,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start datadog-agent ; sleep 10 ; cargo vdev -v int test -a datadog-agent ; RET=$? ; cargo vdev -v int stop datadog-agent ; exit $RET + command: sh int_test.sh datadog-agent - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-logs @@ -163,7 +171,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start datadog-logs ; sleep 10 ; cargo vdev -v int test -a datadog-logs ; RET=$? ; cargo vdev -v int stop datadog-logs ; exit $RET + command: sh int_test.sh datadog-logs - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-metrics @@ -171,7 +179,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start datadog-metrics ; sleep 10 ; cargo vdev -v int test -a datadog-metrics ; RET=$? ; cargo vdev -v int stop datadog-metrics ; exit $RET + command: sh int_test.sh datadog-metrics - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-traces @@ -179,7 +187,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start datadog-traces ; sleep 10 ; cargo vdev -v int test -a datadog-traces ; RET=$? ; cargo vdev -v int stop datadog-traces ; exit $RET + command: sh int_test.sh datadog-traces - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.dnstap == 'true' }} name: dnstap @@ -187,7 +195,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start dnstap ; sleep 10 ; cargo vdev -v int test -a dnstap ; RET=$? ; cargo vdev -v int stop dnstap ; exit $RET + command: sh int_test.sh dnstap - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -197,7 +205,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start docker-logs ; sleep 10 ; cargo vdev -v int test -a docker-logs ; RET=$? ; cargo vdev -v int stop docker-logs ; exit $RET + command: sh int_test.sh docker-logs - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.elasticsearch == 'true' }} name: elasticsearch @@ -205,7 +213,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start elasticsearch ; sleep 10 ; cargo vdev -v int test -a elasticsearch ; RET=$? ; cargo vdev -v int stop elasticsearch ; exit $RET + command: sh int_test.sh elasticsearch - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.eventstoredb == 'true' }} name: eventstoredb @@ -213,7 +221,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start eventstoredb ; sleep 10 ; cargo vdev -v int test -a eventstoredb ; RET=$? ; cargo vdev -v int stop eventstoredb ; exit $RET + command: sh int_test.sh eventstoredb - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.fluent == 'true' }} name: fluent @@ -221,7 +229,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start fluent ; sleep 10 ; cargo vdev -v int test -a fluent ; RET=$? ; cargo vdev -v int stop fluent ; exit $RET + command: sh int_test.sh fluent - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.gcp == 'true' }} name: gcp @@ -229,7 +237,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start gcp ; sleep 10 ; cargo vdev -v int test -a gcp ; RET=$? ; cargo vdev -v int stop gcp ; exit $RET + command: sh int_test.sh gcp - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.humio == 'true' }} name: humio @@ -237,7 +245,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start humio ; sleep 10 ; cargo vdev -v int test -a humio ; RET=$? ; cargo vdev -v int stop humio ; exit $RET + command: sh int_test.sh humio - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.http-client == 'true' }} name: http-client @@ -245,7 +253,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start http-client ; sleep 10 ; cargo vdev -v int test -a http-client ; RET=$? ; cargo vdev -v int stop http-client ; exit $RET + command: sh int_test.sh http-client - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.influxdb == 'true' }} name: influxdb @@ -253,7 +261,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start influxdb ; sleep 10 ; cargo vdev -v int test -a influxdb ; RET=$? ; cargo vdev -v int stop influxdb ; exit $RET + command: sh int_test.sh influxdb - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.kafka == 'true' }} name: kafka @@ -261,7 +269,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start kafka ; sleep 10 ; cargo vdev -v int test -a kafka ; RET=$? ; cargo vdev -v int stop kafka ; exit $RET + command: sh int_test.sh kafka - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.logstash == 'true' }} name: logstash @@ -269,7 +277,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start logstash ; sleep 10 ; cargo vdev -v int test -a logstash ; RET=$? ; cargo vdev -v int stop logstash ; exit $RET + command: sh int_test.sh logstash - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.loki == 'true' }} name: loki @@ -277,7 +285,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start loki ; sleep 10 ; cargo vdev -v int test -a loki ; RET=$? ; cargo vdev -v int stop loki ; exit $RET + command: sh int_test.sh loki - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.mongodb == 'true' }} name: mongodb @@ -285,7 +293,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start mongodb ; sleep 10 ; cargo vdev -v int test -a mongodb ; RET=$? ; cargo vdev -v int stop mongodb ; exit $RET + command: sh int_test.sh mongodb - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -295,7 +303,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start nats ; sleep 10 ; cargo vdev -v int test -a nats ; RET=$? ; cargo vdev -v int stop nats ; exit $RET + command: sh int_test.sh nats - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.nginx == 'true' }} name: nginx @@ -303,7 +311,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start nginx ; sleep 10 ; cargo vdev -v int test -a nginx ; RET=$? ; cargo vdev -v int stop nginx ; exit $RET + command: sh int_test.sh nginx - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.opentelemetry == 'true' }} name: opentelemetry @@ -311,7 +319,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start opentelemetry ; sleep 10 ; cargo vdev -v int test -a opentelemetry ; RET=$? ; cargo vdev -v int stop opentelemetry ; exit $RET + command: sh int_test.sh opentelemetry - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.postgres == 'true' }} name: postgres @@ -319,7 +327,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start postgres ; sleep 10 ; cargo vdev -v int test -a postgres ; RET=$? ; cargo vdev -v int stop postgres ; exit $RET + command: sh int_test.sh postgres - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.prometheus == 'true' }} name: prometheus @@ -327,7 +335,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start prometheus ; sleep 10 ; cargo vdev -v int test -a prometheus ; RET=$? ; cargo vdev -v int stop prometheus ; exit $RET + command: sh int_test.sh prometheus - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.pulsar == 'true' }} name: pulsar @@ -335,7 +343,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start pulsar ; sleep 10 ; cargo vdev -v int test -a pulsar ; RET=$? ; cargo vdev -v int stop pulsar ; exit $RET + command: sh int_test.sh pulsar - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.redis == 'true' }} name: redis @@ -343,7 +351,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start redis ; sleep 10 ; cargo vdev -v int test -a redis ; RET=$? ; cargo vdev -v int stop redis ; exit $RET + command: sh int_test.sh redis - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' }} name: shutdown @@ -351,7 +359,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start shutdown ; sleep 10 ; cargo vdev -v int test -a shutdown ; RET=$? ; cargo vdev -v int stop shutdown ; exit $RET + command: sh int_test.sh shutdown - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.splunk == 'true' }} name: splunk @@ -359,7 +367,7 @@ jobs: with: timeout_minutes: 7 max_attempts: 3 - command: cargo vdev -v int start splunk ; sleep 10 ; cargo vdev -v int test -a splunk ; RET=$? ; cargo vdev -v int stop splunk ; exit $RET + command: sh int_test.sh splunk - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.webhdfs == 'true' }} name: webhdfs @@ -367,7 +375,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start webhdfs ; sleep 10 ; cargo vdev -v int test -a webhdfs ; RET=$? ; cargo vdev -v int stop webhdfs ; exit $RET + command: sh int_test.sh webhdfs - name: Upload test results run: scripts/upload-test-results.sh From a5bef925d1db806a4651f88f5436957b6ba8c929 Mon Sep 17 00:00:00 2001 From: neuronull Date: Thu, 22 Jun 2023 17:21:43 -0600 Subject: [PATCH 11/33] feeback bg: vdev changes --- vdev/src/commands/integration/start.rs | 2 +- vdev/src/commands/integration/stop.rs | 2 +- vdev/src/commands/integration/test.rs | 20 ++++++++++++---- vdev/src/testing/integration.rs | 32 +++++++++++++------------- vdev/src/testing/runner.rs | 13 ++++++++++- 5 files changed, 45 insertions(+), 24 deletions(-) diff --git a/vdev/src/commands/integration/start.rs b/vdev/src/commands/integration/start.rs index 63e4d51bcb59c..f10dd1ec1c57a 100644 --- a/vdev/src/commands/integration/start.rs +++ b/vdev/src/commands/integration/start.rs @@ -24,6 +24,6 @@ impl Cli { let env = envs.keys().next().expect("Integration has no environments"); env.clone() }; - IntegrationTest::new(self.integration, environment, false)?.start() + IntegrationTest::new(self.integration, environment, false, None)?.start() } } diff --git a/vdev/src/commands/integration/stop.rs b/vdev/src/commands/integration/stop.rs index ac2081e5f2d71..8857cfab95a1a 100644 --- a/vdev/src/commands/integration/stop.rs +++ b/vdev/src/commands/integration/stop.rs @@ -14,7 +14,7 @@ pub struct Cli { impl Cli { pub fn exec(self) -> Result<()> { if let Some(active) = EnvsDir::new(&self.integration).active()? { - IntegrationTest::new(self.integration, active, false)?.stop() + IntegrationTest::new(self.integration, active, false, None)?.stop() } else { println!("No environment for {:?} is active.", self.integration); Ok(()) diff --git a/vdev/src/commands/integration/test.rs b/vdev/src/commands/integration/test.rs index edafd11f6ca62..1de5dbe542fe8 100644 --- a/vdev/src/commands/integration/test.rs +++ b/vdev/src/commands/integration/test.rs @@ -22,7 +22,10 @@ pub struct Cli { /// Whether to compile the test runner with all integration test features #[arg(short = 'a', long)] - all: bool, + build_all: bool, + + /// Number of retries to allow on each integration test case. + retries: Option, /// Extra test command arguments args: Vec, @@ -40,15 +43,22 @@ impl Cli { bail!("Requested environment {environment:?} does not match active one {active:?}") } (Some(environment), _) => { - IntegrationTest::new(self.integration, environment, self.all)?.test(self.args) + IntegrationTest::new(self.integration, environment, self.build_all, self.retries)? + .test(self.args) } (None, Some(active)) => { - IntegrationTest::new(self.integration, active, self.all)?.test(self.args) + IntegrationTest::new(self.integration, active, self.build_all, self.retries)? + .test(self.args) } (None, None) => { for env_name in envs.keys() { - IntegrationTest::new(&self.integration, env_name, self.all)? - .test(self.args.clone())?; + IntegrationTest::new( + &self.integration, + env_name, + self.build_all, + self.retries, + )? + .test(self.args.clone())?; } Ok(()) } diff --git a/vdev/src/testing/integration.rs b/vdev/src/testing/integration.rs index d4076e5bc41d3..f560faa4e2dcb 100644 --- a/vdev/src/testing/integration.rs +++ b/vdev/src/testing/integration.rs @@ -22,14 +22,16 @@ pub struct IntegrationTest { runner: IntegrationTestRunner, compose: Option, env_config: Environment, - all: bool, + build_all: bool, + retries: Option, } impl IntegrationTest { pub fn new( integration: impl Into, environment: impl Into, - all: bool, + build_all: bool, + retries: Option, ) -> Result { let integration = integration.into(); let environment = environment.into(); @@ -41,14 +43,9 @@ impl IntegrationTest { let network_name = format!("vector-integration-tests-{integration}"); let compose = Compose::new(test_dir, env_config.clone(), network_name.clone())?; - let full_runner_avail = full_runner_available()?; - - let runner_name = (!full_runner_avail) - .then(|| (!all).then(|| integration.clone())) - .flatten(); - let runner = IntegrationTestRunner::new( - runner_name, + integration.clone(), + build_all, &config.runner, compose.is_some().then_some(network_name), )?; @@ -63,7 +60,8 @@ impl IntegrationTest { env_config, // no need to recompile a specific context for a single integration test feature if we've already got a context // with all of the int test features pre compiled. - all: all || full_runner_avail, + build_all: build_all || full_runner_available()?, + retries, }) } @@ -86,11 +84,11 @@ impl IntegrationTest { args.push("--features".to_string()); - if self.all { - args.push("all-integration-tests".to_string()); + args.push(if self.build_all { + "all-integration-tests".to_string() } else { - args.push(self.config.features.join(",")); - } + self.config.features.join(",") + }); // If the test field is not present then use the --lib flag match self.config.test { @@ -112,8 +110,10 @@ impl IntegrationTest { args.push("--no-capture".to_string()); } - args.push("--retries".to_string()); - args.push("4".to_string()); + if let Some(retries) = self.retries { + args.push("--retries".to_string()); + args.push(retries.to_string()); + } self.runner .test(&env_vars, &self.config.runner.env, &args)?; diff --git a/vdev/src/testing/runner.rs b/vdev/src/testing/runner.rs index b1376bd39c364..3eddc1bbdb117 100644 --- a/vdev/src/testing/runner.rs +++ b/vdev/src/testing/runner.rs @@ -313,6 +313,7 @@ where } pub(super) struct IntegrationTestRunner { + // None if building for all integrations integration: Option, needs_docker_socket: bool, network: Option, @@ -321,10 +322,20 @@ pub(super) struct IntegrationTestRunner { impl IntegrationTestRunner { pub(super) fn new( - integration: Option, + integration: String, + build_all: bool, config: &IntegrationRunnerConfig, network: Option, ) -> Result { + let full_runner_avail = full_runner_available()?; + + // if the build_all option was specified, the integration is None. + // if a full-featured runner image is already available, the integration is None. + // otherwise, use the integration specified. + let integration = (!build_all) + .then(|| (!full_runner_avail).then(|| integration.clone())) + .flatten(); + Ok(Self { integration, needs_docker_socket: config.needs_docker_socket, From 5229cc2e6769d5b174c8171592ebc6ea11ff1e17 Mon Sep 17 00:00:00 2001 From: neuronull Date: Thu, 22 Jun 2023 17:25:18 -0600 Subject: [PATCH 12/33] splunk timed out --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8dd9b2ef548a4..45541258826db 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -365,7 +365,7 @@ jobs: name: splunk uses: nick-fields/retry@v2 with: - timeout_minutes: 7 + timeout_minutes: 10 max_attempts: 3 command: sh int_test.sh splunk From ba0b5c9cb3658bd818f35e6530c8c203ae9de23d Mon Sep 17 00:00:00 2001 From: neuronull Date: Thu, 22 Jun 2023 17:45:58 -0600 Subject: [PATCH 13/33] vdev clippy --- vdev/src/testing/runner.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdev/src/testing/runner.rs b/vdev/src/testing/runner.rs index 3eddc1bbdb117..7ee0aa7747311 100644 --- a/vdev/src/testing/runner.rs +++ b/vdev/src/testing/runner.rs @@ -333,7 +333,7 @@ impl IntegrationTestRunner { // if a full-featured runner image is already available, the integration is None. // otherwise, use the integration specified. let integration = (!build_all) - .then(|| (!full_runner_avail).then(|| integration.clone())) + .then(|| (!full_runner_avail).then_some(integration)) .flatten(); Ok(Self { From d810c3047d66315eda7f0865a0706f9d57e521cc Mon Sep 17 00:00:00 2001 From: neuronull Date: Thu, 22 Jun 2023 20:56:17 -0600 Subject: [PATCH 14/33] update int comment workflow --- .github/workflows/integration-comment.yml | 104 +++++++++++----------- 1 file changed, 54 insertions(+), 50 deletions(-) diff --git a/.github/workflows/integration-comment.yml b/.github/workflows/integration-comment.yml index f8f34c3ffde2e..1b2ca723c16b9 100644 --- a/.github/workflows/integration-comment.yml +++ b/.github/workflows/integration-comment.yml @@ -65,7 +65,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} status: pending - test-integration: + integration-tests: needs: prep-pr runs-on: [linux, ubuntu-20.04-8core] steps: @@ -75,23 +75,33 @@ jobs: - run: docker image prune -af ; docker container prune -f + - name: Create test script + run: | + echo " + cargo vdev -v int test -a \$1 + RET=\$? + cargo vdev -v int stop \$1 + ./scripts/upload-test-results.sh + exit $RET + " > int_test.sh + cat int_test.sh + - name: amqp if: ${{ contains(github.event.comment.body, '/ci-run-integration-amqp') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: + # First one requires more time, as we need to build the image from scratch timeout_minutes: 25 max_attempts: 3 - retry_on: error - command: cargo vdev -v int start amqp ; sleep 10 ; cargo vdev -v int test -a amqp ; cargo vdev -v int stop amqp + command: sh int_test.sh amqp - name: appsignal if: ${{ contains(github.event.comment.body, '/ci-run-integration-appsignal') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 25 + timeout_minutes: 5 max_attempts: 3 - retry_on: error - command: cargo vdev -v int start appsignal ; sleep 10 ; cargo vdev -v int test -a appsignal ; cargo vdev -v int stop appsignal + command: sh int_test.sh appsignal - name: aws if: ${{ contains(github.event.comment.body, '/ci-run-integration-aws') || contains(github.event.comment.body, '/ci-run-all') }} @@ -99,8 +109,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - retry_on: error - command: cargo vdev -v int start aws ; sleep 10 ; cargo vdev -v int test -a aws ; RET=$? ; cargo vdev -v int stop aws ; exit $RET + command: sh int_test.sh aws - name: axiom if: ${{ contains(github.event.comment.body, '/ci-run-integration-axiom') || contains(github.event.comment.body, '/ci-run-all') }} @@ -108,8 +117,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - retry_on: error - command: cargo vdev -v int start axiom ; sleep 10 ; cargo vdev -v int test -a axiom ; RET=$? ; cargo vdev -v int stop axiom ; exit $RET + command: sh int_test.sh axiom - name: azure if: ${{ contains(github.event.comment.body, '/ci-run-integration-azure') || contains(github.event.comment.body, '/ci-run-all') }} @@ -117,7 +125,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start azure ; sleep 10 ; cargo vdev -v int test -a azure ; RET=$? ; cargo vdev -v int stop azure ; exit $RET + command: sh int_test.sh azure - name: clickhouse if: ${{ contains(github.event.comment.body, '/ci-run-integration-clickhouse') || contains(github.event.comment.body, '/ci-run-all') }} @@ -125,7 +133,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start clickhouse ; sleep 10 ; cargo vdev -v int test -a clickhouse ; RET=$? ; cargo vdev -v int stop clickhouse ; exit $RET + command: sh int_test.sh clickhouse - name: databend if: ${{ contains(github.event.comment.body, '/ci-run-integration-databend') || contains(github.event.comment.body, '/ci-run-all') }} @@ -133,39 +141,39 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start databend ; sleep 10 ; cargo vdev -v int test -a databend ; RET=$? ; cargo vdev -v int stop databend ; exit $RET + command: sh int_test.sh databend - name: datadog-agent - if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-agent') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start datadog-agent ; sleep 10 ; cargo vdev -v int test -a datadog-agent ; RET=$? ; cargo vdev -v int stop datadog-agent ; exit $RET + command: sh int_test.sh datadog-agent - name: datadog-logs - if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-logs') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start datadog-logs ; sleep 10 ; cargo vdev -v int test -a datadog-logs ; RET=$? ; cargo vdev -v int stop datadog-logs ; exit $RET + command: sh int_test.sh datadog-logs - name: datadog-metrics - if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-metrics') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start datadog-metrics ; sleep 10 ; cargo vdev -v int test -a datadog-metrics ; RET=$? ; cargo vdev -v int stop datadog-metrics ; exit $RET + command: sh int_test.sh datadog-metrics - name: datadog-traces - if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog') || contains(github.event.comment.body, '/ci-run-all') }} + if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-traces') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start datadog-traces ; sleep 10 ; cargo vdev -v int test -a datadog-traces ; RET=$? ; cargo vdev -v int stop datadog-traces ; exit $RET + command: sh int_test.sh datadog-traces - name: dnstap if: ${{ contains(github.event.comment.body, '/ci-run-integration-dnstap') || contains(github.event.comment.body, '/ci-run-all') }} @@ -173,7 +181,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start dnstap ; sleep 10 ; cargo vdev -v int test -a dnstap ; RET=$? ; cargo vdev -v int stop dnstap ; exit $RET + command: sh int_test.sh dnstap - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -183,7 +191,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start docker-logs ; sleep 10 ; cargo vdev -v int test -a docker-logs ; RET=$? ; cargo vdev -v int stop docker-logs ; exit $RET + command: sh int_test.sh docker-logs - name: elasticsearch if: ${{ contains(github.event.comment.body, '/ci-run-integration-elasticsearch') || contains(github.event.comment.body, '/ci-run-all') }} @@ -191,7 +199,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start elasticsearch ; sleep 10 ; cargo vdev -v int test -a elasticsearch ; RET=$? ; cargo vdev -v int stop elasticsearch ; exit $RET + command: sh int_test.sh elasticsearch - name: eventstoredb if: ${{ contains(github.event.comment.body, '/ci-run-integration-eventstoredb') || contains(github.event.comment.body, '/ci-run-all') }} @@ -199,7 +207,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start eventstoredb ; sleep 10 ; cargo vdev -v int test -a eventstoredb ; RET=$? ; cargo vdev -v int stop eventstoredb ; exit $RET + command: sh int_test.sh eventstoredb - name: fluent if: ${{ contains(github.event.comment.body, '/ci-run-integration-fluent') || contains(github.event.comment.body, '/ci-run-all') }} @@ -207,7 +215,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start fluent ; sleep 10 ; cargo vdev -v int test -a fluent ; RET=$? ; cargo vdev -v int stop fluent ; exit $RET + command: sh int_test.sh fluent - name: gcp if: ${{ contains(github.event.comment.body, '/ci-run-integration-gcp') || contains(github.event.comment.body, '/ci-run-all') }} @@ -215,7 +223,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start gcp ; sleep 10 ; cargo vdev -v int test -a gcp ; RET=$? ; cargo vdev -v int stop gcp ; exit $RET + command: sh int_test.sh gcp - name: humio if: ${{ contains(github.event.comment.body, '/ci-run-integration-humio') || contains(github.event.comment.body, '/ci-run-all') }} @@ -223,7 +231,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start humio ; sleep 10 ; cargo vdev -v int test -a humio ; RET=$? ; cargo vdev -v int stop humio ; exit $RET + command: sh int_test.sh humio - name: http-client if: ${{ contains(github.event.comment.body, '/ci-run-integration-http-client') || contains(github.event.comment.body, '/ci-run-all') }} @@ -231,7 +239,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start http-client ; sleep 10 ; cargo vdev -v int test -a http-client ; RET=$? ; cargo vdev -v int stop http-client ; exit $RET + command: sh int_test.sh http-client - name: influxdb if: ${{ contains(github.event.comment.body, '/ci-run-integration-influxdb') || contains(github.event.comment.body, '/ci-run-all') }} @@ -239,7 +247,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start influxdb ; sleep 10 ; cargo vdev -v int test -a influxdb ; RET=$? ; cargo vdev -v int stop influxdb ; exit $RET + command: sh int_test.sh influxdb - name: kafka if: ${{ contains(github.event.comment.body, '/ci-run-integration-kafka') || contains(github.event.comment.body, '/ci-run-all') }} @@ -247,7 +255,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start kafka ; sleep 10 ; cargo vdev -v int test -a kafka ; RET=$? ; cargo vdev -v int stop kafka ; exit $RET + command: sh int_test.sh kafka - name: logstash if: ${{ contains(github.event.comment.body, '/ci-run-integration-logstash') || contains(github.event.comment.body, '/ci-run-all') }} @@ -255,7 +263,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start logstash ; sleep 10 ; cargo vdev -v int test -a logstash ; RET=$? ; cargo vdev -v int stop logstash ; exit $RET + command: sh int_test.sh logstash - name: loki if: ${{ contains(github.event.comment.body, '/ci-run-integration-loki') || contains(github.event.comment.body, '/ci-run-all') }} @@ -263,7 +271,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start loki ; sleep 10 ; cargo vdev -v int test -a loki ; RET=$? ; cargo vdev -v int stop loki ; exit $RET + command: sh int_test.sh loki - name: mongodb if: ${{ contains(github.event.comment.body, '/ci-run-integration-mongodb') || contains(github.event.comment.body, '/ci-run-all') }} @@ -271,7 +279,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start mongodb ; sleep 10 ; cargo vdev -v int test -a mongodb ; RET=$? ; cargo vdev -v int stop mongodb ; exit $RET + command: sh int_test.sh mongodb - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -281,7 +289,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start nats ; sleep 10 ; cargo vdev -v int test -a nats ; RET=$? ; cargo vdev -v int stop nats ; exit $RET + command: sh int_test.sh nats - name: nginx if: ${{ contains(github.event.comment.body, '/ci-run-integration-nginx') || contains(github.event.comment.body, '/ci-run-all') }} @@ -289,7 +297,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start nginx ; sleep 10 ; cargo vdev -v int test -a nginx ; RET=$? ; cargo vdev -v int stop nginx ; exit $RET + command: sh int_test.sh nginx - name: opentelemetry if: ${{ contains(github.event.comment.body, '/ci-run-integration-opentelemetry') || contains(github.event.comment.body, '/ci-run-all') }} @@ -297,7 +305,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start opentelemetry ; sleep 10 ; cargo vdev -v int test -a opentelemetry ; RET=$? ; cargo vdev -v int stop opentelemetry ; exit $RET + command: sh int_test.sh opentelemetry - name: postgres if: ${{ contains(github.event.comment.body, '/ci-run-integration-postgres') || contains(github.event.comment.body, '/ci-run-all') }} @@ -305,7 +313,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start postgres ; sleep 10 ; cargo vdev -v int test -a postgres ; RET=$? ; cargo vdev -v int stop postgres ; exit $RET + command: sh int_test.sh postgres - name: prometheus if: ${{ contains(github.event.comment.body, '/ci-run-integration-prometheus') || contains(github.event.comment.body, '/ci-run-all') }} @@ -313,7 +321,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start prometheus ; sleep 10 ; cargo vdev -v int test -a prometheus ; RET=$? ; cargo vdev -v int stop prometheus ; exit $RET + command: sh int_test.sh prometheus - name: pulsar if: ${{ contains(github.event.comment.body, '/ci-run-integration-pulsar') || contains(github.event.comment.body, '/ci-run-all') }} @@ -321,7 +329,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start pulsar ; sleep 10 ; cargo vdev -v int test -a pulsar ; RET=$? ; cargo vdev -v int stop pulsar ; exit $RET + command: sh int_test.sh pulsar - name: redis if: ${{ contains(github.event.comment.body, '/ci-run-integration-redis') || contains(github.event.comment.body, '/ci-run-all') }} @@ -329,7 +337,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start redis ; sleep 10 ; cargo vdev -v int test -a redis ; RET=$? ; cargo vdev -v int stop redis ; exit $RET + command: sh int_test.sh redis - name: shutdown if: ${{ contains(github.event.comment.body, '/ci-run-integration-shutdown') || contains(github.event.comment.body, '/ci-run-all') }} @@ -337,15 +345,15 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start shutdown ; sleep 10 ; cargo vdev -v int test -a shutdown ; RET=$? ; cargo vdev -v int stop shutdown ; exit $RET + command: sh int_test.sh shutdown - name: splunk if: ${{ contains(github.event.comment.body, '/ci-run-integration-splunk') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 7 + timeout_minutes: 10 max_attempts: 3 - command: cargo vdev -v int start splunk ; sleep 10 ; cargo vdev -v int test -a splunk ; RET=$? ; cargo vdev -v int stop splunk ; exit $RET + command: sh int_test.sh splunk - name: webhdfs if: ${{ contains(github.event.comment.body, '/ci-run-integration-webhdfs') || contains(github.event.comment.body, '/ci-run-all') }} @@ -353,16 +361,12 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: cargo vdev -v int start webhdfs ; sleep 10 ; cargo vdev -v int test -a webhdfs ; RET=$? ; cargo vdev -v int stop webhdfs ; exit $RET - - - name: Upload test results - run: scripts/upload-test-results.sh - if: always() + command: sh int_test.sh webhdfs update-pr-status: name: Signal result to PR runs-on: ubuntu-latest - needs: test-integration + needs: integration-tests if: always() && (contains(github.event.comment.body, '/ci-run-integration') || contains(github.event.comment.body, '/ci-run-all')) steps: - name: Validate issue comment From 6ad195825c1c093fdbc6fd39124ea6086f42804b Mon Sep 17 00:00:00 2001 From: neuronull Date: Thu, 22 Jun 2023 21:01:24 -0600 Subject: [PATCH 15/33] yes --- .github/workflows/integration-comment.yml | 2 +- .github/workflows/integration.yml | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration-comment.yml b/.github/workflows/integration-comment.yml index 1b2ca723c16b9..1623e3d2047a2 100644 --- a/.github/workflows/integration-comment.yml +++ b/.github/workflows/integration-comment.yml @@ -82,7 +82,7 @@ jobs: RET=\$? cargo vdev -v int stop \$1 ./scripts/upload-test-results.sh - exit $RET + exit \$RET " > int_test.sh cat int_test.sh diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 45541258826db..dd1f79a60a950 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -96,7 +96,7 @@ jobs: RET=\$? cargo vdev -v int stop \$1 ./scripts/upload-test-results.sh - exit $RET + exit \$RET " > int_test.sh cat int_test.sh @@ -377,10 +377,6 @@ jobs: max_attempts: 3 command: sh int_test.sh webhdfs - - name: Upload test results - run: scripts/upload-test-results.sh - if: always() - integration-test-suite: name: Integration Test Suite runs-on: ubuntu-latest From bb87d8d55623dd0bb63eae79ce289d3559628b05 Mon Sep 17 00:00:00 2001 From: neuronull Date: Thu, 22 Jun 2023 21:23:06 -0600 Subject: [PATCH 16/33] mhm --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index dd1f79a60a950..d92d3b00b1251 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -13,7 +13,7 @@ on: concurrency: # `github.event.number` exists for pull requests, otherwise fall back to SHA for merge queue - group: ${{ github.workflow }}-${{ github.59cd306e5 event.number || github.event.merge_group.head_sha }} + group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }} cancel-in-progress: true env: From 2d808324369fbe6dfe7aa5f8e72bf7a43b217c50 Mon Sep 17 00:00:00 2001 From: neuronull Date: Fri, 23 Jun 2023 08:56:37 -0600 Subject: [PATCH 17/33] feeback bg: don't be too helpful --- vdev/src/testing/integration.rs | 13 ++++++------- vdev/src/testing/runner.rs | 30 ++---------------------------- 2 files changed, 8 insertions(+), 35 deletions(-) diff --git a/vdev/src/testing/integration.rs b/vdev/src/testing/integration.rs index f560faa4e2dcb..16c5b9d51a50f 100644 --- a/vdev/src/testing/integration.rs +++ b/vdev/src/testing/integration.rs @@ -6,8 +6,7 @@ use tempfile::{Builder, NamedTempFile}; use super::config::ComposeConfig; use super::config::{Environment, IntegrationTestConfig}; use super::runner::{ - full_runner_available, ContainerTestRunner as _, IntegrationTestRunner, TestRunner as _, - CONTAINER_TOOL, DOCKER_SOCKET, + ContainerTestRunner as _, IntegrationTestRunner, TestRunner as _, CONTAINER_TOOL, DOCKER_SOCKET, }; use super::state::EnvsDir; use crate::app::CommandExt as _; @@ -43,9 +42,11 @@ impl IntegrationTest { let network_name = format!("vector-integration-tests-{integration}"); let compose = Compose::new(test_dir, env_config.clone(), network_name.clone())?; + // None if compiling with all integration test feature flag. + let runner_name = (!build_all).then(|| integration.clone()); + let runner = IntegrationTestRunner::new( - integration.clone(), - build_all, + runner_name, &config.runner, compose.is_some().then_some(network_name), )?; @@ -58,9 +59,7 @@ impl IntegrationTest { runner, compose, env_config, - // no need to recompile a specific context for a single integration test feature if we've already got a context - // with all of the int test features pre compiled. - build_all: build_all || full_runner_available()?, + build_all, retries, }) } diff --git a/vdev/src/testing/runner.rs b/vdev/src/testing/runner.rs index 7ee0aa7747311..e4fd18cdd015b 100644 --- a/vdev/src/testing/runner.rs +++ b/vdev/src/testing/runner.rs @@ -54,22 +54,6 @@ fn get_rust_version() -> String { } } -/// True if a docker image exists that has all of the integration tests -/// features compiled. -pub fn full_runner_available() -> Result { - let mut command = dockercmd([ - "image", - "ls", - &format!("vector-test-runner-{}", get_rust_version()), - ]); - - // $ docker image ls vector-test-runner-1.69.0 - // REPOSITORY TAG IMAGE ID CREATED SIZE - // vector-test-runner-1.69.0 latest 7e5e70a96428 13 days ago 1.76GB - - Ok(command.check_output()?.lines().count() == 2) -} - fn dockercmd>(args: impl IntoIterator) -> Command { let mut command = Command::new(&*CONTAINER_TOOL); command.args(args); @@ -313,7 +297,7 @@ where } pub(super) struct IntegrationTestRunner { - // None if building for all integrations + // The integration is None when compiling the runner image with the `all-integration-tests` feature. integration: Option, needs_docker_socket: bool, network: Option, @@ -322,20 +306,10 @@ pub(super) struct IntegrationTestRunner { impl IntegrationTestRunner { pub(super) fn new( - integration: String, - build_all: bool, + integration: Option, config: &IntegrationRunnerConfig, network: Option, ) -> Result { - let full_runner_avail = full_runner_available()?; - - // if the build_all option was specified, the integration is None. - // if a full-featured runner image is already available, the integration is None. - // otherwise, use the integration specified. - let integration = (!build_all) - .then(|| (!full_runner_avail).then_some(integration)) - .flatten(); - Ok(Self { integration, needs_docker_socket: config.needs_docker_socket, From d2bf5bd726240c570babe86e6e136ba7adf99f44 Mon Sep 17 00:00:00 2001 From: neuronull Date: Fri, 23 Jun 2023 13:12:03 -0600 Subject: [PATCH 18/33] feedback bg: extract to scripts --- .github/workflows/integration-comment.yml | 79 ++++++++++------------- .github/workflows/integration.yml | 79 ++++++++++------------- scripts/ci-integration-test.sh | 28 ++++++++ 3 files changed, 96 insertions(+), 90 deletions(-) create mode 100755 scripts/ci-integration-test.sh diff --git a/.github/workflows/integration-comment.yml b/.github/workflows/integration-comment.yml index 1623e3d2047a2..2f128913daa35 100644 --- a/.github/workflows/integration-comment.yml +++ b/.github/workflows/integration-comment.yml @@ -75,17 +75,6 @@ jobs: - run: docker image prune -af ; docker container prune -f - - name: Create test script - run: | - echo " - cargo vdev -v int test -a \$1 - RET=\$? - cargo vdev -v int stop \$1 - ./scripts/upload-test-results.sh - exit \$RET - " > int_test.sh - cat int_test.sh - - name: amqp if: ${{ contains(github.event.comment.body, '/ci-run-integration-amqp') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 @@ -93,7 +82,7 @@ jobs: # First one requires more time, as we need to build the image from scratch timeout_minutes: 25 max_attempts: 3 - command: sh int_test.sh amqp + command: sh scripts/ci-integration-test.sh amqp - name: appsignal if: ${{ contains(github.event.comment.body, '/ci-run-integration-appsignal') || contains(github.event.comment.body, '/ci-run-all') }} @@ -101,7 +90,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh appsignal + command: sh scripts/ci-integration-test.sh appsignal - name: aws if: ${{ contains(github.event.comment.body, '/ci-run-integration-aws') || contains(github.event.comment.body, '/ci-run-all') }} @@ -109,7 +98,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh aws + command: sh scripts/ci-integration-test.sh aws - name: axiom if: ${{ contains(github.event.comment.body, '/ci-run-integration-axiom') || contains(github.event.comment.body, '/ci-run-all') }} @@ -117,7 +106,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh axiom + command: sh scripts/ci-integration-test.sh axiom - name: azure if: ${{ contains(github.event.comment.body, '/ci-run-integration-azure') || contains(github.event.comment.body, '/ci-run-all') }} @@ -125,7 +114,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh azure + command: sh scripts/ci-integration-test.sh azure - name: clickhouse if: ${{ contains(github.event.comment.body, '/ci-run-integration-clickhouse') || contains(github.event.comment.body, '/ci-run-all') }} @@ -133,7 +122,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh clickhouse + command: sh scripts/ci-integration-test.sh clickhouse - name: databend if: ${{ contains(github.event.comment.body, '/ci-run-integration-databend') || contains(github.event.comment.body, '/ci-run-all') }} @@ -141,7 +130,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh databend + command: sh scripts/ci-integration-test.sh databend - name: datadog-agent if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-agent') || contains(github.event.comment.body, '/ci-run-all') }} @@ -149,7 +138,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh datadog-agent + command: sh scripts/ci-integration-test.sh datadog-agent - name: datadog-logs if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-logs') || contains(github.event.comment.body, '/ci-run-all') }} @@ -157,7 +146,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh datadog-logs + command: sh scripts/ci-integration-test.sh datadog-logs - name: datadog-metrics if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-metrics') || contains(github.event.comment.body, '/ci-run-all') }} @@ -165,7 +154,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh datadog-metrics + command: sh scripts/ci-integration-test.sh datadog-metrics - name: datadog-traces if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-traces') || contains(github.event.comment.body, '/ci-run-all') }} @@ -173,7 +162,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh datadog-traces + command: sh scripts/ci-integration-test.sh datadog-traces - name: dnstap if: ${{ contains(github.event.comment.body, '/ci-run-integration-dnstap') || contains(github.event.comment.body, '/ci-run-all') }} @@ -181,7 +170,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh dnstap + command: sh scripts/ci-integration-test.sh dnstap - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -191,7 +180,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh docker-logs + command: sh scripts/ci-integration-test.sh docker-logs - name: elasticsearch if: ${{ contains(github.event.comment.body, '/ci-run-integration-elasticsearch') || contains(github.event.comment.body, '/ci-run-all') }} @@ -199,7 +188,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh elasticsearch + command: sh scripts/ci-integration-test.sh elasticsearch - name: eventstoredb if: ${{ contains(github.event.comment.body, '/ci-run-integration-eventstoredb') || contains(github.event.comment.body, '/ci-run-all') }} @@ -207,7 +196,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh eventstoredb + command: sh scripts/ci-integration-test.sh eventstoredb - name: fluent if: ${{ contains(github.event.comment.body, '/ci-run-integration-fluent') || contains(github.event.comment.body, '/ci-run-all') }} @@ -215,7 +204,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh fluent + command: sh scripts/ci-integration-test.sh fluent - name: gcp if: ${{ contains(github.event.comment.body, '/ci-run-integration-gcp') || contains(github.event.comment.body, '/ci-run-all') }} @@ -223,7 +212,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh gcp + command: sh scripts/ci-integration-test.sh gcp - name: humio if: ${{ contains(github.event.comment.body, '/ci-run-integration-humio') || contains(github.event.comment.body, '/ci-run-all') }} @@ -231,7 +220,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh humio + command: sh scripts/ci-integration-test.sh humio - name: http-client if: ${{ contains(github.event.comment.body, '/ci-run-integration-http-client') || contains(github.event.comment.body, '/ci-run-all') }} @@ -239,7 +228,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh http-client + command: sh scripts/ci-integration-test.sh http-client - name: influxdb if: ${{ contains(github.event.comment.body, '/ci-run-integration-influxdb') || contains(github.event.comment.body, '/ci-run-all') }} @@ -247,7 +236,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh influxdb + command: sh scripts/ci-integration-test.sh influxdb - name: kafka if: ${{ contains(github.event.comment.body, '/ci-run-integration-kafka') || contains(github.event.comment.body, '/ci-run-all') }} @@ -255,7 +244,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh kafka + command: sh scripts/ci-integration-test.sh kafka - name: logstash if: ${{ contains(github.event.comment.body, '/ci-run-integration-logstash') || contains(github.event.comment.body, '/ci-run-all') }} @@ -263,7 +252,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh logstash + command: sh scripts/ci-integration-test.sh logstash - name: loki if: ${{ contains(github.event.comment.body, '/ci-run-integration-loki') || contains(github.event.comment.body, '/ci-run-all') }} @@ -271,7 +260,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh loki + command: sh scripts/ci-integration-test.sh loki - name: mongodb if: ${{ contains(github.event.comment.body, '/ci-run-integration-mongodb') || contains(github.event.comment.body, '/ci-run-all') }} @@ -279,7 +268,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh mongodb + command: sh scripts/ci-integration-test.sh mongodb - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -289,7 +278,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh nats + command: sh scripts/ci-integration-test.sh nats - name: nginx if: ${{ contains(github.event.comment.body, '/ci-run-integration-nginx') || contains(github.event.comment.body, '/ci-run-all') }} @@ -297,7 +286,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh nginx + command: sh scripts/ci-integration-test.sh nginx - name: opentelemetry if: ${{ contains(github.event.comment.body, '/ci-run-integration-opentelemetry') || contains(github.event.comment.body, '/ci-run-all') }} @@ -305,7 +294,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh opentelemetry + command: sh scripts/ci-integration-test.sh opentelemetry - name: postgres if: ${{ contains(github.event.comment.body, '/ci-run-integration-postgres') || contains(github.event.comment.body, '/ci-run-all') }} @@ -313,7 +302,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh postgres + command: sh scripts/ci-integration-test.sh postgres - name: prometheus if: ${{ contains(github.event.comment.body, '/ci-run-integration-prometheus') || contains(github.event.comment.body, '/ci-run-all') }} @@ -321,7 +310,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh prometheus + command: sh scripts/ci-integration-test.sh prometheus - name: pulsar if: ${{ contains(github.event.comment.body, '/ci-run-integration-pulsar') || contains(github.event.comment.body, '/ci-run-all') }} @@ -329,7 +318,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh pulsar + command: sh scripts/ci-integration-test.sh pulsar - name: redis if: ${{ contains(github.event.comment.body, '/ci-run-integration-redis') || contains(github.event.comment.body, '/ci-run-all') }} @@ -337,7 +326,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh redis + command: sh scripts/ci-integration-test.sh redis - name: shutdown if: ${{ contains(github.event.comment.body, '/ci-run-integration-shutdown') || contains(github.event.comment.body, '/ci-run-all') }} @@ -345,7 +334,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh shutdown + command: sh scripts/ci-integration-test.sh shutdown - name: splunk if: ${{ contains(github.event.comment.body, '/ci-run-integration-splunk') || contains(github.event.comment.body, '/ci-run-all') }} @@ -353,7 +342,7 @@ jobs: with: timeout_minutes: 10 max_attempts: 3 - command: sh int_test.sh splunk + command: sh scripts/ci-integration-test.sh splunk - name: webhdfs if: ${{ contains(github.event.comment.body, '/ci-run-integration-webhdfs') || contains(github.event.comment.body, '/ci-run-all') }} @@ -361,7 +350,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh webhdfs + command: sh scripts/ci-integration-test.sh webhdfs update-pr-status: name: Signal result to PR diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index d92d3b00b1251..ea74ce84b9cd3 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -89,17 +89,6 @@ jobs: - run: docker image prune -af ; docker container prune -f - - name: Create test script - run: | - echo " - cargo vdev -v int test -a \$1 - RET=\$? - cargo vdev -v int stop \$1 - ./scripts/upload-test-results.sh - exit \$RET - " > int_test.sh - cat int_test.sh - - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.amqp == 'true' }} name: amqp uses: nick-fields/retry@v2 @@ -107,7 +96,7 @@ jobs: # First one requires more time, as we need to build the image from scratch timeout_minutes: 25 max_attempts: 3 - command: sh int_test.sh amqp + command: sh scripts/ci-integration-test.sh amqp - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.appsignal == 'true' }} name: appsignal @@ -115,7 +104,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh appsignal + command: sh scripts/ci-integration-test.sh appsignal - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.aws == 'true' }} name: aws @@ -123,7 +112,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh aws + command: sh scripts/ci-integration-test.sh aws - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.axiom == 'true' }} name: axiom @@ -131,7 +120,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh axiom + command: sh scripts/ci-integration-test.sh axiom - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.azure == 'true' }} name: azure @@ -139,7 +128,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh azure + command: sh scripts/ci-integration-test.sh azure - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.clickhouse == 'true' }} name: clickhouse @@ -147,7 +136,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh clickhouse + command: sh scripts/ci-integration-test.sh clickhouse - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.databend == 'true' }} name: databend @@ -155,7 +144,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh databend + command: sh scripts/ci-integration-test.sh databend - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-agent @@ -163,7 +152,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh datadog-agent + command: sh scripts/ci-integration-test.sh datadog-agent - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-logs @@ -171,7 +160,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh datadog-logs + command: sh scripts/ci-integration-test.sh datadog-logs - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-metrics @@ -179,7 +168,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh datadog-metrics + command: sh scripts/ci-integration-test.sh datadog-metrics - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-traces @@ -187,7 +176,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh datadog-traces + command: sh scripts/ci-integration-test.sh datadog-traces - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.dnstap == 'true' }} name: dnstap @@ -195,7 +184,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh dnstap + command: sh scripts/ci-integration-test.sh dnstap - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -205,7 +194,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh docker-logs + command: sh scripts/ci-integration-test.sh docker-logs - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.elasticsearch == 'true' }} name: elasticsearch @@ -213,7 +202,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh elasticsearch + command: sh scripts/ci-integration-test.sh elasticsearch - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.eventstoredb == 'true' }} name: eventstoredb @@ -221,7 +210,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh eventstoredb + command: sh scripts/ci-integration-test.sh eventstoredb - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.fluent == 'true' }} name: fluent @@ -229,7 +218,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh fluent + command: sh scripts/ci-integration-test.sh fluent - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.gcp == 'true' }} name: gcp @@ -237,7 +226,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh gcp + command: sh scripts/ci-integration-test.sh gcp - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.humio == 'true' }} name: humio @@ -245,7 +234,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh humio + command: sh scripts/ci-integration-test.sh humio - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.http-client == 'true' }} name: http-client @@ -253,7 +242,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh http-client + command: sh scripts/ci-integration-test.sh http-client - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.influxdb == 'true' }} name: influxdb @@ -261,7 +250,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh influxdb + command: sh scripts/ci-integration-test.sh influxdb - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.kafka == 'true' }} name: kafka @@ -269,7 +258,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh kafka + command: sh scripts/ci-integration-test.sh kafka - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.logstash == 'true' }} name: logstash @@ -277,7 +266,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh logstash + command: sh scripts/ci-integration-test.sh logstash - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.loki == 'true' }} name: loki @@ -285,7 +274,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh loki + command: sh scripts/ci-integration-test.sh loki - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.mongodb == 'true' }} name: mongodb @@ -293,7 +282,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh mongodb + command: sh scripts/ci-integration-test.sh mongodb - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -303,7 +292,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh nats + command: sh scripts/ci-integration-test.sh nats - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.nginx == 'true' }} name: nginx @@ -311,7 +300,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh nginx + command: sh scripts/ci-integration-test.sh nginx - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.opentelemetry == 'true' }} name: opentelemetry @@ -319,7 +308,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh opentelemetry + command: sh scripts/ci-integration-test.sh opentelemetry - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.postgres == 'true' }} name: postgres @@ -327,7 +316,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh postgres + command: sh scripts/ci-integration-test.sh postgres - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.prometheus == 'true' }} name: prometheus @@ -335,7 +324,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh prometheus + command: sh scripts/ci-integration-test.sh prometheus - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.pulsar == 'true' }} name: pulsar @@ -343,7 +332,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh pulsar + command: sh scripts/ci-integration-test.sh pulsar - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.redis == 'true' }} name: redis @@ -351,7 +340,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh redis + command: sh scripts/ci-integration-test.sh redis - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' }} name: shutdown @@ -359,7 +348,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh shutdown + command: sh scripts/ci-integration-test.sh shutdown - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.splunk == 'true' }} name: splunk @@ -367,7 +356,7 @@ jobs: with: timeout_minutes: 10 max_attempts: 3 - command: sh int_test.sh splunk + command: sh scripts/ci-integration-test.sh splunk - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.webhdfs == 'true' }} name: webhdfs @@ -375,7 +364,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh int_test.sh webhdfs + command: sh scripts/ci-integration-test.sh webhdfs integration-test-suite: name: Integration Test Suite diff --git a/scripts/ci-integration-test.sh b/scripts/ci-integration-test.sh new file mode 100755 index 0000000000000..0144c99636ea5 --- /dev/null +++ b/scripts/ci-integration-test.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Used in CI to run and stop an integration test and upload the results of it. +# This is useful to allow retrying the integration test at a higher level than +# the nextest and reduce code duplication in the workflow file. + +set -euo pipefail + +if [[ -z "${CI:-}" ]]; then + echo "Aborted: this script is for use in CI." >&2 + exit 1 +fi + +if [ $# -ne 1 ] +then + echo "usage: $0 INTEGRATION" + exit 1 +fi + +set -x + +INTEGRATION=$1 + +cargo vdev -v int test -a ${INTEGRATION} +RET=$? +cargo vdev -v int stop ${INTEGRATION} +./scripts/upload-test-results.sh +exit $RET \ No newline at end of file From a9d03e9583e07945e53d42e8b0347f2722008727 Mon Sep 17 00:00:00 2001 From: neuronull Date: Fri, 23 Jun 2023 13:18:40 -0600 Subject: [PATCH 19/33] use bash --- .github/workflows/integration-comment.yml | 68 +++++++++++------------ .github/workflows/integration.yml | 68 +++++++++++------------ 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/.github/workflows/integration-comment.yml b/.github/workflows/integration-comment.yml index 2f128913daa35..4f1b99845e980 100644 --- a/.github/workflows/integration-comment.yml +++ b/.github/workflows/integration-comment.yml @@ -82,7 +82,7 @@ jobs: # First one requires more time, as we need to build the image from scratch timeout_minutes: 25 max_attempts: 3 - command: sh scripts/ci-integration-test.sh amqp + command: bash scripts/ci-integration-test.sh amqp - name: appsignal if: ${{ contains(github.event.comment.body, '/ci-run-integration-appsignal') || contains(github.event.comment.body, '/ci-run-all') }} @@ -90,7 +90,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh appsignal + command: bash scripts/ci-integration-test.sh appsignal - name: aws if: ${{ contains(github.event.comment.body, '/ci-run-integration-aws') || contains(github.event.comment.body, '/ci-run-all') }} @@ -98,7 +98,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh aws + command: bash scripts/ci-integration-test.sh aws - name: axiom if: ${{ contains(github.event.comment.body, '/ci-run-integration-axiom') || contains(github.event.comment.body, '/ci-run-all') }} @@ -106,7 +106,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh axiom + command: bash scripts/ci-integration-test.sh axiom - name: azure if: ${{ contains(github.event.comment.body, '/ci-run-integration-azure') || contains(github.event.comment.body, '/ci-run-all') }} @@ -114,7 +114,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh azure + command: bash scripts/ci-integration-test.sh azure - name: clickhouse if: ${{ contains(github.event.comment.body, '/ci-run-integration-clickhouse') || contains(github.event.comment.body, '/ci-run-all') }} @@ -122,7 +122,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh clickhouse + command: bash scripts/ci-integration-test.sh clickhouse - name: databend if: ${{ contains(github.event.comment.body, '/ci-run-integration-databend') || contains(github.event.comment.body, '/ci-run-all') }} @@ -130,7 +130,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh databend + command: bash scripts/ci-integration-test.sh databend - name: datadog-agent if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-agent') || contains(github.event.comment.body, '/ci-run-all') }} @@ -138,7 +138,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh datadog-agent + command: bash scripts/ci-integration-test.sh datadog-agent - name: datadog-logs if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-logs') || contains(github.event.comment.body, '/ci-run-all') }} @@ -146,7 +146,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh datadog-logs + command: bash scripts/ci-integration-test.sh datadog-logs - name: datadog-metrics if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-metrics') || contains(github.event.comment.body, '/ci-run-all') }} @@ -154,7 +154,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh datadog-metrics + command: bash scripts/ci-integration-test.sh datadog-metrics - name: datadog-traces if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-traces') || contains(github.event.comment.body, '/ci-run-all') }} @@ -162,7 +162,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh datadog-traces + command: bash scripts/ci-integration-test.sh datadog-traces - name: dnstap if: ${{ contains(github.event.comment.body, '/ci-run-integration-dnstap') || contains(github.event.comment.body, '/ci-run-all') }} @@ -170,7 +170,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh dnstap + command: bash scripts/ci-integration-test.sh dnstap - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -180,7 +180,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh docker-logs + command: bash scripts/ci-integration-test.sh docker-logs - name: elasticsearch if: ${{ contains(github.event.comment.body, '/ci-run-integration-elasticsearch') || contains(github.event.comment.body, '/ci-run-all') }} @@ -188,7 +188,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh elasticsearch + command: bash scripts/ci-integration-test.sh elasticsearch - name: eventstoredb if: ${{ contains(github.event.comment.body, '/ci-run-integration-eventstoredb') || contains(github.event.comment.body, '/ci-run-all') }} @@ -196,7 +196,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh eventstoredb + command: bash scripts/ci-integration-test.sh eventstoredb - name: fluent if: ${{ contains(github.event.comment.body, '/ci-run-integration-fluent') || contains(github.event.comment.body, '/ci-run-all') }} @@ -204,7 +204,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh fluent + command: bash scripts/ci-integration-test.sh fluent - name: gcp if: ${{ contains(github.event.comment.body, '/ci-run-integration-gcp') || contains(github.event.comment.body, '/ci-run-all') }} @@ -212,7 +212,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh gcp + command: bash scripts/ci-integration-test.sh gcp - name: humio if: ${{ contains(github.event.comment.body, '/ci-run-integration-humio') || contains(github.event.comment.body, '/ci-run-all') }} @@ -220,7 +220,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh humio + command: bash scripts/ci-integration-test.sh humio - name: http-client if: ${{ contains(github.event.comment.body, '/ci-run-integration-http-client') || contains(github.event.comment.body, '/ci-run-all') }} @@ -228,7 +228,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh http-client + command: bash scripts/ci-integration-test.sh http-client - name: influxdb if: ${{ contains(github.event.comment.body, '/ci-run-integration-influxdb') || contains(github.event.comment.body, '/ci-run-all') }} @@ -236,7 +236,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh influxdb + command: bash scripts/ci-integration-test.sh influxdb - name: kafka if: ${{ contains(github.event.comment.body, '/ci-run-integration-kafka') || contains(github.event.comment.body, '/ci-run-all') }} @@ -244,7 +244,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh kafka + command: bash scripts/ci-integration-test.sh kafka - name: logstash if: ${{ contains(github.event.comment.body, '/ci-run-integration-logstash') || contains(github.event.comment.body, '/ci-run-all') }} @@ -252,7 +252,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh logstash + command: bash scripts/ci-integration-test.sh logstash - name: loki if: ${{ contains(github.event.comment.body, '/ci-run-integration-loki') || contains(github.event.comment.body, '/ci-run-all') }} @@ -260,7 +260,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh loki + command: bash scripts/ci-integration-test.sh loki - name: mongodb if: ${{ contains(github.event.comment.body, '/ci-run-integration-mongodb') || contains(github.event.comment.body, '/ci-run-all') }} @@ -268,7 +268,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh mongodb + command: bash scripts/ci-integration-test.sh mongodb - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -278,7 +278,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh nats + command: bash scripts/ci-integration-test.sh nats - name: nginx if: ${{ contains(github.event.comment.body, '/ci-run-integration-nginx') || contains(github.event.comment.body, '/ci-run-all') }} @@ -286,7 +286,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh nginx + command: bash scripts/ci-integration-test.sh nginx - name: opentelemetry if: ${{ contains(github.event.comment.body, '/ci-run-integration-opentelemetry') || contains(github.event.comment.body, '/ci-run-all') }} @@ -294,7 +294,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh opentelemetry + command: bash scripts/ci-integration-test.sh opentelemetry - name: postgres if: ${{ contains(github.event.comment.body, '/ci-run-integration-postgres') || contains(github.event.comment.body, '/ci-run-all') }} @@ -302,7 +302,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh postgres + command: bash scripts/ci-integration-test.sh postgres - name: prometheus if: ${{ contains(github.event.comment.body, '/ci-run-integration-prometheus') || contains(github.event.comment.body, '/ci-run-all') }} @@ -310,7 +310,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh prometheus + command: bash scripts/ci-integration-test.sh prometheus - name: pulsar if: ${{ contains(github.event.comment.body, '/ci-run-integration-pulsar') || contains(github.event.comment.body, '/ci-run-all') }} @@ -318,7 +318,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh pulsar + command: bash scripts/ci-integration-test.sh pulsar - name: redis if: ${{ contains(github.event.comment.body, '/ci-run-integration-redis') || contains(github.event.comment.body, '/ci-run-all') }} @@ -326,7 +326,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh redis + command: bash scripts/ci-integration-test.sh redis - name: shutdown if: ${{ contains(github.event.comment.body, '/ci-run-integration-shutdown') || contains(github.event.comment.body, '/ci-run-all') }} @@ -334,7 +334,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh shutdown + command: bash scripts/ci-integration-test.sh shutdown - name: splunk if: ${{ contains(github.event.comment.body, '/ci-run-integration-splunk') || contains(github.event.comment.body, '/ci-run-all') }} @@ -342,7 +342,7 @@ jobs: with: timeout_minutes: 10 max_attempts: 3 - command: sh scripts/ci-integration-test.sh splunk + command: bash scripts/ci-integration-test.sh splunk - name: webhdfs if: ${{ contains(github.event.comment.body, '/ci-run-integration-webhdfs') || contains(github.event.comment.body, '/ci-run-all') }} @@ -350,7 +350,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh webhdfs + command: bash scripts/ci-integration-test.sh webhdfs update-pr-status: name: Signal result to PR diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index ea74ce84b9cd3..06767dedaf926 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -96,7 +96,7 @@ jobs: # First one requires more time, as we need to build the image from scratch timeout_minutes: 25 max_attempts: 3 - command: sh scripts/ci-integration-test.sh amqp + command: bash scripts/ci-integration-test.sh amqp - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.appsignal == 'true' }} name: appsignal @@ -104,7 +104,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh appsignal + command: bash scripts/ci-integration-test.sh appsignal - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.aws == 'true' }} name: aws @@ -112,7 +112,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh aws + command: bash scripts/ci-integration-test.sh aws - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.axiom == 'true' }} name: axiom @@ -120,7 +120,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh axiom + command: bash scripts/ci-integration-test.sh axiom - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.azure == 'true' }} name: azure @@ -128,7 +128,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh azure + command: bash scripts/ci-integration-test.sh azure - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.clickhouse == 'true' }} name: clickhouse @@ -136,7 +136,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh clickhouse + command: bash scripts/ci-integration-test.sh clickhouse - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.databend == 'true' }} name: databend @@ -144,7 +144,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh databend + command: bash scripts/ci-integration-test.sh databend - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-agent @@ -152,7 +152,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh datadog-agent + command: bash scripts/ci-integration-test.sh datadog-agent - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-logs @@ -160,7 +160,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh datadog-logs + command: bash scripts/ci-integration-test.sh datadog-logs - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-metrics @@ -168,7 +168,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh datadog-metrics + command: bash scripts/ci-integration-test.sh datadog-metrics - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true' }} name: datadog-traces @@ -176,7 +176,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh datadog-traces + command: bash scripts/ci-integration-test.sh datadog-traces - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.dnstap == 'true' }} name: dnstap @@ -184,7 +184,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh dnstap + command: bash scripts/ci-integration-test.sh dnstap - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -194,7 +194,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh docker-logs + command: bash scripts/ci-integration-test.sh docker-logs - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.elasticsearch == 'true' }} name: elasticsearch @@ -202,7 +202,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh elasticsearch + command: bash scripts/ci-integration-test.sh elasticsearch - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.eventstoredb == 'true' }} name: eventstoredb @@ -210,7 +210,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh eventstoredb + command: bash scripts/ci-integration-test.sh eventstoredb - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.fluent == 'true' }} name: fluent @@ -218,7 +218,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh fluent + command: bash scripts/ci-integration-test.sh fluent - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.gcp == 'true' }} name: gcp @@ -226,7 +226,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh gcp + command: bash scripts/ci-integration-test.sh gcp - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.humio == 'true' }} name: humio @@ -234,7 +234,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh humio + command: bash scripts/ci-integration-test.sh humio - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.http-client == 'true' }} name: http-client @@ -242,7 +242,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh http-client + command: bash scripts/ci-integration-test.sh http-client - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.influxdb == 'true' }} name: influxdb @@ -250,7 +250,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh influxdb + command: bash scripts/ci-integration-test.sh influxdb - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.kafka == 'true' }} name: kafka @@ -258,7 +258,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh kafka + command: bash scripts/ci-integration-test.sh kafka - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.logstash == 'true' }} name: logstash @@ -266,7 +266,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh logstash + command: bash scripts/ci-integration-test.sh logstash - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.loki == 'true' }} name: loki @@ -274,7 +274,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh loki + command: bash scripts/ci-integration-test.sh loki - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.mongodb == 'true' }} name: mongodb @@ -282,7 +282,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh mongodb + command: bash scripts/ci-integration-test.sh mongodb - run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f @@ -292,7 +292,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh nats + command: bash scripts/ci-integration-test.sh nats - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.nginx == 'true' }} name: nginx @@ -300,7 +300,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh nginx + command: bash scripts/ci-integration-test.sh nginx - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.opentelemetry == 'true' }} name: opentelemetry @@ -308,7 +308,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh opentelemetry + command: bash scripts/ci-integration-test.sh opentelemetry - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.postgres == 'true' }} name: postgres @@ -316,7 +316,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh postgres + command: bash scripts/ci-integration-test.sh postgres - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.prometheus == 'true' }} name: prometheus @@ -324,7 +324,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh prometheus + command: bash scripts/ci-integration-test.sh prometheus - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.pulsar == 'true' }} name: pulsar @@ -332,7 +332,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh pulsar + command: bash scripts/ci-integration-test.sh pulsar - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.redis == 'true' }} name: redis @@ -340,7 +340,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh redis + command: bash scripts/ci-integration-test.sh redis - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' }} name: shutdown @@ -348,7 +348,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh shutdown + command: bash scripts/ci-integration-test.sh shutdown - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.splunk == 'true' }} name: splunk @@ -356,7 +356,7 @@ jobs: with: timeout_minutes: 10 max_attempts: 3 - command: sh scripts/ci-integration-test.sh splunk + command: bash scripts/ci-integration-test.sh splunk - if: ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.webhdfs == 'true' }} name: webhdfs @@ -364,7 +364,7 @@ jobs: with: timeout_minutes: 5 max_attempts: 3 - command: sh scripts/ci-integration-test.sh webhdfs + command: bash scripts/ci-integration-test.sh webhdfs integration-test-suite: name: Integration Test Suite From 7ac2bb532bb93ddf6e5353ce0adf67e9deba185a Mon Sep 17 00:00:00 2001 From: neuronull Date: Fri, 23 Jun 2023 13:27:21 -0600 Subject: [PATCH 20/33] newline end --- scripts/ci-integration-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci-integration-test.sh b/scripts/ci-integration-test.sh index 0144c99636ea5..f1e51fc30c6e4 100755 --- a/scripts/ci-integration-test.sh +++ b/scripts/ci-integration-test.sh @@ -25,4 +25,4 @@ cargo vdev -v int test -a ${INTEGRATION} RET=$? cargo vdev -v int stop ${INTEGRATION} ./scripts/upload-test-results.sh -exit $RET \ No newline at end of file +exit $RET From e9a3d5c32ce734f750c7147fad17ae1853db0658 Mon Sep 17 00:00:00 2001 From: neuronull Date: Fri, 23 Jun 2023 14:07:59 -0600 Subject: [PATCH 21/33] check scripts --- scripts/ci-integration-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci-integration-test.sh b/scripts/ci-integration-test.sh index f1e51fc30c6e4..52b32dc1f8ef8 100755 --- a/scripts/ci-integration-test.sh +++ b/scripts/ci-integration-test.sh @@ -21,8 +21,8 @@ set -x INTEGRATION=$1 -cargo vdev -v int test -a ${INTEGRATION} +cargo vdev -v int test -a "${INTEGRATION}" RET=$? -cargo vdev -v int stop ${INTEGRATION} +cargo vdev -v int stop "${INTEGRATION}" ./scripts/upload-test-results.sh exit $RET From d9ef51adbfb6ed3a32cc2800e66e4da0f0626040 Mon Sep 17 00:00:00 2001 From: neuronull Date: Mon, 26 Jun 2023 09:50:18 -0600 Subject: [PATCH 22/33] fix retries --- scripts/ci-integration-test.sh | 2 +- vdev/src/commands/integration/start.rs | 2 +- vdev/src/commands/integration/stop.rs | 2 +- vdev/src/commands/integration/test.rs | 3 ++- vdev/src/testing/integration.rs | 8 ++++---- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/ci-integration-test.sh b/scripts/ci-integration-test.sh index 52b32dc1f8ef8..37639acaeaed9 100755 --- a/scripts/ci-integration-test.sh +++ b/scripts/ci-integration-test.sh @@ -21,7 +21,7 @@ set -x INTEGRATION=$1 -cargo vdev -v int test -a "${INTEGRATION}" +cargo vdev -v int test --retries 2 -a "${INTEGRATION}" RET=$? cargo vdev -v int stop "${INTEGRATION}" ./scripts/upload-test-results.sh diff --git a/vdev/src/commands/integration/start.rs b/vdev/src/commands/integration/start.rs index f10dd1ec1c57a..da8947e74997a 100644 --- a/vdev/src/commands/integration/start.rs +++ b/vdev/src/commands/integration/start.rs @@ -24,6 +24,6 @@ impl Cli { let env = envs.keys().next().expect("Integration has no environments"); env.clone() }; - IntegrationTest::new(self.integration, environment, false, None)?.start() + IntegrationTest::new(self.integration, environment, false, 0)?.start() } } diff --git a/vdev/src/commands/integration/stop.rs b/vdev/src/commands/integration/stop.rs index 8857cfab95a1a..84662125eff5d 100644 --- a/vdev/src/commands/integration/stop.rs +++ b/vdev/src/commands/integration/stop.rs @@ -14,7 +14,7 @@ pub struct Cli { impl Cli { pub fn exec(self) -> Result<()> { if let Some(active) = EnvsDir::new(&self.integration).active()? { - IntegrationTest::new(self.integration, active, false, None)?.stop() + IntegrationTest::new(self.integration, active, false, 0)?.stop() } else { println!("No environment for {:?} is active.", self.integration); Ok(()) diff --git a/vdev/src/commands/integration/test.rs b/vdev/src/commands/integration/test.rs index 1de5dbe542fe8..170b077f66dc1 100644 --- a/vdev/src/commands/integration/test.rs +++ b/vdev/src/commands/integration/test.rs @@ -25,7 +25,8 @@ pub struct Cli { build_all: bool, /// Number of retries to allow on each integration test case. - retries: Option, + #[arg(short = 'r', long)] + retries: u8, /// Extra test command arguments args: Vec, diff --git a/vdev/src/testing/integration.rs b/vdev/src/testing/integration.rs index 16c5b9d51a50f..9c70543ec4937 100644 --- a/vdev/src/testing/integration.rs +++ b/vdev/src/testing/integration.rs @@ -22,7 +22,7 @@ pub struct IntegrationTest { compose: Option, env_config: Environment, build_all: bool, - retries: Option, + retries: u8, } impl IntegrationTest { @@ -30,7 +30,7 @@ impl IntegrationTest { integration: impl Into, environment: impl Into, build_all: bool, - retries: Option, + retries: u8, ) -> Result { let integration = integration.into(); let environment = environment.into(); @@ -109,9 +109,9 @@ impl IntegrationTest { args.push("--no-capture".to_string()); } - if let Some(retries) = self.retries { + if self.retries > 0 { args.push("--retries".to_string()); - args.push(retries.to_string()); + args.push(self.retries.to_string()); } self.runner From c2a5e6dc9a2aa632347ee81c1cca0d90adf842bf Mon Sep 17 00:00:00 2001 From: neuronull Date: Tue, 27 Jun 2023 12:24:22 -0600 Subject: [PATCH 23/33] add back the sleep before start runner --- scripts/ci-integration-test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/ci-integration-test.sh b/scripts/ci-integration-test.sh index 37639acaeaed9..5944e6bad1c98 100755 --- a/scripts/ci-integration-test.sh +++ b/scripts/ci-integration-test.sh @@ -21,6 +21,8 @@ set -x INTEGRATION=$1 +cargo vdev -v int start "${INTEGRATION}" +sleep 15 cargo vdev -v int test --retries 2 -a "${INTEGRATION}" RET=$? cargo vdev -v int stop "${INTEGRATION}" From 8f1c7584a1c0bf1229a356490296d2b07739bda2 Mon Sep 17 00:00:00 2001 From: neuronull Date: Tue, 27 Jun 2023 12:56:59 -0600 Subject: [PATCH 24/33] fix timeouts --- .github/workflows/integration-comment.yml | 68 +++++++++++----------- .github/workflows/integration.yml | 69 +++++++++++------------ 2 files changed, 68 insertions(+), 69 deletions(-) diff --git a/.github/workflows/integration-comment.yml b/.github/workflows/integration-comment.yml index 4f1b99845e980..80778ea9d78e1 100644 --- a/.github/workflows/integration-comment.yml +++ b/.github/workflows/integration-comment.yml @@ -80,7 +80,7 @@ jobs: uses: nick-fields/retry@v2 with: # First one requires more time, as we need to build the image from scratch - timeout_minutes: 25 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh amqp @@ -88,7 +88,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-appsignal') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh appsignal @@ -96,7 +96,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-aws') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh aws @@ -104,7 +104,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-axiom') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh axiom @@ -112,7 +112,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-azure') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh azure @@ -120,7 +120,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-clickhouse') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh clickhouse @@ -128,7 +128,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-databend') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh databend @@ -136,7 +136,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-agent') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh datadog-agent @@ -144,7 +144,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-logs') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh datadog-logs @@ -152,7 +152,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-metrics') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh datadog-metrics @@ -160,7 +160,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-traces') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh datadog-traces @@ -168,7 +168,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-dnstap') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh dnstap @@ -178,7 +178,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-docker-logs') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh docker-logs @@ -186,7 +186,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-elasticsearch') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh elasticsearch @@ -194,7 +194,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-eventstoredb') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh eventstoredb @@ -202,7 +202,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-fluent') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh fluent @@ -210,7 +210,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-gcp') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh gcp @@ -218,7 +218,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-humio') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh humio @@ -226,7 +226,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-http-client') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh http-client @@ -234,7 +234,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-influxdb') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh influxdb @@ -242,7 +242,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-kafka') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh kafka @@ -250,7 +250,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-logstash') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh logstash @@ -258,7 +258,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-loki') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh loki @@ -266,7 +266,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-mongodb') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh mongodb @@ -276,7 +276,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-nats') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh nats @@ -284,7 +284,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-nginx') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh nginx @@ -292,7 +292,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-opentelemetry') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh opentelemetry @@ -300,7 +300,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-postgres') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh postgres @@ -308,7 +308,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-prometheus') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh prometheus @@ -316,7 +316,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-pulsar') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh pulsar @@ -324,7 +324,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-redis') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh redis @@ -332,7 +332,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-shutdown') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh shutdown @@ -340,7 +340,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-splunk') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 10 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh splunk @@ -348,7 +348,7 @@ jobs: if: ${{ contains(github.event.comment.body, '/ci-run-integration-webhdfs') || contains(github.event.comment.body, '/ci-run-all') }} uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh webhdfs diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 06767dedaf926..3ee10039610f4 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -93,8 +93,7 @@ jobs: name: amqp uses: nick-fields/retry@v2 with: - # First one requires more time, as we need to build the image from scratch - timeout_minutes: 25 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh amqp @@ -102,7 +101,7 @@ jobs: name: appsignal uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh appsignal @@ -110,7 +109,7 @@ jobs: name: aws uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh aws @@ -118,7 +117,7 @@ jobs: name: axiom uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh axiom @@ -126,7 +125,7 @@ jobs: name: azure uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh azure @@ -134,7 +133,7 @@ jobs: name: clickhouse uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh clickhouse @@ -142,7 +141,7 @@ jobs: name: databend uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh databend @@ -150,7 +149,7 @@ jobs: name: datadog-agent uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh datadog-agent @@ -158,7 +157,7 @@ jobs: name: datadog-logs uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh datadog-logs @@ -166,7 +165,7 @@ jobs: name: datadog-metrics uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh datadog-metrics @@ -174,7 +173,7 @@ jobs: name: datadog-traces uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh datadog-traces @@ -182,7 +181,7 @@ jobs: name: dnstap uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh dnstap @@ -192,7 +191,7 @@ jobs: name: docker-logs uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh docker-logs @@ -200,7 +199,7 @@ jobs: name: elasticsearch uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh elasticsearch @@ -208,7 +207,7 @@ jobs: name: eventstoredb uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh eventstoredb @@ -216,7 +215,7 @@ jobs: name: fluent uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh fluent @@ -224,7 +223,7 @@ jobs: name: gcp uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh gcp @@ -232,7 +231,7 @@ jobs: name: humio uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh humio @@ -240,7 +239,7 @@ jobs: name: http-client uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh http-client @@ -248,7 +247,7 @@ jobs: name: influxdb uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh influxdb @@ -256,7 +255,7 @@ jobs: name: kafka uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh kafka @@ -264,7 +263,7 @@ jobs: name: logstash uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh logstash @@ -272,7 +271,7 @@ jobs: name: loki uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh loki @@ -280,7 +279,7 @@ jobs: name: mongodb uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh mongodb @@ -290,7 +289,7 @@ jobs: name: nats uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh nats @@ -298,7 +297,7 @@ jobs: name: nginx uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh nginx @@ -306,7 +305,7 @@ jobs: name: opentelemetry uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh opentelemetry @@ -314,7 +313,7 @@ jobs: name: postgres uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh postgres @@ -322,7 +321,7 @@ jobs: name: prometheus uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh prometheus @@ -330,7 +329,7 @@ jobs: name: pulsar uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh pulsar @@ -338,7 +337,7 @@ jobs: name: redis uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh redis @@ -346,7 +345,7 @@ jobs: name: shutdown uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh shutdown @@ -354,7 +353,7 @@ jobs: name: splunk uses: nick-fields/retry@v2 with: - timeout_minutes: 10 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh splunk @@ -362,7 +361,7 @@ jobs: name: webhdfs uses: nick-fields/retry@v2 with: - timeout_minutes: 5 + timeout_minutes: 30 max_attempts: 3 command: bash scripts/ci-integration-test.sh webhdfs From 0f360c3c4e5a71962b9f7690ce2b93dc260ec41d Mon Sep 17 00:00:00 2001 From: neuronull Date: Tue, 27 Jun 2023 14:04:21 -0600 Subject: [PATCH 25/33] update script modes --- scripts/ci-integration-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci-integration-test.sh b/scripts/ci-integration-test.sh index 5944e6bad1c98..d0beb2c8331c3 100755 --- a/scripts/ci-integration-test.sh +++ b/scripts/ci-integration-test.sh @@ -4,7 +4,7 @@ # This is useful to allow retrying the integration test at a higher level than # the nextest and reduce code duplication in the workflow file. -set -euo pipefail +set -u if [[ -z "${CI:-}" ]]; then echo "Aborted: this script is for use in CI." >&2 From 86dfd83bfdda96c0e29425f7a90aa02e9ab69d61 Mon Sep 17 00:00:00 2001 From: neuronull Date: Tue, 27 Jun 2023 14:32:24 -0600 Subject: [PATCH 26/33] going to need the submodules --- .github/workflows/integration-comment.yml | 2 ++ .github/workflows/integration.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/integration-comment.yml b/.github/workflows/integration-comment.yml index 80778ea9d78e1..a90d75bf8a8bd 100644 --- a/.github/workflows/integration-comment.yml +++ b/.github/workflows/integration-comment.yml @@ -70,6 +70,8 @@ jobs: runs-on: [linux, ubuntu-20.04-8core] steps: - uses: actions/checkout@v3 + with: + submodules: "recursive" - run: sudo npm -g install @datadog/datadog-ci diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 3ee10039610f4..5498cc550ade8 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -84,6 +84,8 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v3 + with: + submodules: "recursive" - run: sudo npm -g install @datadog/datadog-ci From 96ce053fa32fec31ff8e8534b4342259f35a84b3 Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 28 Jun 2023 09:45:02 -0600 Subject: [PATCH 27/33] retries should be optional --- vdev/src/commands/integration/test.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/vdev/src/commands/integration/test.rs b/vdev/src/commands/integration/test.rs index 170b077f66dc1..ca57d895bd0c8 100644 --- a/vdev/src/commands/integration/test.rs +++ b/vdev/src/commands/integration/test.rs @@ -26,7 +26,7 @@ pub struct Cli { /// Number of retries to allow on each integration test case. #[arg(short = 'r', long)] - retries: u8, + retries: Option, /// Extra test command arguments args: Vec, @@ -39,27 +39,24 @@ impl Cli { let active = EnvsDir::new(&self.integration).active()?; + let retries = self.retries.unwrap_or_default(); + match (self.environment, active) { (Some(environment), Some(active)) if environment != active => { bail!("Requested environment {environment:?} does not match active one {active:?}") } (Some(environment), _) => { - IntegrationTest::new(self.integration, environment, self.build_all, self.retries)? + IntegrationTest::new(self.integration, environment, self.build_all, retries)? .test(self.args) } (None, Some(active)) => { - IntegrationTest::new(self.integration, active, self.build_all, self.retries)? + IntegrationTest::new(self.integration, active, self.build_all, retries)? .test(self.args) } (None, None) => { for env_name in envs.keys() { - IntegrationTest::new( - &self.integration, - env_name, - self.build_all, - self.retries, - )? - .test(self.args.clone())?; + IntegrationTest::new(&self.integration, env_name, self.build_all, retries)? + .test(self.args.clone())?; } Ok(()) } From 5fec911d065b2e4573ade3d4c3a9d6b3018bb231 Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 28 Jun 2023 10:17:14 -0600 Subject: [PATCH 28/33] 4 core --- .github/workflows/integration-comment.yml | 2 +- .github/workflows/integration.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-comment.yml b/.github/workflows/integration-comment.yml index a90d75bf8a8bd..e192efa620203 100644 --- a/.github/workflows/integration-comment.yml +++ b/.github/workflows/integration-comment.yml @@ -67,7 +67,7 @@ jobs: integration-tests: needs: prep-pr - runs-on: [linux, ubuntu-20.04-8core] + runs-on: [linux, ubuntu-20.04-4core] steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 5498cc550ade8..6e10fb662e2b3 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -45,7 +45,7 @@ jobs: integration-tests: name: Integration Tests - runs-on: [linux, ubuntu-20.04-8core] + runs-on: [linux, ubuntu-20.04-4core] needs: changes if: | github.event_name == 'merge_group' || ( From fad2c931eadc463a9baf8d4cba19d21fff45c7ce Mon Sep 17 00:00:00 2001 From: neuronull Date: Mon, 3 Jul 2023 10:38:08 -0600 Subject: [PATCH 29/33] need correct runner name in the stop sub command --- scripts/ci-integration-test.sh | 2 +- vdev/src/commands/integration/stop.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/ci-integration-test.sh b/scripts/ci-integration-test.sh index d0beb2c8331c3..0d5e23de2ad0b 100755 --- a/scripts/ci-integration-test.sh +++ b/scripts/ci-integration-test.sh @@ -25,6 +25,6 @@ cargo vdev -v int start "${INTEGRATION}" sleep 15 cargo vdev -v int test --retries 2 -a "${INTEGRATION}" RET=$? -cargo vdev -v int stop "${INTEGRATION}" +cargo vdev -v int stop -a "${INTEGRATION}" ./scripts/upload-test-results.sh exit $RET diff --git a/vdev/src/commands/integration/stop.rs b/vdev/src/commands/integration/stop.rs index 84662125eff5d..22955d5fa7daf 100644 --- a/vdev/src/commands/integration/stop.rs +++ b/vdev/src/commands/integration/stop.rs @@ -9,12 +9,16 @@ use crate::testing::{integration::IntegrationTest, state::EnvsDir}; pub struct Cli { /// The integration name to stop integration: String, + + /// If true, remove the runner container compiled with all integration test features + #[arg(short = 'a', long)] + all_features: bool, } impl Cli { pub fn exec(self) -> Result<()> { if let Some(active) = EnvsDir::new(&self.integration).active()? { - IntegrationTest::new(self.integration, active, false, 0)?.stop() + IntegrationTest::new(self.integration, active, self.all_features, 0)?.stop() } else { println!("No environment for {:?} is active.", self.integration); Ok(()) From d1ad218d7b14dc13d8e637915e06ef12b6c90c70 Mon Sep 17 00:00:00 2001 From: neuronull Date: Mon, 3 Jul 2023 13:03:54 -0600 Subject: [PATCH 30/33] try no explicit start/stop --- scripts/ci-integration-test.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/ci-integration-test.sh b/scripts/ci-integration-test.sh index 0d5e23de2ad0b..889f309fe4946 100755 --- a/scripts/ci-integration-test.sh +++ b/scripts/ci-integration-test.sh @@ -21,10 +21,7 @@ set -x INTEGRATION=$1 -cargo vdev -v int start "${INTEGRATION}" -sleep 15 -cargo vdev -v int test --retries 2 -a "${INTEGRATION}" +cargo vdev -v int test -a "${INTEGRATION}" RET=$? -cargo vdev -v int stop -a "${INTEGRATION}" ./scripts/upload-test-results.sh exit $RET From 00fd38cb96e832913ebca03eae13262ff6d8b6f1 Mon Sep 17 00:00:00 2001 From: neuronull Date: Mon, 3 Jul 2023 14:23:36 -0600 Subject: [PATCH 31/33] Revert "try no explicit start/stop" This reverts commit d1ad218d7b14dc13d8e637915e06ef12b6c90c70. --- scripts/ci-integration-test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/ci-integration-test.sh b/scripts/ci-integration-test.sh index 889f309fe4946..0d5e23de2ad0b 100755 --- a/scripts/ci-integration-test.sh +++ b/scripts/ci-integration-test.sh @@ -21,7 +21,10 @@ set -x INTEGRATION=$1 -cargo vdev -v int test -a "${INTEGRATION}" +cargo vdev -v int start "${INTEGRATION}" +sleep 15 +cargo vdev -v int test --retries 2 -a "${INTEGRATION}" RET=$? +cargo vdev -v int stop -a "${INTEGRATION}" ./scripts/upload-test-results.sh exit $RET From 88637beac5d6e49b77dae20c0e7748820fb6f5d5 Mon Sep 17 00:00:00 2001 From: neuronull Date: Mon, 3 Jul 2023 14:24:50 -0600 Subject: [PATCH 32/33] give more time before running --- scripts/ci-integration-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci-integration-test.sh b/scripts/ci-integration-test.sh index 0d5e23de2ad0b..0b9e240e4ec45 100755 --- a/scripts/ci-integration-test.sh +++ b/scripts/ci-integration-test.sh @@ -22,7 +22,7 @@ set -x INTEGRATION=$1 cargo vdev -v int start "${INTEGRATION}" -sleep 15 +sleep 45 cargo vdev -v int test --retries 2 -a "${INTEGRATION}" RET=$? cargo vdev -v int stop -a "${INTEGRATION}" From aa2336d0f02cd2c392427fda6fdb5210523e3dec Mon Sep 17 00:00:00 2001 From: neuronull Date: Mon, 3 Jul 2023 16:07:40 -0600 Subject: [PATCH 33/33] try a bit shorter sleep --- .github/workflows/integration.yml | 2 +- scripts/ci-integration-test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 6e10fb662e2b3..ec28278371b9f 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -81,7 +81,7 @@ jobs: || needs.changes.outputs.splunk == 'true' || needs.changes.outputs.webhdfs == 'true' ) - timeout-minutes: 60 + timeout-minutes: 75 steps: - uses: actions/checkout@v3 with: diff --git a/scripts/ci-integration-test.sh b/scripts/ci-integration-test.sh index 0b9e240e4ec45..9687f1c1eafe6 100755 --- a/scripts/ci-integration-test.sh +++ b/scripts/ci-integration-test.sh @@ -22,7 +22,7 @@ set -x INTEGRATION=$1 cargo vdev -v int start "${INTEGRATION}" -sleep 45 +sleep 30 cargo vdev -v int test --retries 2 -a "${INTEGRATION}" RET=$? cargo vdev -v int stop -a "${INTEGRATION}"