Skip to content

Fix codeql-path-test workflow: ensure gh-codeql extension installation succeeds#34

Merged
data-douser merged 2 commits intocopilot/upgrade-codeql-cli-to-v2-24-0from
copilot/fix-codeql-path-test-job
Feb 9, 2026
Merged

Fix codeql-path-test workflow: ensure gh-codeql extension installation succeeds#34
data-douser merged 2 commits intocopilot/upgrade-codeql-cli-to-v2-24-0from
copilot/fix-codeql-path-test-job

Conversation

Copy link
Contributor

Copilot AI commented Feb 9, 2026

The codeql-path-tests job was failing because gh extension install github/gh-codeql || true silently masked installation failures, then gh codeql set-version failed when attempting to use the non-existent extension.

Changes

  • Remove silent failure handling: Removed || true from extension installation to surface failures
  • Check existing installation: Skip installation if extension already present (supports cached runners)
  • Verify before use: Added gh codeql version check to fail fast with clear error if extension is non-functional
# Before
gh extension install github/gh-codeql 2>/dev/null || true
gh codeql set-version "$CODEQL_VERSION"

# After
if ! gh extension list | grep -q "github/gh-codeql"; then
  echo "Installing gh-codeql extension..."
  gh extension install github/gh-codeql
fi

if ! gh codeql version &>/dev/null; then
  echo "::error::gh codeql extension is not working properly"
  exit 1
fi

gh codeql set-version "$CODEQL_VERSION"
Original prompt

Reference: https://github.com/advanced-security/codeql-development-mcp-server/actions/runs/21834176403/job/63000363397#step:7:1

Fix the "codeql-path-test" job by ensuring that the "gh codeql" is extension is installed before attempting to use it


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…installed and verified

Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix codeql-path-test job by ensuring extension is installed Fix codeql-path-test workflow: ensure gh-codeql extension installation succeeds Feb 9, 2026
Copilot AI requested a review from data-douser February 9, 2026 17:57
@data-douser data-douser marked this pull request as ready for review February 9, 2026 19:03
@data-douser data-douser merged commit bd064b7 into copilot/upgrade-codeql-cli-to-v2-24-0 Feb 9, 2026
@data-douser data-douser requested a review from enyil as a code owner February 9, 2026 19:04
@data-douser data-douser deleted the copilot/fix-codeql-path-test-job branch February 9, 2026 19:04
@data-douser data-douser requested a review from a team as a code owner February 9, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants