mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-09-06 05:28:57 +00:00
* feat(ci): add aliyun ecs ephemeral runner path for query regression Signed-off-by: paomian <xpaomian@gmail.com> * fix: improve condition for query-regression job execution in workflow * feat: update Docker installation to use official repository and add GPG key handling * Refactor query regression runner setup and configuration - Removed deprecated PersistentVolumeClaim for build cache. - Introduced a new bootstrap script for setting up the ECS runner host. - Deleted obsolete Helm values files for runner configuration. - Updated the Aliyun ECS runner provisioning script to reflect new cache paths. - Modified GitHub workflows to use the new Aliyun ECS runner setup. - Adjusted documentation to clarify the new runner lifecycle and provisioning process. * fix: enhance runner service management during bootstrap process * fix: update alibabacloud_tea_openapi dependency version in metadata * feat: enhance ECS runner scripts with region_id and resource_group_id support * fix: move containerd content store to data root for improved storage management * feat: rename query-regression runner to ephemeral-github runner and update related scripts * fix: update sentinel polling method to use serial console output for improved reliability * fix: add environment variable checks for Alibaba Cloud access keys in ECS client * fix: improve error handling in GitHub API requests for better diagnostics * fix: improve cache disk detection logic for Aliyun ECS instances * fix: enhance cache disk waiting logic with detailed output and error handling * fix: update dependency version for alibabacloud_tea_openapi in teardown script * fix: enhance cache disk waiting logic for better compatibility and clarity * fix: enhance console output handling and add incremental logging during instance provisioning * fix: add PATH environment variable for runner jobs in service and provision script * fix: add machine telemetry sampling and logging during query regression jobs * fix: update query regression documentation and provision script for cache disk handling * fix: update SCCACHE_CACHE_SIZE validation to 10G for improved caching efficiency * fix: remove outdated cache size checks and cleanup logic for fresh system disk runs * fix: enhance instance deletion logic with region handling and console output export * fix: add swap file setup and OOM handling for ECS runner to improve stability * fix: update OOM handling and service restart logic for ECS runner to enhance stability * fix: increase system disk size to 100 GiB for cold double nightly builds to prevent ENOSPC errors * fix: increase system disk size to 150 GiB for ECS runner to prevent ENOSPC errors * fix: add keep_instance option to preserve ECS instance for post-mortem debugging * fix: disable unattended upgrades to prevent job cancellations during library updates * fix: reduce system disk size to 40 GiB for ECS runner to prevent ENOSPC errors * feat: Refactor Aliyun ECS runner provisioning and introduce nightly regression comparison - Update `aliyun-ecs-runner-provision.py` to remove cache disk handling, simplifying the provisioning process. - Introduce `query-regression-nightly-refs.py` to resolve and compare SHAs from successful nightly builds. - Create `query-regression-nightly.yml` workflow to trigger nightly comparisons based on successful builds. - Enhance `query-regression.yml` to include a `test-tooling` job for validating Python scripts before provisioning. - Update tests for the new nightly reference selection logic and refactor existing tests to align with the new caching strategy. - Modify documentation to reflect changes in caching and nightly comparison workflows. * fix: enhance runner image tool verification with detailed checks * fix: improve error handling in runner image tool verification * fix: update tool versions in ECS image and workflow for consistency * fix: correct typo in error message for unparseable ECS creation time * fix: update README and workflow files for query regression tests and image hygiene --------- Signed-off-by: paomian <xpaomian@gmail.com>
105 lines
3.8 KiB
YAML
105 lines
3.8 KiB
YAML
name: Query Regression Nightly
|
|
|
|
# After a successful GreptimeDB Nightly Build, compare that commit against
|
|
# the previous successful nightly. The reusable Query Regression workflow
|
|
# still compiles both SHAs; this wrapper only resolves which two SHAs.
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows:
|
|
- GreptimeDB Nightly Build
|
|
types:
|
|
- completed
|
|
workflow_dispatch:
|
|
inputs:
|
|
base_ref:
|
|
description: Base ref/SHA (empty = previous successful nightly)
|
|
required: false
|
|
type: string
|
|
default: ""
|
|
candidate_ref:
|
|
description: Candidate ref/SHA (empty = latest successful nightly)
|
|
required: false
|
|
type: string
|
|
default: ""
|
|
candidate_run_id:
|
|
description: Nightly Build run id to treat as candidate (empty = latest)
|
|
required: false
|
|
type: string
|
|
default: ""
|
|
case:
|
|
description: Query perf case path(s), all, or heavy
|
|
required: false
|
|
type: string
|
|
default: all
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
|
|
jobs:
|
|
resolve-refs:
|
|
name: Resolve previous vs current nightly SHAs
|
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
outputs:
|
|
skip: ${{ steps.refs.outputs.skip }}
|
|
reason: ${{ steps.refs.outputs.reason }}
|
|
base_sha: ${{ steps.refs.outputs.base_sha }}
|
|
candidate_sha: ${{ steps.refs.outputs.candidate_sha }}
|
|
steps:
|
|
- name: Checkout ref resolver
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Resolve nightly SHAs
|
|
id: refs
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
CANDIDATE_RUN_ID: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.id || inputs.candidate_run_id || '' }}
|
|
BASE_REF: ${{ github.event_name == 'workflow_dispatch' && inputs.base_ref || '' }}
|
|
CANDIDATE_REF: ${{ github.event_name == 'workflow_dispatch' && inputs.candidate_ref || '' }}
|
|
run: python3 .github/scripts/query-regression-nightly-refs.py
|
|
|
|
- name: Summarize comparison
|
|
if: always()
|
|
env:
|
|
SKIP: ${{ steps.refs.outputs.skip }}
|
|
REASON: ${{ steps.refs.outputs.reason }}
|
|
BASE_SHA: ${{ steps.refs.outputs.base_sha }}
|
|
CANDIDATE_SHA: ${{ steps.refs.outputs.candidate_sha }}
|
|
BASE_RUN_URL: ${{ steps.refs.outputs.base_run_url }}
|
|
CANDIDATE_RUN_URL: ${{ steps.refs.outputs.candidate_run_url }}
|
|
run: |
|
|
set -euo pipefail
|
|
{
|
|
if [[ "${SKIP}" == "true" ]]; then
|
|
printf 'Skipping query-regression nightly: %s\n' "${REASON}"
|
|
else
|
|
printf 'Comparing previous nightly `%s` -> current nightly `%s`\n' \
|
|
"${BASE_SHA}" "${CANDIDATE_SHA}"
|
|
if [[ -n "${BASE_RUN_URL}" ]]; then
|
|
printf -- '- Previous Nightly Build: %s\n' "${BASE_RUN_URL}"
|
|
fi
|
|
if [[ -n "${CANDIDATE_RUN_URL}" ]]; then
|
|
printf -- '- Current Nightly Build: %s\n' "${CANDIDATE_RUN_URL}"
|
|
fi
|
|
fi
|
|
} | tee -a "${GITHUB_STEP_SUMMARY}"
|
|
|
|
query-regression:
|
|
name: Query regression nightly
|
|
needs: [resolve-refs]
|
|
if: ${{ needs.resolve-refs.outputs.skip != 'true' && needs.resolve-refs.outputs.base_sha != '' && needs.resolve-refs.outputs.candidate_sha != '' }}
|
|
uses: ./.github/workflows/query-regression.yml
|
|
secrets: inherit
|
|
with:
|
|
case: ${{ github.event_name == 'workflow_dispatch' && inputs.case || 'all' }}
|
|
base_ref: ${{ needs.resolve-refs.outputs.base_sha }}
|
|
candidate_ref: ${{ needs.resolve-refs.outputs.candidate_sha }}
|
|
cargo_profile: nightly
|
|
runner: aliyun-ecs
|