Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 5 additions & 2 deletions .github/actions/upgrade-test-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ runs:
- name: Resolve upgrade-from version
id: resolve
shell: bash
env:
# A merge group has no base_ref; its ref name is gh-readonly-queue/<base>/pr-N-<sha>.
BASE_REF: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref_name }}
run: |
base_ref="${GITHUB_BASE_REF:-${GITHUB_REF_NAME:-}}"
base_ref="${BASE_REF#refs/heads/}"
is_release_line=false
if [[ "$base_ref" =~ ^release/v[0-9]+\.[0-9]+\.x$ ]]; then
is_release_line=true
Expand All @@ -41,7 +44,7 @@ runs:
# prev-stable = the previous minor line's latest published version.
# Before that line has a final release, use its latest prerelease so
# main keeps upgrade coverage after the release branch is cut.
V="$(./scripts/prev-stable-version.sh)"
V="$(CURRENT_REF="$base_ref" ./scripts/prev-stable-version.sh)"
if [ -z "$V" ]; then
echo "no published version on the previous release line; skipping prev-stable leg."
echo "skip=true" >> "$GITHUB_OUTPUT"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
branches: [main, "release/**"]
paths-ignore:
- "**/*.md"
merge_group:
Comment thread
Charlesthebird marked this conversation as resolved.
workflow_dispatch:

concurrency:
Expand All @@ -18,7 +19,8 @@ concurrency:
env:
# Cache key components for better organization
CACHE_KEY_PREFIX: kagent-v2
BRANCH_CACHE_KEY: ${{ github.head_ref || github.ref_name }}
# Merge groups share one cache scope; their ref names are unique and would each write a throwaway one.
BRANCH_CACHE_KEY: ${{ github.head_ref || (github.event.merge_group.base_ref && 'merge-queue') || github.ref_name }}
# Consistent builder configuration
BUILDX_BUILDER_NAME: kagent-builder-v0.23.0
BUILDX_VERSION: v0.23.0
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/migration-immutability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main, "release/**"]
paths:
- "go/core/pkg/migrations/**"
merge_group:
Comment thread
Charlesthebird marked this conversation as resolved.

jobs:
check:
Expand All @@ -15,8 +16,11 @@ jobs:
fetch-depth: 0

- name: Fail if any existing migration file was modified
env:
# A merge group has no base_ref; it only exposes the base branch as refs/heads/<branch>.
BASE_REF: ${{ github.base_ref || github.event.merge_group.base_ref }}
run: |
BASE=$(git merge-base HEAD origin/${{ github.base_ref }})
BASE=$(git merge-base HEAD "origin/${BASE_REF#refs/heads/}")
CHANGED=$(git diff --no-renames --name-status --diff-filter=MDR "$BASE" HEAD \
-- 'go/core/pkg/migrations/**/*.sql' \
| awk '$1 != "D" || $2 !~ /\.(up|down)\.sql$/ { print $2 }')
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sqlc-generate-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- "go/core/internal/database/queries/**"
- "go/core/internal/database/sqlc.yaml"
- "go/core/pkg/migrations/**"
merge_group:

jobs:
check:
Expand Down
Loading