Skip to content
Open
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: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,13 @@ jobs:
report_type: test_results
disable_search: true
fail_ci_if_error: false
- name: Clean up job artifacts
# Keep the runner's workspace from leaking build output between the
# matrix legs that share a self-hosted-style workspace path.
if: ${{ always() }}
working-directory: ${{ github.workspace }}
run: |
git clean -xdff || true
Comment on lines +178 to +184

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

cache_path="frontend/.yarn/cache"
git ls-files -- "$cache_path"
git check-ignore -v "$cache_path" "$cache_path"/* 2>/dev/null || true
git clean -ndx -d -- "$cache_path"

Repository: sshiv012/texera

Length of output: 210


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- workflow cache and cleanup steps ---'
sed -n '100,130p;165,190p' .github/workflows/build.yml

printf '%s\n' '--- repository tracking and ignore rules ---'
git ls-files --stage -- frontend/.yarn/cache frontend/.yarn/cache/\* || true
printf '%s\n' '--- frontend ignore file ---'
sed -n '1,45p' frontend/.gitignore
printf '%s\n' '--- root ignore files mentioning Yarn cache ---'
rg -n -C 2 'yarn/cache|\.yarn' --glob '.gitignore' --glob '.yarnrc*' --glob 'package.json' --glob 'yarn.lock' .

Repository: sshiv012/texera

Length of output: 50371


🌐 Web query:

GitHub actions/cache v6 post step save cache timing cleanup step always git clean ignored files

💡 Result:

The actions/cache v6 action uses a post-job step to save the cache [1][2]. This post-job step executes automatically after all other steps in the job have completed, regardless of whether the job succeeded or failed, provided the job was not cancelled [3][1]. Regarding the interaction between actions/cache and git clean: 1. Cache Saving Timing: The actions/cache (and actions/cache/save) post-step runs after all main workflow steps [1][4]. If you have a step that performs a git clean (e.g., git clean -xdf) to remove untracked or ignored files, this step must occur before the cache saving post-step, as it runs as a standard step in the workflow [4]. 2. Potential Conflict: If you perform a git clean that deletes files or directories you intended to cache, those files will be missing when the post-step attempts to save the cache [5]. The actions/cache post-step creates a cache from the files currently present in the specified path at that time [1][6]. 3. Execution Order: Standard workflow steps (including any git clean commands) always execute before the post steps of any actions [3][1]. Therefore, if your git clean runs as part of your main workflow steps, it will affect the state of the workspace before the actions/cache post-step runs to save the cache [4]. To ensure files are cached correctly, ensure your git clean command does not target the specific directories or files defined in your actions/cache path configuration [7]. Alternatively, if you need to perform cleanup but still save specific build artifacts, ensure those artifacts are moved or generated outside the scope of your git clean command, or adjust the git clean parameters to exclude the cache paths (e.g., by using -e to exclude specific paths) [5]. If you are using actions/cache/save explicitly, you can control precisely when the save operation occurs by placing it at the end of your workflow steps (or using if: always()), which may offer more control than the automatic post-step of the standard actions/cache action [4][8].

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT

git -C "$tmp" init -q
git -C "$tmp" config user.email test@example.invalid
git -C "$tmp" config user.name test
mkdir -p "$tmp/frontend/.yarn/cache"
printf '%s\n' \
  '/node_modules' \
  '.yarn/*' \
  '!.yarn/cache' > "$tmp/frontend/.gitignore"
printf '%s\n' 'artifact' > "$tmp/frontend/.yarn/cache/test.zip"
git -C "$tmp" add frontend/.gitignore
git -C "$tmp" commit -qm initial

printf '%s\n' '--- ignore status before cleanup ---'
git -C "$tmp" check-ignore -v frontend/.yarn/cache frontend/.yarn/cache/test.zip || true
printf '%s\n' '--- dry-run cleanup ---'
git -C "$tmp" clean -ndffx
printf '%s\n' '--- cleanup ---'
git -C "$tmp" clean -dffx
printf '%s\n' '--- cache exists after cleanup ---'
if test -e "$tmp/frontend/.yarn/cache/test.zip"; then
  echo yes
else
  echo no
fi

Repository: sshiv012/texera

Length of output: 378


Exclude frontend/.yarn/cache from cleanup.

frontend/.yarn/cache is untracked, so git clean -xdff removes it. actions/cache@v6 saves the cache in its post-job step, after this cleanup. On a cache miss, the newly downloaded Yarn artifacts are not saved, which causes repeated dependency downloads.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build.yml around lines 178 - 184, Update the “Clean up job
artifacts” step to preserve frontend/.yarn/cache while removing other untracked
build output. Adjust the git clean command or exclusion handling in this step so
the Yarn cache remains available for actions/cache@v6 to save after the job,
while retaining the existing always-run cleanup behavior.

Source: MCP tools

Comment on lines +181 to +184

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

command -v pwsh >/dev/null
pwsh -NoProfile -Command '
  if (Get-Command true -ErrorAction SilentlyContinue) {
    Write-Host "true executable found"
    exit 0
  }
  Write-Error "true executable is not available on PATH"
  exit 1
'

Repository: sshiv012/texera

Length of output: 175


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- workflow context ---'
sed -n '90,205p' .github/workflows/build.yml

printf '%s\n' '--- relevant workflow settings and cleanup references ---'
rg -n -C 3 'windows-latest|actions/cache|working-directory|git clean|shell:' .github/workflows/build.yml

printf '%s\n' '--- local PowerShell command resolution ---'
if command -v pwsh >/dev/null 2>&1; then
  pwsh -NoProfile -Command '
    $cmd = Get-Command true -ErrorAction SilentlyContinue
    if ($null -eq $cmd) {
      "true: unavailable"
    } else {
      "true: CommandType=$($cmd.CommandType); Path=$($cmd.Source)"
    }
  '
else
  echo 'pwsh: unavailable'
fi

Repository: sshiv012/texera

Length of output: 9845


🌐 Web query:

GitHub-hosted windows-latest runner PATH true.exe PowerShell Get-Command true Git for Windows usr bin

💡 Result:

On GitHub-hosted Windows runners, the presence of true.exe and its location in the PATH depend on how Git for Windows is installed and configured [1][2][3]. Git for Windows is pre-installed on these runners but is typically not added to the global PATH by default [1][2]. However, Git for Windows includes a suite of GNU utilities located in its usr/bin directory (e.g., C:\Program Files\Git\usr\bin), which includes true.exe [4][5][3]. If you are using PowerShell on a GitHub runner and find that Get-Command returns true.exe, it is because that directory has been added to your environment's PATH [3][6][7]. Key points regarding true.exe and Git for Windows: 1. Location: The true.exe utility is part of the MSYS2-based toolset bundled with Git for Windows, residing in the usr/bin folder [4][5]. It is not a standard Windows utility [5]. 2. PATH Behavior: If you see true.exe when running Get-Command, that directory (typically C:\Program Files\Git\usr\bin) is present in your session's $env:PATH [3][7]. This often happens if you have explicitly added the Git bin or usr/bin directories to your PATH in a previous workflow step or if specific runner configurations have modified the environment [8][9][3]. 3. Precedence: PowerShell's Get-Command cmdlet follows standard precedence rules [6][10]. If you have both a native command and a GNU utility with the same name on your PATH, PowerShell will return the one that appears earlier in the PATH variable or the one that takes precedence according to PowerShell's command lookup order [6][10][7]. You can use Get-Command -All true to see all instances and their respective paths [6][10]. 4. Performance Note: Some users have reported performance issues when executing certain GNU utilities bundled with Git for Windows in specific environments, sometimes attributed to how these binaries interact with Windows systems (e.g., LDAP queries) [11]. To verify the source of true.exe, you can run the following in your workflow: Get-Command true | Select-Object -ExpandProperty Source [6]

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

for url in \
  'https://raw.githubusercontent.com/actions/runner-images/main/images/windows/Windows2025-Readme.md' \
  'https://raw.githubusercontent.com/actions/runner-images/main/images/windows/Windows2025-VS2026-Readme.md'
do
  echo "--- $url ---"
  curl -fsSL "$url" |
    rg -n -i -C 2 'Git for Windows|usr[\\/]+bin|PATH|true\.exe' |
    head -80 || true
done

Repository: sshiv012/texera

Length of output: 4056


Use a shell-compatible cleanup fallback on Windows.

The windows-latest leg uses pwsh by default. true is not a Windows built-in and may not be on PATH. Set shell: bash, or handle $LASTEXITCODE explicitly in PowerShell.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build.yml around lines 181 - 184, Update the cleanup step
guarded by always() to use a Windows-compatible failure fallback: either set its
shell to bash so git clean -xdff || true is valid, or replace the fallback with
explicit PowerShell $LASTEXITCODE handling. Preserve the existing cleanup
behavior.

Source: MCP tools


amber:
# The amber job runs the cross-cutting Scala lints (scalafmtCheckAll,
Expand Down