Files
Rodrigo Zhouandrodrigozhou c011e75710 Fix buildkite cassandra setup (#5263)
## What changed?
<!-- Describe what has changed in this PR -->
Specify patch version of Cassandra image to use in buildkite.

## Why?
<!-- Tell your future self why have you made these changes -->
It seems that the latest version (3.11.16) has some issues with buildkite (`Cassandra 3.0 and later require Java 8u40 or later.`)

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? -->

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this change to production? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) -->
2024-01-12 13:16:43 -06:00
..
2023-10-12 17:33:35 -05:00

Using Buildkite

Buildkite simply runs docker containers. So it is easy to perform the same build locally that BuildKite will do.

Testing the build locally

One-Time Setup

Create an empty directory at /usr/bin/buildkite-agent. This directory is mounted as a volume and must be present for the container to start.

Run Locally

To run tests locally use docker-compose run command in develop/buildkite directory:

cd develop/buildkite
docker-compose run <container_name> <command>

Get <container_name> and <command> form pipeline.yml:

  - label: ":golang: integration test with cassandra"
    agents:
      queue: "default"
      docker: "*"
    command: "make integration-test-coverage"    # command to run in container
    artifact_paths:
      - "build/coverage/*.out"
    retry:
      automatic:
        limit: 1
    plugins:
      - docker-compose#v3.1.0:
          run: integration-test-cassandra        # container name
          config: docker-compose.yml

For example to run unit tests:

docker-compose run unit-test make unit-test-coverage

or run integration tests with Cassandra:

docker-compose run integration-test-cassandra make integration-test-coverage

or run integration tests with MySQL:

docker-compose run integration-test-mysql make integration-test-coverage

Testing the build in Buildkite

Creating a PR against the main branch will trigger the Buildkite build. Members of the Temporal team can view the build pipeline here: https://buildkite.com/temporal/temporal-server.

Eventually this pipeline should be made public. It will need to ignore third party PRs for safety reasons.