-
Notifications
You must be signed in to change notification settings - Fork 0
fix(#2378): report failure when agent errors with no commits #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
436a7f8
0a0561b
f19f1e3
32aaf9d
b5baa69
8a9681e
0b50f96
1f678e7
1881e3b
88ecef4
0013c75
893d1af
52dc9d2
b7b04f5
7d71e38
d330766
99ddc9d
fed552c
1d3da39
73dea45
63c27e4
ba99ae3
9a35c91
d4a394e
e492ac7
b2055cb
c48a832
3a44b0c
6f79d87
080368c
11bae49
e57f10a
602f75b
d1baca8
47e61b6
368890e
2e040b5
7c40a70
162dce2
80a414d
22c6e28
f126581
bbbb0b5
22be06d
7ecf899
61f467d
5e3d932
ecf5175
3305c1a
4c360c8
ac64c91
ded059b
3c9f0db
7249b34
df020f5
3ae6f72
966abbf
65b155c
d988d32
e66f2d9
a24ffd1
d6988a9
515e49b
387968a
133ed6e
6832b14
32f73a4
b4d1c97
a9bd135
2b93fff
3fb219c
9241475
22d710d
25a286f
7905dfc
6f7ddf6
f322448
560ace4
7aef782
f902ef8
f4e19d5
f71504f
b04ecb3
ed8c416
854d2e0
5c5e14d
c7ad026
e385941
39b9a4a
92fe475
378e0d2
bb09277
7e367d1
71d7fc2
307481c
4520ea8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/usr/bin/env bash | ||
| # Install the pinned OpenShell version via upstream install.sh. | ||
| # | ||
| # Sources openshell-version.sh for the version and commit SHA, then | ||
| # runs the upstream installer. Requires sudo for RPM installation. | ||
| # | ||
| # Usage: | ||
| # .github/scripts/install-openshell.sh | ||
| set -euo pipefail | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
| source "${SCRIPT_DIR}/openshell-version.sh" | ||
|
|
||
| echo "Installing OpenShell ${OPENSHELL_VERSION} (${OPENSHELL_SHA})" | ||
| curl -LsSf "https://raw.githubusercontent.com/NVIDIA/OpenShell/${OPENSHELL_SHA}/install.sh" \ | ||
| | OPENSHELL_VERSION="v${OPENSHELL_VERSION}" sh | ||
|
|
||
| openshell --version | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #!/usr/bin/env bash | ||
| # Single source of truth for the pinned OpenShell version. | ||
| # | ||
| # Source this script to set OPENSHELL_VERSION and OPENSHELL_SHA in the | ||
| # current shell. In GitHub Actions it also exports them to GITHUB_ENV | ||
| # for downstream steps. | ||
| # | ||
| # Usage: | ||
| # source .github/scripts/openshell-version.sh | ||
|
|
||
| # renovate: datasource=github-tags depName=NVIDIA/OpenShell | ||
| OPENSHELL_VERSION=0.0.63 | ||
| OPENSHELL_SHA=ec197a43ef349e36c3fff04e9aaea9599fb83b31 | ||
|
|
||
| export OPENSHELL_VERSION OPENSHELL_SHA | ||
|
|
||
| if [[ -n "${GITHUB_ENV:-}" ]]; then | ||
| echo "OPENSHELL_VERSION=${OPENSHELL_VERSION}" >> "${GITHUB_ENV}" | ||
| echo "OPENSHELL_SHA=${OPENSHELL_SHA}" >> "${GITHUB_ENV}" | ||
| fi |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,8 +36,10 @@ inputs: | |
| status-number: | ||
| description: Issue/PR number for status comments (optional). | ||
| default: "" | ||
| status-token: | ||
| description: Token for status comments (defaults to GH_TOKEN env var). | ||
| mint-url: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [high] breaking-api-change Breaking change to GitHub Action input interface: renamed status-token input to mint-url. Any workflows in other repositories that invoke this action with status-token will break, as the input parameter has been removed without a deprecation period. Suggested fix: Keep both status-token (deprecated) and mint-url inputs during a transition period. Add fallback logic and remove status-token only in a major version bump. |
||
| description: >- | ||
| Mint service URL for on-demand status comment tokens. The binary | ||
| mints a fresh short-lived token before each status API call. | ||
| default: "" | ||
|
|
||
| runs: | ||
|
|
@@ -73,7 +75,7 @@ runs: | |
| done | ||
| } | ||
|
|
||
| # Use vendored binary if present (placed by fullsend admin install --vendor-fullsend-binary). | ||
| # Use vendored binary if present (placed by fullsend admin install --vendor). | ||
| # Per-org mode stores it at bin/fullsend (in .fullsend config repo); | ||
| # per-repo mode stores it at .fullsend/bin/fullsend (in the target repo). | ||
| # GitHub Contents API does not preserve the executable bit, so check -f not -x. | ||
|
|
@@ -263,23 +265,17 @@ runs: | |
| podman info | ||
| systemctl --user start podman.socket | ||
|
|
||
| - name: Set OpenShell version | ||
| shell: bash | ||
| run: | | ||
| echo "OPENSHELL_VERSION=0.0.54" >> "${GITHUB_ENV}" | ||
| # SHA corresponding to 0.0.54 | ||
| echo "OPENSHELL_SHA=79aa355dd008e496a7d8f97b361a7b2866066fbc" >> "${GITHUB_ENV}" | ||
|
|
||
| - name: Install OpenShell CLI | ||
| - name: Configure OpenShell gateway | ||
| shell: bash | ||
| run: | | ||
| mkdir -p $HOME/.config/openshell/ | ||
| cat > $HOME/.config/openshell/gateway.env << EOF | ||
| OPENSHELL_BIND_ADDRESS=0.0.0.0 | ||
| EOF | ||
|
|
||
| curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/${OPENSHELL_SHA}/install.sh | OPENSHELL_VERSION=v${OPENSHELL_VERSION} sh | ||
| openshell --version | ||
| - name: Install OpenShell CLI | ||
| shell: bash | ||
| run: "$GITHUB_ACTION_PATH/.github/scripts/install-openshell.sh" | ||
|
|
||
| - name: Restore cached sandbox image | ||
| id: sandbox-cache | ||
|
|
@@ -363,7 +359,7 @@ runs: | |
| STATUS_RUN_URL: ${{ inputs.run-url }} | ||
| STATUS_REPO: ${{ inputs.status-repo }} | ||
| STATUS_NUMBER: ${{ inputs.status-number }} | ||
| STATUS_TOKEN: ${{ inputs.status-token }} | ||
| MINT_URL: ${{ inputs.mint-url }} | ||
| run: | | ||
| set -euo pipefail | ||
| FULLSEND_DIR="${FULLSEND_DIR:-${GITHUB_WORKSPACE}}" | ||
|
|
@@ -373,17 +369,14 @@ runs: | |
| # Post-scripts enforce secret scanning, protected-path blocks, | ||
| # and review-downgrade controls. Skipping them in CI bypasses | ||
| # all post-push security gates. | ||
| if [[ -n "${STATUS_TOKEN}" ]]; then | ||
| echo "::add-mask::${STATUS_TOKEN}" | ||
| fi | ||
| STATUS_FLAGS=() | ||
| if [[ -n "${STATUS_REPO}" && -n "${STATUS_NUMBER}" ]]; then | ||
| STATUS_FLAGS+=(--status-repo "${STATUS_REPO}" --status-number "${STATUS_NUMBER}") | ||
| if [[ -n "${STATUS_RUN_URL}" ]]; then | ||
| STATUS_FLAGS+=(--run-url "${STATUS_RUN_URL}") | ||
| fi | ||
| if [[ -n "${STATUS_TOKEN}" ]]; then | ||
| STATUS_FLAGS+=(--status-token "${STATUS_TOKEN}") | ||
| if [[ -n "${MINT_URL}" ]]; then | ||
| STATUS_FLAGS+=(--mint-url "${MINT_URL}") | ||
| fi | ||
| fi | ||
| fullsend run "${AGENT}" \ | ||
|
|
@@ -393,10 +386,11 @@ runs: | |
| "${STATUS_FLAGS[@]+"${STATUS_FLAGS[@]}"}" | ||
|
|
||
| - name: Finalize orphaned status comment | ||
| if: always() && inputs.agent != '__install_only__' && inputs.status-repo != '' && inputs.status-number != '' | ||
| if: always() && inputs.agent != '__install_only__' && inputs.status-repo != '' && inputs.status-number != '' && inputs.mint-url != '' | ||
| shell: bash | ||
| env: | ||
| STATUS_TOKEN: ${{ inputs.status-token }} | ||
| MINT_URL: ${{ inputs.mint-url }} | ||
| AGENT: ${{ inputs.agent }} | ||
| STATUS_REPO: ${{ inputs.status-repo }} | ||
| STATUS_NUMBER: ${{ inputs.status-number }} | ||
| RUN_ID: ${{ github.run_id }} | ||
|
|
@@ -409,13 +403,8 @@ runs: | |
| # the deferred PostCompletion call never runs and the status comment | ||
| # remains in "Started" state. This step runs unconditionally (if: | ||
| # always()) to detect and finalize orphaned comments. See #2149. | ||
| TOKEN="${STATUS_TOKEN:-${GITHUB_TOKEN:-}}" | ||
| if [[ -z "${TOKEN}" ]]; then | ||
| echo "::warning::No token available for status comment reconciliation" | ||
| exit 0 | ||
| fi | ||
| echo "::add-mask::${TOKEN}" | ||
| RECONCILE_FLAGS=(--repo "${STATUS_REPO}" --number "${STATUS_NUMBER}" --run-id "${RUN_ID}" --token "${TOKEN}") | ||
| RECONCILE_FLAGS=(--repo "${STATUS_REPO}" --number "${STATUS_NUMBER}" --run-id "${RUN_ID}") | ||
| RECONCILE_FLAGS+=(--mint-url "${MINT_URL}" --role "${AGENT}") | ||
| if [[ -n "${RUN_URL}" ]]; then | ||
| RECONCILE_FLAGS+=(--run-url "${RUN_URL}") | ||
| fi | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[medium] curl-pipe-to-shell
Downloads and executes remote script via curl | sh. URL is pinned to a specific commit SHA but no checksum validation is performed.
Suggested fix: Download to file first, compute SHA-256 hash, and compare against pinned expected hash before execution.