8000 CI: New Manual workflow for testing 2 builds by bbpetukhov · Pull Request #744 · bloomberg/blazingmq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CI: New Manual workflow for testing 2 builds #744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 115 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
8000
Select commit Hold shift + click to select a range
0486786
Can checkout 2 refs
bbpetukhov Apr 29, 2025
dfa7952
Refactor manual ci
bbpetukhov Apr 29, 2025
fa35a1b
Can run ITs for 2 broker versions
bbpetukhov Apr 29, 2025
ba83d72
fix manual ci
bbpetukhov Apr 29, 2025
a072147
Fix build; fix run UTs
bbpetukhov Apr 30, 2025
9e10a81
Fix ITs in manual ci
bbpetukhov Apr 30, 2025
7d88fa7
Add cache_key_suffix
bbpetukhov Apr 30, 2025
7e69525
Cancel build if cache exists
bbpetukhov Apr 30, 2025
b25e133
Fix more typos
bbpetukhov Apr 30, 2025
59132b4
Do not use global variables
bbpetukhov Apr 30, 2025
b38e548
CI Manual fail-on-cache-miss: true
bbpetukhov May 2, 2025
918724a
Save build to artifact instead of cache
bbpetukhov May 2, 2025
59ffde8
Fix ITs run script location
bbpetukhov May 2, 2025
842a065
Add some ls cmds for testsing
bbpetukhov May 2, 2025
dcc90c9
do not save to aftifacts /opt/bb/include
bbpetukhov May 2, 2025
fd14240
Add chmod +x for broker
bbpetukhov May 2, 2025
edc9725
Add +x for all .tsk
bbpetukhov May 2, 2025
487fd49
Fix path in download-artifact include
bbpetukhov May 2, 2025
60629d0
Can preset leader via env var BLAZINGMQ_LEADER_NAME
bbpetukhov Apr 9, 2025
1974f2b
Refactor manual workflow; fix prometheus build job
bbpetukhov May 5, 2025
1ec3a9f
Refactor manual wf
bbpetukhov May 5, 2025
507efe2
fix cache restore
bbpetukhov May 5, 2025
4bd649e
Fix fuzz tests
bbpetukhov May 5, 2025
8c06d38
Load build from cache for fuzztest
bbpetukhov May 5, 2025
cbe39fa
Can cleaun up artifacts after manual run
bbpetukhov May 5, 2025
61a360f
Run cleanup always
bbpetukhov May 5, 2025
255d6e8
Fix artifacts cleanup
bbpetukhov May 6, 2025
37a9f9b
Customize build_ubuntu workflow
bbpetukhov May 6, 2025
c18b839
Update passing cache_key
bbpetukhov May 6, 2025
94a7a80
Swtich from cache to artifacts
bbpetukhov May 6, 2025
85d1f15
Fix include artifact name
bbpetukhov May 6, 2025
6717e79
Fix permission in fuzztest
bbpetukhov May 6, 2025
747505f
Fix fuzztests
bbpetukhov May 6, 2025
7187fb3
wip
bbpetukhov Apr 15, 2025
4464d69
Configure tests to update broker binary
bbpetukhov May 6, 2025
a1a25d2
merge with upstream main
bbpetukhov May 7, 2025
7247f5e
Do not remove build artifacts
bbpetukhov May 7, 2025
dbd5755
Do not assert and crash python wrapper if BLAZINGMQ_BROKER_NEW_VERSIO…
bbpetukhov May 7, 2025
b613225
Add comments
bbpetukhov May 7, 2025
dd8b7e1
refactor pixtures - remove redundant variables
bbpetukhov May 7, 2025
abf1233
Add more test for broker binary update
bbpetukhov May 7, 2025
748080c
cache build
bbpetukhov May 8, 2025
4472acb
fix redeploy IT
bbpetukhov May 8, 2025
e4ac608
Update build_ubuntu cache
bbpetukhov May 8, 2025
60fda0e
Fix redeploy tests
bbpetukhov May 9, 2025
6ac7feb
Make sure cluster is ready before running test
bbpetukhov May 9, 2025
e068bd1
BLAZINGMQ_LEADER_NAME can be empty for default behavior
bbpetukhov May 9, 2025
d31a4d5
Do not delete build artifacts after manual wf
bbpetukhov May 9, 2025
4f210f5
Remove redundant code
bbpetukhov May 12, 2025
aa7e628
Merge remote-tracking branch 'upstream/main' into manual-ci
bbpetukhov May 12, 2025
87f0fbd
Run existing multi ITs on manual workflow run
bbpetukhov May 12, 2025
96df93e
Fix pylint errors
bbpetukhov May 12, 2025
612133c
Disable UTs as part of all target
bbpetukhov May 12, 2025
0aed40a
Fix more pylint errors
bbpetukhov May 12, 2025
fe2a444
Suppress pylint import error for cluster fixture
bbpetukhov May 12, 2025
ae84f13
Install tproxy for all ITs
bbpetukhov May 12, 2025
5dd94ec
Merge branch 'main' into manual-ci
bbpetukhov May 12, 2025
5c42fcd
Get ITs from current branch
bbpetukhov May 13, 2025
ae7bf92
Change build cache key to avoid incorret fallbacks
bbpetukhov May 13, 2025
a44d16a
Enable all ITs combinations
bbpetukhov May 13, 2025
c9be25a
Fix paths for proxy nodes
bbpetukhov May 13, 2025
8090b57
Set bmq tool path
bbpetukhov May 13, 2025
ff62f18
Merge remote-tracking branch 'upstream/main' into manual-ci
bbpetukhov May 13, 2025
1f33d59
Clean up build.yaml
bbpetukhov May 13, 2025
37a0f30
Reenable all.t target in CMakeLists
bbpetukhov May 13, 2025
ca62f4f
Build target "bmqbrkr bmqtool" instead of "all"
bbpetukhov May 13, 2025
de41065
Remove default all build target in build-ubuntu workflow
bbpetukhov May 14, 2025
b0a5e4c
Add description section for the workflows
bbpetukhov May 14, 2025
5038309
Raname brokers param
bbpetukhov May 23, 2025
a793683
Update src/integration-tests/test_redeploy.py
bbpetukhov May 26, 2025
6fc5ef3
Update .github/workflows/manual.yaml - add "legacy_mode"
bbpetukhov May 26, 2025
6b60faf
Update .github/workflows/manual.yaml - add "eventual_consistency"
bbpetukhov May 26, 2025
09ee916
Add explicit comments for groups of brokers per binary
bbpetukhov May 26, 2025
911beb1
Merge branch 'main' into manual-ci
bbpetukhov May 26, 2025
4ed6adf
Extend redeploy test - post message after each node redeploy; impleme…
bbpetukhov May 28, 2025
baf55c2
Add explicit params save_build_as_artifacts and run_unit_tests for bu…
bbpetukhov May 28, 2025
3b2fc46
Run ruff format
bbpetukhov May 28, 2025
e18bb7c
Add comments explaining using deps in build_and_test_bmqprometheus_pl…
bbpetukhov May 28, 2025
a8fd418
Fix input vars types, add comments
bbpetukhov May 28, 2025
90ae7b0
Merge branch 'main' into manual-ci
bbpetukhov Jun 2, 2025
6f53c68
Use correct build artifact for storagetool ITs
bbpetukhov Jun 2, 2025
e5253da
Add +x permissions for binaries in storagetool tests
bbpetukhov Jun 2, 2025
65b626c
Update .github/workflows/build-ubuntu.yaml
bbpetukhov Jun 3, 2025
4fad4e0
Update .github/workflows/build-ubuntu.yaml
bbpetukhov Jun 3, 2025
1859f1c
Change conditions from =="all.t" to contains
bbpetukhov Jun 3, 2025
45de1ac
Update .github/workflows/build-ubuntu.yaml
bbpetukhov Jun 3, 2025
3472b08
Update .github/workflows/build-ubuntu.yaml
bbpetukhov Jun 3, 2025
2442142
Update .github/workflows/manual.yaml
bbpetukhov Jun 3, 2025
51db816
Update .github/workflows/manual.yaml
bbpetukhov Jun 3, 2025
491d03d
Update .github/workflows/build-ubuntu.yaml
bbpetukhov Jun 4, 2025
ea3d9c1
Merge branch 'main' into manual-ci
bbpetukhov Jun 4, 2025
6ceb6f4
Migrate multi3 to multi7 fixture
bbpetukhov Jun 4, 2025
8b3b471
Optimize: do not cache build results if they are not to be saved as a…
bbpetukhov Jun 4, 2025
1b0097b
Merge branch 'bloomberg:main' into manual-ci
bbpetukhov Jun 4, 2025
d8825c2
Fix artifact name collision for when same ref is used for both builds…
bbpetukhov Jun 5, 2025
939c577
For new ITs it is enough to specify BLAZINGMQ_BROKER for old broker v…
bbpetukhov Jun 5, 2025
3ef77aa
Merge branch 'main' into manual-ci
bbpetukhov Jun 16, 2025
b3e7f83
Do not check exist code on cluster shutdown in legacy mode
bbpetukhov Jun 16, 2025
0e4fb90
Disable parallel pytest execution for multi 7-node cluster fixture
bbpetukhov Jun 17, 2025
75506bf
Increased timeout for 7-node cluster running on CI 4-cpu machine
bbpetukhov Jun 18, 2025
c7dce91
New redeploy test - restart node one by one
bbpetukhov Jun 19, 2025
7c07369
Lint format
bbpetukhov Jun 19, 2025
bf5cf79
Merge branch 'main' into manual-ci
bbpetukhov Jun 19, 2025
ae8c98a
Fix stop_some_nodes method
bbpetukhov Jun 20, 2025
c890091
Fix redeploy tests -- do not check for leader ready when replica is u…
bbpetukhov Jun 23, 2025
78b0530
Merge branch 'bloomberg:main' into manual-ci
bbpetukhov Jun 23, 2025
2418a76
Use correct broker entity in redeploy IT
bbpetukhov Jun 23, 2025
fc6bd52
Restrict leader change in whole cluster restart test
bbpetukhov Jun 23, 2025
799fbed
Refactor cluster python class: remove redundant functionality to mana…
bbpetukhov Jun 24, 2025
21365a6
Merge branch 'main' into manual-ci
bbpetukhov Jun 24, 2025
a9f85d4
Merge branch 'main' into manual-ci
bbpetukhov Jun 24, 2025
32eb383
Merge branch 'main' into manual-ci
bbpetukhov Jun 26, 2025
d65a577
Fix merge conflicts
bbpetukhov Jun 26, 2025
b9ed2b0
Remove reverse_proxy for multi7 cluster it fixture
bbpetukhov Jun 26, 2025
bf5db2d
Merge branch 'main' into manual-ci
bbpetukhov Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 163 additions & 0 deletions .github/workflows/build-ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: Build Ubuntu

description: |
This is a reusable workflow to build BlazingMQ on Ubuntu.
Optionally run unit tests if the target is "all.t".
Given a ref and a target, this workflow will build the project and will save the build results both as artifact and in cache.
The cache key is generated based on the ref and the target, and is returned via workflow output.

on:
workflow_call:
inputs:
ref:
description: "Branch name, tag, or commit SHA to build"
required: true
type: string
target:
description: "Build targets, space-delimited"
required: true
type: string
save_build_as_artifacts:
description: "Whether to save the build as artifacts"
required: true
type: boolean
default: true
run_unit_tests:
description: "Whether to run unit tests. Can only be set to true if `all.t` is one of the build targets"
required: true
type: boolean
default: false
name:
description: "Name of the workflow run, used for artifacts"
required: false
type: string
default: "build-ubuntu"
outputs:
artifact_key:
description: "GH Actions Cache key associated with the built dependencies"
value: ${{ jobs.build_ubuntu.outputs.artifact_key }}

jobs:
get_dependencies:
name: "Dependencies"
uses: ./.github/workflows/dependencies.yaml

build_ubuntu:
name: Build [ubuntu] ${{ inputs.ref }} ${{ inputs.target }}
runs-on: ubuntu-latest
needs: get_dependencies
outputs:
artifact_key: ${{ steps.get_cache_key.outputs.artifact_key }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
fetch-depth: 0

# Since input.ref can be a branch, tag or commit SHA,
# we need to get the commit SHA to use it in the cache key.
- name: Generate cache key from commit SHA
id: get_cache_key
if: inputs.save_build_as_artifacts == true # Variable type is boolean, thus no quotes
# When restoring from cache fails, it searches for other keys to fall back to.
# If the given key is a prefix of another key, it will be used.
# E.g. "...-all" can fallback to "...-all.t"
# Thus do not put the target at the end of the key.
run: |
COMMIT_SHA=$(git rev-parse HEAD)
echo "cache_key=cache-${{ inputs.target }}-${COMMIT_SHA}" >> $GITHUB_OUTPUT
echo "artifact_key=${{ inputs.name }}-${{ inputs.target }}-${COMMIT_SHA}" >> $GITHUB_OUTPUT
- uses: actions/cache/restore@v4
id: build-cache-restore-step
if: inputs.save_build_as_artifacts == true # Variable type is boolean, thus no quotes
with:
path: |
build/blazingmq
deps
key: ${{ steps.get_cache_key.outputs.cache_key }}

# The following steps restore cached deps
# If the cache is not hit, it will build and install the dependencies
# If the cache is hit, building deps is skipped, only make install is run
- uses: actions/cache/restore@v4
if: steps.build-cache-restore-step.outputs.cache-hit != 'true' # Variable type is string, thus using quotes
with:
path: deps
key: ${{ needs.get_dependencies.outputs.cache_key }}
- name: Set up dependencies
if: steps.build-cache-restore-step.outputs.cache-hit != 'true' # Variable type is string, thus using quotes
run: |
sudo apt-get update
sudo apt-get install -qy build-essential \
gdb \
curl \
python3.10 \
python3-pip \
cmake \
ninja-build \
pkg-config \
bison \
libfl-dev \
libbenchmark-dev \
libgmock-dev \
libz-dev
- name: Install cached non packaged dependencies
if: steps.build-cache-restore-step.outputs.cache-hit != 'true' # Variable type is string, thus using quotes
working-directory: deps
run: ../docker/build_deps.sh

# Build BlazingMQ
- name: Build BlazingMQ
if: steps.build-cache-restore-step.outputs.cache-hit != 'true' # Variable type is string, thus using quotes
env:
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/opt/bb/lib64/pkgconfig
run: |
cmake -S . -B build/blazingmq -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/deps/srcs/bde-tools/BdeBuildSystem/toolchains/linux/gcc-default.cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DBDE_BUILD_TARGET_SAFE=ON \
-DBDE_BUILD_TARGET_64=ON \
-DBDE_BUILD_TARGET_CPP17=ON \
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/deps/srcs/bde-tools/BdeBuildSystem \
-DCMAKE_INSTALL_LIBDIR=lib64
cmake --build build/blazingmq --parallel 8 --target ${{ inputs.target }}

- name: Clean-up build directories before caching
if: steps.build-cache-restore-step.outputs.cache-hit != 'true' # Variable type is string, thus using quotes
run: |
find . -name "*.o" -type f -delete
find . -name "*.a" -type f -delete

- name: Run UT [c++]
if: contains(inputs.target, 'all.t') && inputs.run_unit_tests == true # Variable type is boolean, thus no quotes
run: |
cd ${{ github.workspace }}/build/blazingmq
ctest --output-on-failure -L \^unit\$

- name: Fail if requrested to run UTs, they were not built
if: contains(inputs.target, 'all.t') == false && inputs.run_unit_tests == true # Variable type is boolean, thus no quotes
run: |
echo "Unit tests were requested to run, but the target does not include 'all.t'."
echo "Please set the target to include 'all.t' to build unit tests."
exit 1

- uses: actions/upload-artifact@v4
if: inputs.save_build_as_artifacts == true # Variable type is boolean, thus no quotes
with:
path: |
build/blazingmq
deps
name: ${{ steps.get_cache_key.outputs.artifact_key }}
retention-days: 1

- name: Build Cache Save
# Type of "save_build_as_artifacts" variable is boolean, thus no quotes
# Type of "cache-hit" variable is string, thus using quotes
if: inputs.save_build_as_artifacts == true && steps.build-cache-restore-step.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
build/blazingmq
deps
key: ${{ steps.get_cache_key.outputs.cache_key }}
Loading
Loading
0