Skip to content

Commit cecb0dd

Browse files
Sync dev into v2 excluding #638 (OIDC ToolsInstaller auth)
Bring Node 22, CLI 2.111.0, and e2e refinements from dev so the release pipeline `git merge origin/dev` succeeds. Leave #638 out so it can be released separately. Conflict resolution: keep dev versions of e2e-plugin-tests.yml and trigger-ado-pipeline.sh (per-PR concurrency, no CI publish, base-ref checkout, task-missing trigger retries). Co-authored-by: Cursor <cursoragent@cursor.com>
2 parents bdd1501 + 037629d commit cecb0dd

4 files changed

Lines changed: 57 additions & 41 deletions

File tree

.github/workflows/e2e-plugin-tests.yml

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ on:
7878
required: false
7979
default: 'false'
8080

81-
# Only one E2E run at a time — prevents two PRs racing to trigger the same
82-
# ADO pipeline simultaneously (which the dev org's parallel-job quota
83-
# would queue anyway).
81+
# One E2E run at a time per PR. A new label-trigger on the same PR cancels
82+
# the previous queued/in-progress run so the latest commit is always tested.
83+
# Across different PRs, runs are independent and execute in parallel.
8484
concurrency:
85-
group: e2e-plugin-tests
86-
cancel-in-progress: false
85+
group: e2e-plugin-tests-${{ github.event.pull_request.number || github.run_id }}
86+
cancel-in-progress: true
8787

8888
# ======================================================================
8989
# JOB 1 — Build the .vsix from the PR branch and upload as artifact.
@@ -212,23 +212,6 @@ jobs:
212212
retention-days: 14
213213
if-no-files-found: error
214214

215-
- name: Publish .vsix to Marketplace
216-
if: ${{ env.MARKETPLACE_PAT != '' }}
217-
env:
218-
MARKETPLACE_PAT: ${{ secrets.ADO_E2E_MARKETPLACE_PAT }}
219-
run: |
220-
set -euo pipefail
221-
vsix_path="$(ls -1 ./*.vsix | head -1)"
222-
echo "Publishing $vsix_path to Marketplace..."
223-
npx tfx extension publish \
224-
--vsix "$vsix_path" \
225-
--token "$MARKETPLACE_PAT" \
226-
--no-wait-validation
227-
echo "Published successfully."
228-
echo "Waiting 90s for Marketplace async validation and ADO extension cache to propagate..."
229-
sleep 90
230-
echo "Done waiting — ADO pipelines will now run against the freshly published extension."
231-
232215
- name: Write install instructions to job summary
233216
env:
234217
VSIX_VERSION: ${{ steps.build_vsix.outputs.vsix_version }}
@@ -334,7 +317,7 @@ jobs:
334317
- name: Checkout (for trigger script)
335318
uses: actions/checkout@v4
336319
with:
337-
ref: ${{ github.event.pull_request.head.sha || github.sha }}
320+
ref: ${{ github.event.pull_request.base.sha || github.sha }}
338321

339322
- name: Trigger ADO sanity pipeline and wait for result
340323
# The sanity pipeline (.pipelines/ado-sanity-pipeline.yml) tests:
@@ -406,7 +389,7 @@ jobs:
406389
- name: Checkout (for trigger script)
407390
uses: actions/checkout@v4
408391
with:
409-
ref: ${{ github.event.pull_request.head.sha || github.sha }}
392+
ref: ${{ github.event.pull_request.base.sha || github.sha }}
410393

411394
- name: Trigger ADO OIDC test pipeline and wait for result
412395
# The OIDC pipeline covers:

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
os: [ ubuntu, windows ]
24-
node-version: [ '16', '20', '24' ]
24+
node-version: [ '16', '20', '22', '24' ]
2525
include:
2626
- os: windows
2727
extraSkipTests: ",conan"

buildScripts/trigger-ado-pipeline.sh

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -eu
77
# ADO_ORG - Azure DevOps organization name (e.g. vigneshc0742)
88
# ADO_PROJECT - Azure DevOps project name (e.g. ecomatrix-test)
99
# ADO_PIPELINE_ID - Pipeline definition ID (e.g. 63)
10-
# ADO_PAT - PAT with Build Read+Execute and Project Read scopes
10+
# ADO_PAT - PAT with Build Read+Execute and Project Read scopes only
1111
#
1212
# Optional environment variables:
1313
# GH_PR_NUMBER - GitHub PR number passed into pipeline as a variable (default: 0)
@@ -43,20 +43,53 @@ echo "=============================================="
4343
RESPONSE_FILE=$(mktemp)
4444
trap 'rm -f "$RESPONSE_FILE"' EXIT
4545

46-
HTTP_STATUS=$(curl -sS -o "$RESPONSE_FILE" -w "%{http_code}" -X POST \
47-
"${API_BASE}/pipelines/${ADO_PIPELINE_ID}/runs?api-version=7.1" \
48-
-H "${AUTH_HEADER}" \
49-
-H "Content-Type: application/json" \
50-
-d "{
51-
\"variables\": {
52-
\"GH_PR_NUMBER\": { \"value\": \"${GH_PR_NUMBER}\", \"isSecret\": false },
53-
\"GH_COMMIT_SHA\": { \"value\": \"${GH_COMMIT_SHA}\", \"isSecret\": false }
54-
}
55-
}" || echo "000")
46+
# A freshly (re)installed private extension is not immediately resolvable by
47+
# ADO's pipeline queue-time validator: it returns HTTP 400 with
48+
# "A task is missing. The pipeline references a task called '...E2E'" until the
49+
# org's task catalog catches up. This is an eventual-consistency lag, not a
50+
# real error, so retry the trigger for up to TRIGGER_RETRY_MINUTES, once per
51+
# minute, ONLY for that specific 400. All other statuses fail immediately.
52+
TRIGGER_RETRY_MINUTES="${TRIGGER_RETRY_MINUTES:-15}"
53+
TRIGGER_RETRY_INTERVAL_SECONDS="${TRIGGER_RETRY_INTERVAL_SECONDS:-60}"
54+
TRIGGER_DEADLINE=$(( $(date +%s) + TRIGGER_RETRY_MINUTES * 60 ))
55+
TRIGGER_ATTEMPT=0
56+
57+
while : ; do
58+
TRIGGER_ATTEMPT=$(( TRIGGER_ATTEMPT + 1 ))
59+
60+
HTTP_STATUS=$(curl -sS -o "$RESPONSE_FILE" -w "%{http_code}" -X POST \
61+
"${API_BASE}/pipelines/${ADO_PIPELINE_ID}/runs?api-version=7.1" \
62+
-H "${AUTH_HEADER}" \
63+
-H "Content-Type: application/json" \
64+
-d "{
65+
\"variables\": {
66+
\"GH_PR_NUMBER\": { \"value\": \"${GH_PR_NUMBER}\", \"isSecret\": false },
67+
\"GH_COMMIT_SHA\": { \"value\": \"${GH_COMMIT_SHA}\", \"isSecret\": false }
68+
}
69+
}" || echo "000")
70+
71+
RUN_RESPONSE="$(cat "$RESPONSE_FILE")"
72+
73+
if [ "$HTTP_STATUS" = "200" ]; then
74+
break
75+
fi
5676

57-
RUN_RESPONSE="$(cat "$RESPONSE_FILE")"
77+
# Retry only the transient "task is missing" 400 (extension still
78+
# propagating in the org); every other failure is terminal.
79+
if [ "$HTTP_STATUS" = "400" ] && printf '%s' "$RUN_RESPONSE" | grep -q "A task is missing"; then
80+
if [ "$(date +%s)" -lt "$TRIGGER_DEADLINE" ]; then
81+
echo "[$(date -u '+%H:%M:%S')] Trigger attempt ${TRIGGER_ATTEMPT}: HTTP 400 'A task is missing' — the E2E extension is still propagating in org '${ADO_ORG}'. Retrying in ${TRIGGER_RETRY_INTERVAL_SECONDS}s (up to ${TRIGGER_RETRY_MINUTES} min)..."
82+
sleep "$TRIGGER_RETRY_INTERVAL_SECONDS"
83+
continue
84+
fi
85+
echo "ERROR: Pipeline trigger still failing with 'A task is missing' after ${TRIGGER_RETRY_MINUTES} minutes."
86+
echo " The private E2E extension did not become resolvable in org '${ADO_ORG}' within the retry window."
87+
echo " Response :"
88+
echo "${RUN_RESPONSE}" | head -c 2000
89+
echo ""
90+
exit 1
91+
fi
5892

59-
if [ "$HTTP_STATUS" != "200" ]; then
6093
echo "ERROR: Pipeline trigger failed."
6194
echo " HTTP status : ${HTTP_STATUS}"
6295
echo " Endpoint : ${API_BASE}/pipelines/${ADO_PIPELINE_ID}/runs?api-version=7.1"
@@ -71,7 +104,7 @@ if [ "$HTTP_STATUS" != "200" ]; then
71104
*) echo " Hint: see the response body above for the ADO error message." ;;
72105
esac
73106
exit 1
74-
fi
107+
done
75108

76109
RUN_ID=$(echo "$RUN_RESPONSE" | jq -r '.id // empty')
77110
RUN_URL=$(echo "$RUN_RESPONSE" | jq -r '._links.web.href // empty')

jfrog-tasks-utils/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const fileName = getCliExecutableName();
1212
const jfrogCliToolName = 'jf';
1313
const cliPackage = 'jfrog-cli-' + getArchitecture();
1414
const fallbackCliVersion = '2.99.0';
15-
let defaultJfrogCliVersion = '2.103.0';
15+
let defaultJfrogCliVersion = '2.111.0';
1616

1717
/**
1818
* Executes an HTTP request with retry logic for 5xx errors.
@@ -144,7 +144,7 @@ const minCustomCliVersion = '2.10.0';
144144
const minSupportedStdinSecretCliVersion = '2.36.0';
145145
const minSupportedServerIdEnvCliVersion = '2.37.0';
146146
const minSupportedOidcCliVersion = '2.75.0';
147-
const pluginVersion = '2.14.1';
147+
const pluginVersion = '2.14.2';
148148
const buildAgent = 'jfrog-azure-devops-extension';
149149

150150
/**

0 commit comments

Comments
 (0)