ci: validate Prometheus with the File/S3 benchmark runtime

Signed-off-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
WenyXu
2026-11-06 03:33:42 +00:00
parent 5148b2f604
commit bb6274aba4
2 changed files with 14 additions and 3 deletions
+2 -2
View File
@@ -56,7 +56,7 @@ on:
default: v3.2.1@sha256:6927e0919a144aa7616fd0137d4816816d42f6b816de3af269ab065250859a62
required: true
runtime_image:
description: 'Runtime image: auto = pinned S3 test runtime on ACR; explicit tag/digest overrides'
description: 'Runtime image: auto = pinned Prometheus/File/S3 runtime on ACR; explicit tag/digest overrides'
type: string
default: auto
required: true
@@ -116,7 +116,7 @@ env:
GREPTIMEDB_TAG: ${{ inputs.greptimedb_tag }}
VICTORIAMETRICS_TAG: ${{ inputs.victoriametrics_tag }}
PROMETHEUS_TAG: ${{ inputs.prometheus_tag }}
RUNTIME_IMAGE: ${{ inputs.runtime_image != 'auto' && inputs.runtime_image || 'greptime-registry.cn-hangzhou.cr.aliyuncs.com/tools/o11ybench-runtime:s3-test-b0cf5204d2fc@sha256:c2bf622db6056a2029842f4dc1cc1f37b82773bd45b134a0a83ffe2a8cd62214' }}
RUNTIME_IMAGE: ${{ inputs.runtime_image != 'auto' && inputs.runtime_image || 'greptime-registry.cn-hangzhou.cr.aliyuncs.com/tools/o11ybench-runtime:345b6f7c-prometheus-s3@sha256:39d207f4a9c479b8614b8283e2d049fc8f430fcbd2b3362ce3035cfbf294edf9' }}
PROVIDER: ${{ inputs.provider }}
REQUESTED_INSTANCE_TYPE: ${{ inputs.instance_type }}
SYSTEM_DISK_GIB: ${{ inputs.system_disk_gib }}
+12 -1
View File
@@ -45,13 +45,15 @@ class StorageTests(unittest.TestCase):
plan = dict(output_root='/tmp/o11ybench-test', run_id='test',
data=dict(generate=True, data_home='/tmp/o11ybench-test/data'),
targets=[dict(name='greptimedb', storage=dict(type='file')),
dict(name='greptimedb-s3', storage=dict(type='s3', root='owned/prefix/'))],
dict(name='greptimedb-s3', storage=dict(type='s3', root='owned/prefix/')),
dict(name='prometheus', kind='prometheus')],
report=dict(root='old', index_html='old/index.html'),
artifacts=dict(run_manifest='old/run-manifest.json'),
query=dict(modes=['serial'], serial_tries=5))
original = copy.deepcopy(plan)
children = storage.split_metrics(plan)
self.assertEqual(plan, original)
self.assertEqual(set(children), {'greptimedb', 'greptimedb-s3', 'prometheus'})
for name, child in children.items():
self.assertEqual(child['query'], plan['query'])
self.assertEqual(child['data'], dict(plan['data'], generate=False))
@@ -61,6 +63,15 @@ class StorageTests(unittest.TestCase):
self.assertTrue(child['report']['root'].startswith(child['output_root']))
self.assertNotEqual(children['greptimedb']['run_id'], children['greptimedb-s3']['run_id'])
def test_prometheus_workflow_wiring(self):
text = (ROOT / '.github/workflows/vmbench-long-range.yml').read_text()
step = text.split(' - name: Load and benchmark Prometheus\n', 1)[1].split(' - name:', 1)[0]
self.assertIn("steps.generate.outcome == 'success' && inputs.run_prometheus", step)
self.assertIn('metrics-run --target prometheus', step)
self.assertIn('for target in greptimedb victoriametrics prometheus;', text)
cleanup = text.split(' - name: Clean up owned containers', 1)[1].split(' - name:', 1)[0]
self.assertIn('greptimedb-s3-baseline victoriametrics prometheus; do', cleanup)
def test_missing_s3_arm_is_not_a_success(self):
with tempfile.TemporaryDirectory() as tmp:
root = Path(tmp)