elastic / elastic/ai-github-actions

fix: avoid unnecessary compatibility compiler setup

Open
#1,622 0 comments 0 reactions 0 assignees View on GitHub
agentic-workflows
Dominant language
Python
Stars
11
Forks
16
Avg merge
22h 9m
Merged PRs (30d)
31

Description

> [!CAUTION]
> Protected files were modified in this change.
> This pull request is in `request_review` mode and requires explicit human scrutiny before merge.
>
> Protected files: `.github/workflows/ci.yml`

This resolves \#1621.

- Make `setup-gh-aw-compat` a conditional prerequisite of `compile`, so the compatibility compiler is installed only when compatibility workflows are configured.
- Replace destructive checkout cleanup in CI with a Git excluded pathspec while preserving the generated maintenance workflow in the working tree.

Validation: `make lint-workflows`, YAML parsing, Make prerequisite expansion checks, Git pathspec behavior checks, and `git diff --check` passed. The repository pytest dependency is not installed in the environment.

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Framework Best Practices](https://github.com/elastic/ai-github-actions/actions/runs/29835043278)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

---

> [!NOTE]
> This was originally intended as a pull request, but the git push operation failed.
>
> **Workflow Run:** [View run details and download bundle artifact](https://github.com/elastic/ai-github-actions/actions/runs/29835043278)
>
> The bundle file is available in the `agent` artifact in the workflow run linked above.

To create a pull request with the changes:

```sh
# Download the artifact from the workflow run
gh run download 29835043278 -n agent -D /tmp/agent-29835043278

# Fetch the bundle into a temporary ref, then update the local branch
git fetch /tmp/agent-29835043278/aw-fix-issue-1621-compile-cleanup.bundle refs/heads/fix/issue-1621-compile-cleanup:refs/bundles/create-pr-fix-issue-1621-compile-cleanup-aeafce4628edf955-0e3a29f2
git update-ref refs/heads/fix/issue-1621-compile-cleanup-aeafce4628edf955 refs/bundles/create-pr-fix-issue-1621-compile-cleanup-aeafce4628edf955-0e3a29f2
git checkout fix/issue-1621-compile-cleanup-aeafce4628edf955
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d refs/bundles/create-pr-fix-issue-1621-compile-cleanup-aeafce4628edf955-0e3a29f2

# Push the branch to origin
git push origin fix/issue-1621-compile-cleanup-aeafce4628edf955

# Create the pull request
gh pr create --title 'fix: avoid unnecessary compatibility compiler setup' --base main --head fix/issue-1621-compile-cleanup-aeafce4628edf955 --repo elastic/ai-github-actions
```

Contributor guide

Open the contributing guide

Research direction

Start with .github/workflows/ci.yml and the Make prerequisite definitions, then review the validation described in the issue: workflow linting, YAML parsing, prerequisite expansion, Git pathspec behavior, and git diff --check. Done means compatibility setup is conditional, the generated maintenance workflow remains in the working tree, and the listed checks pass; the bundled branch instructions show that work is already prepared.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github-actions
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.