diff --git a/.github/actions/create_workflow_report/create_workflow_report.py b/.github/actions/create_workflow_report/create_workflow_report.py index 3ecdb5db1a8b6..705c9ad6ff101 100755 --- a/.github/actions/create_workflow_report/create_workflow_report.py +++ b/.github/actions/create_workflow_report/create_workflow_report.py @@ -29,7 +29,10 @@ DATABASE_PASSWORD_VAR = "CLICKHOUSE_TEST_STAT_PASSWORD" S3_BUCKET = "altinity-build-artifacts" GITHUB_REPO = "Altinity/ClickHouse" +GITHUB_GIT_URL = f"https://github.com/{GITHUB_REPO}.git" GITHUB_TOKEN = os.getenv("GITHUB_TOKEN") or os.getenv("GH_TOKEN") +# Release tags are fetched here rather than refs/tags/ so local tags are never touched. +RELEASE_TAG_REF_PREFIX = "refs/workflow-report/tags/" # Resolve from this file so discovery works from repo root or the action folder. KNOWN_FAILS_FILE = ( Path(__file__).resolve().parents[3] / "tests" / "broken_tests.yaml" @@ -232,8 +235,10 @@ def _enrich_prs_in_release_merge_prs(df: pd.DataFrame, repo: str) -> pd.DataFram def _git_rev_parse(ref: str, cwd: str | None) -> str | None: + # Peel to a commit so a raw SHA that is not in the object store fails. + # git rev-parse --verify <40-hex> succeeds even when the object is missing. p = subprocess.run( - ["git", "rev-parse", "--verify", ref], + ["git", "rev-parse", "--verify", f"{ref}^{{commit}}"], cwd=cwd, capture_output=True, text=True, @@ -253,7 +258,7 @@ def _git_is_ancestor(ancestor: str, descendant: str, cwd: str | None) -> bool: def _git_log_merge_prs( - baseline: str, branch_ref: str, cwd: str | None, repo: str + baseline: str, commit_sha: str, cwd: str | None, repo: str ) -> pd.DataFrame: p = subprocess.run( [ @@ -261,7 +266,7 @@ def _git_log_merge_prs( "-c", "core.quotepath=false", "log", - f"{baseline}..{branch_ref}", + f"{baseline}..{commit_sha}", "--merges", "--format=%H%x09%s", ], @@ -297,15 +302,11 @@ def _git_log_merge_prs( return df -def _find_release_baseline( - branch_ref: str, repo: str, cwd: str | None -) -> tuple[str | None, str | None]: - """Return (tag_name, tag_sha) for the latest - non-draft release tag that is an ancestor of branch_ref. - Version-tag refs skip the matching release so the range is previous→this tag. - """ +def _get_github_releases(repo: str) -> list[dict]: + """Non-draft GitHub releases of repo, newest first.""" if not GITHUB_TOKEN: - return None, None + print("GITHUB_TOKEN is not set; skipping GitHub releases lookup") + return [] headers = { "Authorization": f"token {GITHUB_TOKEN}", "Accept": "application/vnd.github.v3+json", @@ -318,31 +319,44 @@ def _find_release_baseline( raise Exception( f"GitHub API request failed: {response.status_code} {response.text}" ) + return [rel for rel in response.json() if not rel.get("draft")] + + +def _find_release_baseline( + branch_ref: str, + releases: list[dict], + cwd: str | None, + commit_sha: str, +) -> tuple[str | None, str | None, str | None]: + """Return (tag_name, tag_sha, published_date YYYY-MM-DD) for the latest + release tag in releases that is an ancestor of commit_sha. + Version-tag refs skip the matching release so the range is previous→this tag. + """ parsed = _parse_release_ref(branch_ref) skip_current = parsed is not None and parsed[2] is not None - for rel in response.json(): - if rel.get("draft"): - continue + for rel in releases: tag_name = rel.get("tag_name") if not tag_name: continue - tag_sha = _git_rev_parse(tag_name, cwd) + tag_sha = _release_tag_sha(tag_name, cwd) if not tag_sha: continue - if not _git_is_ancestor(tag_sha, branch_ref, cwd): + if not _git_is_ancestor(tag_sha, commit_sha, cwd): continue - if skip_current and _git_is_ancestor(branch_ref, tag_sha, cwd): + if skip_current and _git_is_ancestor(commit_sha, tag_sha, cwd): continue - return tag_name, tag_sha - return None, None + published_at = rel.get("published_at") or rel.get("created_at") or "" + published_date = published_at[:10] if published_at else None + return tag_name, tag_sha, published_date + return None, None, None -def _find_rebase_baseline(branch_ref: str, cwd: str | None) -> str | None: +def _find_rebase_baseline(commit_sha: str, cwd: str | None) -> str | None: p = subprocess.run( [ "git", "log", - branch_ref, + commit_sha, "--reverse", "-i", "-E", @@ -382,11 +396,113 @@ def _git_commit_time(sha: str, cwd: str | None) -> str | None: ) +def _git_is_shallow(cwd: str | None) -> bool: + p = subprocess.run( + ["git", "rev-parse", "--is-shallow-repository"], + cwd=cwd, + capture_output=True, + text=True, + check=True, + ) + return p.stdout.strip() == "true" + + +def _git_fetch(options: list[str], refspecs: list[str], cwd: str | None) -> None: + p = subprocess.run( + ["git", "fetch", *options, GITHUB_GIT_URL, *refspecs], + cwd=cwd, + capture_output=True, + text=True, + check=False, + ) + if p.returncode != 0: + raise Exception(f"git fetch failed: {p.stderr.strip()}") + + +def _release_tag_sha(tag_name: str, cwd: str | None) -> str | None: + return _git_rev_parse(f"{RELEASE_TAG_REF_PREFIX}{tag_name}", cwd) + + +def _read_autogenerated_versions(sha: str, cwd: str | None) -> tuple[int, int]: + p = subprocess.run( + ["git", "show", f"{sha}:cmake/autogenerated_versions.txt"], + cwd=cwd, + capture_output=True, + text=True, + check=True, + ) + major = re.search(r"SET\(VERSION_MAJOR (\d+)\)", p.stdout) + minor = re.search(r"SET\(VERSION_MINOR (\d+)\)", p.stdout) + if not major or not minor: + raise Exception(f"Cannot read version from {sha}") + return int(major.group(1)), int(minor.group(1)) + + +def _filter_releases_to_version_line( + releases: list[dict], + branch_ref: str, + commit_sha: str, + cwd: str | None, +) -> list[dict]: + """Keep GitHub releases that belong on commit_sha's version line.""" + parsed = _parse_release_ref(branch_ref) + if parsed is not None: + flavour, minor_version, _ = parsed + suffix = f"altinity{flavour}" + prefix = f"v{minor_version}." + return [ + rel + for rel in releases + if (tag := rel.get("tag_name")) + and tag.startswith(prefix) + and tag.endswith(f".{suffix}") + ] + major, minor = _read_autogenerated_versions(commit_sha, cwd) + prefix = f"v{major}.{minor}." + return [ + rel + for rel in releases + if (tag := rel.get("tag_name")) and tag.startswith(prefix) + ] + + +def _fetch_release_tags(releases: list[dict], cwd: str) -> None: + """Fetch release tags into RELEASE_TAG_REF_PREFIX; skip tags missing remotely.""" + for rel in releases: + tag_name = rel.get("tag_name") + if not tag_name: + continue + try: + _git_fetch( + ["--no-tags"], + [f"+refs/tags/{tag_name}:{RELEASE_TAG_REF_PREFIX}{tag_name}"], + cwd, + ) + except Exception as e: + # NOTE (strtgbb): one deleted remote tag must not abort the section, but + # if it is the newest release the baseline moves back to an older one + print(f"WARNING: skipping release tag {tag_name}: {e}") + + +def _fetch_commit(commit_sha: str, cwd: str) -> None: + """Fetch the workflow commit from GITHUB_GIT_URL. + + Local checkouts might be a different branch and might not have the run SHA yet. + --filter/--unshallow would convert a full clone into a partial one, so those + options are used only when the checkout is already shallow. + """ + if _git_is_shallow(cwd): + _git_fetch(["--filter=tree:0", "--unshallow"], [commit_sha], cwd) + else: + _git_fetch(["--no-tags"], [commit_sha], cwd) + + def get_prs_in_release_dataframe( branch_ref: str = "HEAD", *, repo: str = GITHUB_REPO, cwd: str, + commit_sha: str, ) -> tuple[pd.DataFrame, str | None]: f""" PRs merged into branch_ref that belong in the next release notes: after the latest GitHub @@ -394,57 +510,33 @@ def get_prs_in_release_dataframe( Merge commits whose subject is from the upstream repository (ClickHouse/) are omitted. Columns: pr_number, pr_name, labels. + commit_sha is the workflow commit from the GitHub Actions API. + Returns (dataframe, baseline commit time as UTC YYYY-MM-DDTHH:MM:SSZ or None). """ - branch_sha = _git_rev_parse(branch_ref, cwd) - if not branch_sha: - raise Exception(f"Cannot resolve branch ref: {branch_ref!r}") - - # CI often checks out with --depth=1 and --no-tags; fetch tags once, then deepen - # in steps until a baseline is reachable. - # Observed baseline distances are ~1k commits and grow slowly, so DEEPEN_CAP sits - # well above that; the cap exists so a failed lookup fails fast instead of fetching - # the branch's entire (100k+ commit) history. - DEEPEN_STEP = 250 - DEEPEN_CAP = 10000 - - subprocess.run( - ["git", "fetch", "--tags", "origin"], - cwd=cwd, - capture_output=True, - text=True, - check=False, + _fetch_commit(commit_sha, cwd) + resolved = _git_rev_parse(commit_sha, cwd) + if not resolved: + raise Exception(f"Cannot resolve commit: {commit_sha!r}") + commit_sha = resolved + + releases = _filter_releases_to_version_line( + _get_github_releases(repo), branch_ref, commit_sha, cwd ) + _fetch_release_tags(releases, cwd) - parsed = _parse_release_ref(branch_ref) - fetch_ref = ( - f"refs/tags/{branch_ref}" - if parsed is not None and parsed[2] is not None - else branch_ref + _, baseline_sha, _ = _find_release_baseline( + branch_ref, releases, cwd, commit_sha=commit_sha ) - - baseline_sha = None - for _ in range(DEEPEN_CAP // DEEPEN_STEP): - subprocess.run( - ["git", "fetch", f"--deepen={DEEPEN_STEP}", "origin", fetch_ref], - cwd=cwd, - capture_output=True, - text=True, - check=False, - ) - _, baseline_sha = _find_release_baseline(branch_ref, repo, cwd) - if not baseline_sha: - baseline_sha = _find_rebase_baseline(branch_ref, cwd) - if baseline_sha: - break + if not baseline_sha: + baseline_sha = _find_rebase_baseline(commit_sha, cwd) if not baseline_sha: raise Exception( - "No release tag on this branch and no rebase bootstrap merge found " - f"within {DEEPEN_CAP} commits" + "No release tag on this branch and no rebase bootstrap merge found" ) - df = _git_log_merge_prs(baseline_sha, branch_ref, cwd, repo) + df = _git_log_merge_prs(baseline_sha, commit_sha, cwd, repo) return ( _enrich_prs_in_release_merge_prs(df, repo), _git_commit_time(baseline_sha, cwd), @@ -455,18 +547,18 @@ def _parse_release_ref(ref_name: str) -> tuple[str, str, str | None] | None: """Parse a release ref into (flavour, minor_version, full_version). Handles version tags (``v25.8.28.10001.altinitystable``) and release - branches (``stable-25.8``). ``full_version`` is None for branches, which + branches (``stable-25.8``, ``antalya-25.8``, ``fips-25.3``). ``full_version`` is None for branches, which carry no patch or tweak. Returns None for refs without a version. """ # Match tag match = re.match( - r"^v((\d+\.\d+)\.\d+\.\d+)\.altinity(stable|antalya|test)$", ref_name + r"^v((\d+\.\d+)\.\d+\.\d+)\.altinity(stable|antalya|fips|test)$", ref_name ) if match: - flavour = "antalya" if match.group(3) == "antalya" else "stable" + flavour = match.group(3) if match.group(3) in ("antalya", "fips") else "stable" return flavour, match.group(2), match.group(1) # Match branch - match = re.match(r"^(stable|antalya)-(\d+\.\d+)$", ref_name) + match = re.match(r"^(stable|antalya|fips)-(\d+\.\d+)$", ref_name) if match: return match.group(1), match.group(2), None return None @@ -1316,7 +1408,7 @@ def create_workflow_report( if pr_number == 0 and not mark_preview: try: prs_df, baseline_time = get_prs_in_release_dataframe( - branch_name, cwd=os.getcwd() + branch_name, cwd=os.getcwd(), commit_sha=commit_sha ) results_dfs["prs_in_release"] = prs_df prs_in_release_search_url = _prs_in_release_search_url( diff --git a/.github/workflows/compare_fails.yml b/.github/workflows/compare_fails.yml index 1f734845ac1af..6c53a0d880622 100644 --- a/.github/workflows/compare_fails.yml +++ b/.github/workflows/compare_fails.yml @@ -53,13 +53,13 @@ jobs: echo "Found commit statuses, proceeding with comparison." - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: fetch-depth: 0 ref: ${{ inputs.current_ref || github.ref }} - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: '3.x' cache: 'pip' @@ -103,7 +103,7 @@ jobs: cat comparison_results.md >> $GITHUB_STEP_SUMMARY - name: Upload comparison results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: comparison-results path: | diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 1e59aa8b5b8db..2d8efdc099d84 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -127,7 +127,7 @@ jobs: - name: Upload image archives if: ${{ github.event.inputs.upload_artifacts || inputs.upload_artifacts }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: docker-images-backup path: image_archives/ diff --git a/.github/workflows/release_builds.yml b/.github/workflows/fast_builds.yml similarity index 97% rename from .github/workflows/release_builds.yml rename to .github/workflows/fast_builds.yml index 68f510f46dbef..e02867c427d5c 100644 --- a/.github/workflows/release_builds.yml +++ b/.github/workflows/fast_builds.yml @@ -1,6 +1,6 @@ # generated by praktika -name: Release Builds +name: Fast Builds on: workflow_dispatch: @@ -86,7 +86,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Config Workflow' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Config Workflow' --workflow "Fast Builds" --ci --timestamp dockers_build_amd: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker] @@ -130,7 +130,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Dockers Build (amd)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Dockers Build (amd)' --workflow "Fast Builds" --ci --timestamp dockers_build_arm: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker-aarch64] @@ -174,7 +174,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Dockers Build (arm)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Dockers Build (arm)' --workflow "Fast Builds" --ci --timestamp dockers_build_multiplatform_manifest: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker] @@ -218,7 +218,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Dockers Build (multiplatform manifest)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Dockers Build (multiplatform manifest)' --workflow "Fast Builds" --ci --timestamp build_amd_debug: runs-on: [self-hosted, altinity-on-demand, altinity-func-tester] @@ -262,7 +262,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_debug)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_debug)' --workflow "Fast Builds" --ci --timestamp - name: Upload artifact CH_AMD_DEBUG_GH id: upload_CH_AMD_DEBUG_GH @@ -318,7 +318,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_asan_ubsan)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_asan_ubsan)' --workflow "Fast Builds" --ci --timestamp - name: Upload artifact CH_AMD_ASAN_UBSAN_GH id: upload_CH_AMD_ASAN_UBSAN_GH @@ -374,7 +374,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_binary)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_binary)' --workflow "Fast Builds" --ci --timestamp - name: Upload artifact CH_AMD_BINARY_GH id: upload_CH_AMD_BINARY_GH @@ -430,7 +430,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_debug)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_debug)' --workflow "Fast Builds" --ci --timestamp - name: Upload artifact CH_ARM_DEBUG_GH id: upload_CH_ARM_DEBUG_GH @@ -486,7 +486,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_asan_ubsan)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_asan_ubsan)' --workflow "Fast Builds" --ci --timestamp - name: Upload artifact CH_ARM_ASAN_UBSAN_GH id: upload_CH_ARM_ASAN_UBSAN_GH @@ -542,7 +542,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_ubsan)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_ubsan)' --workflow "Fast Builds" --ci --timestamp - name: Upload artifact CH_ARM_UBSAN_GH id: upload_CH_ARM_UBSAN_GH @@ -598,7 +598,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_binary)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_binary)' --workflow "Fast Builds" --ci --timestamp - name: Upload artifact CH_ARM_BIN_GH id: upload_CH_ARM_BIN_GH @@ -654,7 +654,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_tsan)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_tsan)' --workflow "Fast Builds" --ci --timestamp - name: Upload artifact CH_AMD_TSAN_GH id: upload_CH_AMD_TSAN_GH @@ -710,7 +710,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_msan)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_msan)' --workflow "Fast Builds" --ci --timestamp - name: Upload artifact CH_AMD_MSAN_GH id: upload_CH_AMD_MSAN_GH @@ -766,7 +766,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_tsan)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_tsan)' --workflow "Fast Builds" --ci --timestamp - name: Upload artifact CH_ARM_TSAN_GH id: upload_CH_ARM_TSAN_GH @@ -822,7 +822,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_msan)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_msan)' --workflow "Fast Builds" --ci --timestamp - name: Upload artifact CH_ARM_MSAN_GH id: upload_CH_ARM_MSAN_GH @@ -878,7 +878,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_release)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (amd_release)' --workflow "Fast Builds" --ci --timestamp build_arm_release: runs-on: [self-hosted, altinity-on-demand, altinity-builder] @@ -922,7 +922,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_release)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Build (arm_release)' --workflow "Fast Builds" --ci --timestamp docker_server_image: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker] @@ -966,7 +966,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Docker server image' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Docker server image' --workflow "Fast Builds" --ci --timestamp docker_keeper_image: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker] @@ -1010,7 +1010,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Docker keeper image' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Docker keeper image' --workflow "Fast Builds" --ci --timestamp install_packages_amd_release: runs-on: [self-hosted, altinity-on-demand, altinity-func-tester] @@ -1054,7 +1054,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Install packages (amd_release)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Install packages (amd_release)' --workflow "Fast Builds" --ci --timestamp install_packages_arm_release: runs-on: [self-hosted, altinity-on-demand, altinity-func-tester-aarch64] @@ -1098,7 +1098,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Install packages (arm_release)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Install packages (arm_release)' --workflow "Fast Builds" --ci --timestamp sign_release_amd_release: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker] @@ -1142,7 +1142,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Sign release (amd_release)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Sign release (amd_release)' --workflow "Fast Builds" --ci --timestamp sign_release_arm_release: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker] @@ -1186,7 +1186,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Sign release (arm_release)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Sign release (arm_release)' --workflow "Fast Builds" --ci --timestamp source_upload: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker] @@ -1230,7 +1230,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Source upload' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Source upload' --workflow "Fast Builds" --ci --timestamp stateless_tests_arm_binary_parallel: runs-on: [self-hosted, altinity-on-demand, altinity-func-tester-aarch64, 16c] @@ -1281,7 +1281,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Stateless tests (arm_binary, parallel)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Stateless tests (arm_binary, parallel)' --workflow "Fast Builds" --ci --timestamp stateless_tests_arm_binary_sequential: runs-on: [self-hosted, altinity-on-demand, altinity-func-tester-aarch64] @@ -1332,7 +1332,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Stateless tests (arm_binary, sequential)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Stateless tests (arm_binary, sequential)' --workflow "Fast Builds" --ci --timestamp stateless_tests_amd_binary_cas_s3_storage_parallel: runs-on: [self-hosted, altinity-on-demand, altinity-func-tester, 16c] @@ -1383,7 +1383,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Stateless tests (amd_binary, cas s3 storage, parallel)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Stateless tests (amd_binary, cas s3 storage, parallel)' --workflow "Fast Builds" --ci --timestamp stateless_tests_arm_binary_cas_s3_storage_parallel: runs-on: [self-hosted, altinity-on-demand, altinity-func-tester-aarch64, 16c] @@ -1434,7 +1434,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Stateless tests (arm_binary, cas s3 storage, parallel)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Stateless tests (arm_binary, cas s3 storage, parallel)' --workflow "Fast Builds" --ci --timestamp stateless_tests_amd_binary_cas_storage_parallel: runs-on: [self-hosted, altinity-on-demand, altinity-func-tester, 16c] @@ -1485,7 +1485,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Stateless tests (amd_binary, cas storage, parallel)' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Stateless tests (amd_binary, cas storage, parallel)' --workflow "Fast Builds" --ci --timestamp finish_workflow: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker] @@ -1529,7 +1529,7 @@ jobs: id: run run: | . ./ci/tmp/praktika_setup_env.sh - PYTHONUNBUFFERED=1 python3 -m praktika run 'Finish Workflow' --workflow "Release Builds" --ci --timestamp + PYTHONUNBUFFERED=1 python3 -m praktika run 'Finish Workflow' --workflow "Fast Builds" --ci --timestamp ########################################################################################## ##################################### ALTINITY JOBS ###################################### diff --git a/.github/workflows/final-production-sbom.yml b/.github/workflows/final-production-sbom.yml index 96019d7882685..a437bea6dd381 100644 --- a/.github/workflows/final-production-sbom.yml +++ b/.github/workflows/final-production-sbom.yml @@ -72,7 +72,7 @@ jobs: python utils/final_sbom/verify_outputs.py sbom-work/final - name: Publish workflow artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: final-sbom-${{ env.RELEASE_TAG }} path: | diff --git a/.github/workflows/flaky_fix_sync.yml b/.github/workflows/flaky_fix_sync.yml index fffa58304cba6..b3d195d7ec9a6 100644 --- a/.github/workflows/flaky_fix_sync.yml +++ b/.github/workflows/flaky_fix_sync.yml @@ -61,14 +61,14 @@ jobs: branch: ${{ fromJSON(needs.setup.outputs.branches) }} steps: - name: Check out target branch - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: ref: ${{ matrix.branch }} fetch-depth: 0 filter: blob:none - name: Restore workflow scripts - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: ref: ${{ github.sha }} path: .wf @@ -78,7 +78,7 @@ jobs: sparse-checkout-cone-mode: false - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: '3.x' @@ -98,7 +98,7 @@ jobs: run: cat flaky_fix_report_${{ matrix.branch }}.md >> "$GITHUB_STEP_SUMMARY" - name: Upload check results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: flaky-fix-check-${{ matrix.branch }} path: | @@ -116,14 +116,14 @@ jobs: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker] steps: - name: Check out target branch - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: ref: ${{ matrix.branch }} fetch-depth: 1 filter: blob:none - name: Restore workflow scripts - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: ref: ${{ github.sha }} path: .wf @@ -133,14 +133,14 @@ jobs: sparse-checkout-cone-mode: false - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: '3.x' - name: Download check results id: download continue-on-error: true - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: flaky-fix-check-${{ matrix.branch }} diff --git a/.github/workflows/grype_scan.yml b/.github/workflows/grype_scan.yml index fa12d574aac9b..dc4c4784b0bfc 100644 --- a/.github/workflows/grype_scan.yml +++ b/.github/workflows/grype_scan.yml @@ -147,7 +147,7 @@ jobs: - name: Set commit status if: always() - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -166,7 +166,7 @@ jobs: - name: Upload artifacts if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: grype-results-${{ hashFiles('raw.log') }} path: | diff --git a/.github/workflows/regression-reusable-suite.yml b/.github/workflows/regression-reusable-suite.yml index f3d71450a09d4..51d064ea0f011 100644 --- a/.github/workflows/regression-reusable-suite.yml +++ b/.github/workflows/regression-reusable-suite.yml @@ -186,7 +186,7 @@ jobs: timeout-minutes: 20 run: .github/upload_results_to_database.sh 1 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 if: ${{ !cancelled() }} with: name: ${{ format('{0}{1}-artifacts-{2}{3}', inputs.job_name != '' && inputs.job_name || inputs.suite_name, inputs.part != '' && format('_{0}', inputs.part) || '', inputs.runner_arch, contains(inputs.extra_args, '--use-keeper') && '_keeper' || '_zookeeper') }} diff --git a/.github/workflows/sign_and_release.yml b/.github/workflows/sign_and_release.yml index 21ecd04576fb4..3bdac5e2b6470 100644 --- a/.github/workflows/sign_and_release.yml +++ b/.github/workflows/sign_and_release.yml @@ -55,7 +55,7 @@ jobs: build_dir: ${{ env.BUILD_DIR }} steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run script run: | @@ -309,7 +309,7 @@ jobs: arch: arm64 - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: Altinity/ClickHouse path: ClickHouse diff --git a/ci/workflows/release_builds.py b/ci/workflows/fast_builds.py similarity index 99% rename from ci/workflows/release_builds.py rename to ci/workflows/fast_builds.py index d11b1324968e6..9a8b142f4212d 100644 --- a/ci/workflows/release_builds.py +++ b/ci/workflows/fast_builds.py @@ -32,7 +32,7 @@ ] workflow = Workflow.Config( - name="Release Builds", + name="Fast Builds", event=Workflow.Event.DISPATCH, jobs=[ *[