Skip to content

Commit c86faae

Browse files
authored
Fix the WPT update (servo#29996)
- No longer issue the bors-servo r+ comment as we use the merge queue now. - Explicitly trigger all layout tests so that results are generated.
1 parent befc0f5 commit c86faae

File tree

3 files changed

+3
-61
lines changed

3 files changed

+3
-61
lines changed

.github/workflows/scheduled-wpt-import.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
uses: ./.github/workflows/linux.yml
1717
with:
1818
wpt: 'sync'
19+
layout: 'all'
1920
unit-tests: false
2021

2122
sync:
@@ -72,4 +73,4 @@ jobs:
7273
)
7374
gh pr create \
7475
--title "Sync WPT with upstream (${{ env.CURRENT_DATE }})" \
75-
--body "$BODY" --head ${{ env.UPDATE_BRANCH }} | xargs gh pr comment $1 --body "@bors-servo r+"
76+
--body "$BODY" --head ${{ env.UPDATE_BRANCH }}"

etc/ci/update-wpt-checkout

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -91,55 +91,6 @@ function unsafe_update_metadata() {
9191
git commit -a --amend --no-edit || return 3
9292
}
9393

94-
# Push the branch to a remote branch, then open a PR for the branch
95-
# against servo/servo.
96-
function unsafe_open_pull_request() {
97-
WPT_SYNC_USER=servo-wpt-sync
98-
99-
# If the branch doesn't exist, we'll silently exit. This deals with the
100-
# case where an earlier step either failed or discovered that syncing
101-
# is unnecessary.
102-
git checkout "${BRANCH_NAME}" || return 0
103-
104-
if [[ -z "${WPT_SYNC_TOKEN+set}" ]]; then
105-
echo "Github auth token missing from WPT_SYNC_TOKEN."
106-
return 1
107-
fi
108-
109-
# Push the changes to a remote branch owned by the bot.
110-
AUTH="${WPT_SYNC_USER}:${WPT_SYNC_TOKEN}"
111-
UPSTREAM="https://${AUTH}@github.com/${WPT_SYNC_USER}/servo.git"
112-
git remote add "${REMOTE_NAME}" "${UPSTREAM}" || return 2
113-
git push -f "${REMOTE_NAME}" "${BRANCH_NAME}:${REMOTE_BRANCH_NAME}" &>/dev/null || return 3
114-
115-
# Prepare the pull request metadata.
116-
BODY="Automated downstream sync of changes from upstream as of "
117-
BODY+="${CURRENT_DATE}.\n"
118-
BODY+="[no-wpt-sync]\n"
119-
BODY+="r? @servo-wpt-sync\n"
120-
cat <<EOF >prdata.json || return 4
121-
{
122-
"title": "Sync WPT with upstream (${CURRENT_DATE})",
123-
"head": "${WPT_SYNC_USER}:${REMOTE_BRANCH_NAME}",
124-
"base": "master",
125-
"body": "${BODY}",
126-
"maintainer_can_modify": true
127-
}
128-
EOF
129-
130-
# Open a pull request using the new branch.
131-
OPEN_PR_RESPONSE=$(curl -H "Authorization: token ${WPT_SYNC_TOKEN}" \
132-
-H "Content-Type: application/json" \
133-
--data @prdata.json \
134-
https://api.github.com/repos/servo/servo/pulls) || return 5
135-
136-
echo "${OPEN_PR_RESPONSE}" | \
137-
jq '.review_comments_url' | \
138-
sed 's/pulls/issues/' | \
139-
xargs curl -H "Authorization: token ${WPT_SYNC_TOKEN}" \
140-
--data "{\"body\":\"@bors-servo r+\"}" || return 6
141-
}
142-
14394
function pull_from_upstream() {
14495
unsafe_pull_from_upstream "${1}" || { code="${?}"; cleanup; return "${code}"; }
14596
}
@@ -152,10 +103,6 @@ function update_metadata() {
152103
unsafe_update_metadata "${1}" "${2}" "${3}" || { code="${?}"; cleanup; return "${code}"; }
153104
}
154105

155-
function open_pull_request() {
156-
unsafe_open_pull_request || { code="${?}"; cleanup; return "${code}"; }
157-
}
158-
159106
SCRIPT_NAME="${0}"
160107

161108
function update_test_results() {
@@ -173,7 +120,6 @@ function usage() {
173120
echo " - fetch-upstream-changes: create a branch with the latest changes from upstream"
174121
echo " - update-test-results: run the tests, update the expected test results, and commit the changes"
175122
echo " - fetch-and-update-expectations: combines fetch-upstream-changes and update-test-results"
176-
echo " - open-pr: open a pull request with the latest changes"
177123
echo " - cleanup: cleanup all traces of an in-progress sync and checkout the master branch"
178124
exit 1
179125
}
@@ -197,9 +143,6 @@ function main() {
197143
if [[ "${1}" == "update-test-results" ]] || [[ "${1}" == "fetch-and-update-expectations" ]]; then
198144
update_test_results
199145

200-
elif [[ "${1}" == "open-pr" ]]; then
201-
open_pull_request
202-
203146
elif [[ "${1}" == "cleanup" ]]; then
204147
cleanup
205148

etc/ci/wpt-scheduled-update.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function unsafe_update_metadata_chunk() {
2828

2929
function update_metadata_chunk() {
3030
unsafe_update_metadata_chunk "${1}" || \
31-
{ code="${?}"; cleanup; return "${code}"; }
31+
{ code="${?}"; return "${code}"; }
3232
}
3333

3434
function main() {
@@ -42,6 +42,4 @@ function main() {
4242
done
4343
}
4444

45-
# Ensure we clean up after ourselves if this script is interrupted.
46-
trap 'cleanup' SIGINT SIGTERM
4745
main

0 commit comments

Comments
 (0)