Skip to content

Commit

Permalink
Merge branch 'main' into lint-av-duration-format
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpmccormick authored Sep 18, 2024
2 parents b87de1b + b4e0a2d commit ac651db
Show file tree
Hide file tree
Showing 10 changed files with 208 additions and 309 deletions.
31 changes: 4 additions & 27 deletions .buildkite/e2e_on_pull_requests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,17 @@ It's moderately fiddly, so this README tries to outline the broad approach.

## What it looks like for devs

At the end of a "build + test" job, devs get asked whether they want to run end-to-end tests:
At the end of a "build + test" job on a branch other than `main`, devs get asked whether they want to run end-to-end tests:

<img src="e2e_dev_picker.png">

If you select **Yes, run e2e tests now**, Buildkite will start running the end-to-end tests as part of the same "build + test" job.
If you select **Yes, run e2e tests now**, we use `buildkite-agent pipeline upload` to dynamically add more steps to the pipeline. Buildkite will start running these end-to-end tests steps as part of the same "build + test" job.
See [additional steps](pipeline.e2e-pull-requests.yml) for more details.

If you select **Not now, maybe later**, Buildkite will complete the current build, but ask you again when you push new commits.
This is useful if you know your PR is a draft or work-in-progress, and it's not worth running e2e tests yet.
This is useful if you know your PR is a draft or work-in-progress, and it's not worth running e2e tests yet.

If you select **No, not needed for this PR**, Buildkite will complete the current build, and won't ask you again when you push new commits.
Instead, it adds the `e2es not required` label to your PR.
If you want to re-run e2es later, remove this label.

## How it works

This is the rough flow:

```mermaid
flowchart TD
B["Buildkite runs tests on PR<br>(see pipeline.yml)"]
B --> HL{is there a<br>'skip e2e tests'<br>label?}
HL -->|yes| X[nothing to do,<br/>build completes]
HL -->|no| ASK{ask the user<br/>if they want<br/>to run e2es<br/>on this PR}
ASK -->|yes, now| Y["run e2e tests"]
ASK -->|no, maybe later| ML[nothing to do,<br/>build completes]
ASK -->|no, not needed| N[add the 'skip e2e tests' label<br/>in GitHub, build completes]
```

At both the choice steps, we're using `buildkite-agent pipeline upload` to dynamically add more steps to the pipeline.
See the individual scripts/YAML files for more explanatory comments.

## Implementation notes

* We use GitHub labels to track when a dev has declined to run e2es, because they're easily visible and use an interface we're already familiar with.

* We only turn on the e2e cluster when we're running tests, to reduce costs.
96 changes: 0 additions & 96 deletions .buildkite/e2e_on_pull_requests/check_if_we_need_to_ask.sh

This file was deleted.

Binary file modified .buildkite/e2e_on_pull_requests/e2e_dev_picker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

24 changes: 21 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,28 @@
#
# It doesn't run on main, because we run e2es on main by deploying
# into our stage/prod environments instead.
- label: 'check if we need to run e2es'
command: .buildkite/e2e_on_pull_requests/check_if_we_need_to_ask.sh
if: build.branch != "main"

- wait

- input: "Run end-to-end tests on this pull request?"
if: build.branch != "main"
key: "ask-user-if-should-run-e2es"
fields:
- select: "Run e2es?"
key: "should-run-e2es"
options:
- label: "Yes, run e2e tests now"
value: "yes"
- label: "Not now, maybe later"
value: "maybe-later"

- label: "Add steps for e2e tests (if necessary)"
depends_on: "ask-user-if-should-run-e2es"
command: |
if [[ "$$(buildkite-agent meta-data get should-run-e2es)" == "yes" ]]; then
buildkite-agent pipeline upload .buildkite/e2e_on_pull_requests/pipeline.e2e-pull-requests.yml
fi
agents:
queue: nano

Expand Down
11 changes: 11 additions & 0 deletions cache/edge_lambdas/src/redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,17 @@ export const literalRedirects: Record<string, string> = {
// Requested by Content team
// See https://github.com/wellcomecollection/wellcomecollection.org/issues/9765
'/lbe-festival': '/event-series/ZFt3UBQAAMFmEIya',

// Old Exhibition guide content type to new Highlights Tour/Text format.
// See https://github.com/wellcomecollection/wellcomecollection.org/issues/11140
'/guides/exhibitions/Zdcs4BEAACMA6abC':
'/guides/exhibitions/ZthrZRIAACQALvCC',
'/guides/exhibitions/Zdcs4BEAACMA6abC/audio-without-descriptions':
'/guides/exhibitions/ZthrZRIAACQALvCC/audio-without-descriptions',
'/guides/exhibitions/Zdcs4BEAACMA6abC/bsl':
'/guides/exhibitions/ZthrZRIAACQALvCC/bsl',
'/guides/exhibitions/Zdcs4BEAACMA6abC/captions-and-transcripts':
'/guides/exhibitions/ZthrZRIAACQALvCC/captions-and-transcripts',
};

// Query redirects have the form:
Expand Down
2 changes: 1 addition & 1 deletion dash/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@babel/runtime": "^7.24.7",
"@types/react": "^18.3.3",
"cookies-next": "^4.2.1",
"next": "^14.2.4",
"next": "^14.2.10",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"styled-components": "^6.1.11",
Expand Down
126 changes: 63 additions & 63 deletions dash/webapp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -271,55 +271,55 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"

"@next/[email protected].4":
version "14.2.4"
resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.4.tgz#5546813dc4f809884a37d257b254a5ce1b0248d7"
integrity sha512-3EtkY5VDkuV2+lNmKlbkibIJxcO4oIHEhBWne6PaAp+76J9KoSsGvNikp6ivzAT8dhhBMYrm6op2pS1ApG0Hzg==

"@next/[email protected].4":
version "14.2.4"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.4.tgz#da9f04c34a3d5f0b8401ed745768420e4a604036"
integrity sha512-AH3mO4JlFUqsYcwFUHb1wAKlebHU/Hv2u2kb1pAuRanDZ7pD/A/KPD98RHZmwsJpdHQwfEc/06mgpSzwrJYnNg==

"@next/[email protected].4":
version "14.2.4"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.4.tgz#46dedb29ec5503bf171a72a3ecb8aac6e738e9d6"
integrity sha512-QVadW73sWIO6E2VroyUjuAxhWLZWEpiFqHdZdoQ/AMpN9YWGuHV8t2rChr0ahy+irKX5mlDU7OY68k3n4tAZTg==

"@next/[email protected].4":
version "14.2.4"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.4.tgz#c9697ab9eb422bd1d7ffd0eb0779cc2aefa9d4a1"
integrity sha512-KT6GUrb3oyCfcfJ+WliXuJnD6pCpZiosx2X3k66HLR+DMoilRb76LpWPGb4tZprawTtcnyrv75ElD6VncVamUQ==

"@next/[email protected].4":
version "14.2.4"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.4.tgz#cbbceb2008571c743b5a310a488d2e166d200a75"
integrity sha512-Alv8/XGSs/ytwQcbCHwze1HmiIkIVhDHYLjczSVrf0Wi2MvKn/blt7+S6FJitj3yTlMwMxII1gIJ9WepI4aZ/A==

"@next/[email protected].4":
version "14.2.4"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.4.tgz#d79184223f857bacffb92f643cb2943a43632568"
integrity sha512-ze0ShQDBPCqxLImzw4sCdfnB3lRmN3qGMB2GWDRlq5Wqy4G36pxtNOo2usu/Nm9+V2Rh/QQnrRc2l94kYFXO6Q==

"@next/[email protected].4":
version "14.2.4"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.4.tgz#6b6c3e5ac02ca5e63394d280ec8ee607491902df"
integrity sha512-8dwC0UJoc6fC7PX70csdaznVMNr16hQrTDAMPvLPloazlcaWfdPogq+UpZX6Drqb1OBlwowz8iG7WR0Tzk/diQ==

"@next/[email protected].4":
version "14.2.4"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.4.tgz#dbad3906e870dba84c5883d9d4c4838472e0697f"
integrity sha512-jxyg67NbEWkDyvM+O8UDbPAyYRZqGLQDTPwvrBBeOSyVWW/jFQkQKQ70JDqDSYg1ZDdl+E3nkbFbq8xM8E9x8A==

"@next/[email protected].4":
version "14.2.4"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.4.tgz#6074529b91ba49132922ce89a2e16d25d2ec235d"
integrity sha512-twrmN753hjXRdcrZmZttb/m5xaCBFa48Dt3FbeEItpJArxriYDunWxJn+QFXdJ3hPkm4u7CKxncVvnmgQMY1ag==

"@next/[email protected].4":
version "14.2.4"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.4.tgz#e65a1c6539a671f97bb86d5183d6e3a1733c29c7"
integrity sha512-tkLrjBzqFTP8DVrAAQmZelEahfR9OxWpFR++vAI9FBhCiIxtwHwBHC23SBHCTURBtwB4kc/x44imVOnkKGNVGg==
"@next/[email protected].12":
version "14.2.12"
resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.12.tgz#15f1d1065a420416e92f177fc8c94ee4ecc2669d"
integrity sha512-3fP29GIetdwVIfIRyLKM7KrvJaqepv+6pVodEbx0P5CaMLYBtx+7eEg8JYO5L9sveJO87z9eCReceZLi0hxO1Q==

"@next/[email protected].12":
version "14.2.12"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.12.tgz#263c68fd55538624a6236552d153a3487d601a33"
integrity sha512-crHJ9UoinXeFbHYNok6VZqjKnd8rTd7K3Z2zpyzF1ch7vVNKmhjv/V7EHxep3ILoN8JB9AdRn/EtVVyG9AkCXw==

"@next/[email protected].12":
version "14.2.12"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.12.tgz#0fc05a99094ac531692d552743f62f7dbbcb5bc8"
integrity sha512-JbEaGbWq18BuNBO+lCtKfxl563Uw9oy2TodnN2ioX00u7V1uzrsSUcg3Ep9ce+P0Z9es+JmsvL2/rLphz+Frcw==

"@next/[email protected].12":
version "14.2.12"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.12.tgz#56214b10cdb1c47d6f26ae2dd00bc9b32fd2a694"
integrity sha512-qBy7OiXOqZrdp88QEl2H4fWalMGnSCrr1agT/AVDndlyw2YJQA89f3ttR/AkEIP9EkBXXeGl6cC72/EZT5r6rw==

"@next/[email protected].12":
version "14.2.12"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.12.tgz#017ccb35e94dd5336f38bdab90ccc7163467e0d1"
integrity sha512-EfD9L7o9biaQxjwP1uWXnk3vYZi64NVcKUN83hpVkKocB7ogJfyH2r7o1pPnMtir6gHZiGCeHKagJ0yrNSLNHw==

"@next/[email protected].12":
version "14.2.12"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.12.tgz#b5df80780eceef6b44a0cedfe7234d34a60af1f9"
integrity sha512-iQ+n2pxklJew9IpE47hE/VgjmljlHqtcD5UhZVeHICTPbLyrgPehaKf2wLRNjYH75udroBNCgrSSVSVpAbNoYw==

"@next/[email protected].12":
version "14.2.12"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.12.tgz#553ad8dd26e8fce343f2b01d741dffc8bb909e37"
integrity sha512-rFkUkNwcQ0ODn7cxvcVdpHlcOpYxMeyMfkJuzaT74xjAa5v4fxP4xDk5OoYmPi8QNLDs3UgZPMSBmpBuv9zKWA==

"@next/[email protected].12":
version "14.2.12"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.12.tgz#cf9c3907f43b9a0cbe2f10a46f6c9f5de05ba9dc"
integrity sha512-PQFYUvwtHs/u0K85SG4sAdDXYIPXpETf9mcEjWc0R4JmjgMKSDwIU/qfZdavtP6MPNiMjuKGXHCtyhR/M5zo8g==

"@next/[email protected].12":
version "14.2.12"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.12.tgz#cad79313b383e95e6d53bdb631b47a26e63146e0"
integrity sha512-FAj2hMlcbeCV546eU2tEv41dcJb4NeqFlSXU/xL/0ehXywHnNpaYajOUvn3P8wru5WyQe6cTZ8fvckj/2XN4Vw==

"@next/[email protected].12":
version "14.2.12"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.12.tgz#9d5b2f2733221ae85c3e5c6d4b6f8f1da32d5cae"
integrity sha512-yu8QvV53sBzoIVRHsxCHqeuS8jYq6Lrmdh0briivuh+Brsp6xjg80MAozUsBTAV9KNmY08KlX0KYTWz1lbPzEg==

"@swc/counter@^0.1.3":
version "0.1.3"
Expand Down Expand Up @@ -540,28 +540,28 @@ nanoid@^3.3.6, nanoid@^3.3.7:
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==

next@^14.2.4:
version "14.2.4"
resolved "https://registry.yarnpkg.com/next/-/next-14.2.4.tgz#ef66c39c71e2d8ad0a3caa0383c8933f4663e4d1"
integrity sha512-R8/V7vugY+822rsQGQCjoLhMuC9oFj9SOi4Cl4b2wjDrseD0LRZ10W7R6Czo4w9ZznVSshKjuIomsRjvm9EKJQ==
next@^14.2.10:
version "14.2.12"
resolved "https://registry.yarnpkg.com/next/-/next-14.2.12.tgz#39d52c090c40980f4ae56f485ad234b777ebc955"
integrity sha512-cDOtUSIeoOvt1skKNihdExWMTybx3exnvbFbb9ecZDIxlvIbREQzt9A5Km3Zn3PfU+IFjyYGsHS+lN9VInAGKA==
dependencies:
"@next/env" "14.2.4"
"@next/env" "14.2.12"
"@swc/helpers" "0.5.5"
busboy "1.6.0"
caniuse-lite "^1.0.30001579"
graceful-fs "^4.2.11"
postcss "8.4.31"
styled-jsx "5.1.1"
optionalDependencies:
"@next/swc-darwin-arm64" "14.2.4"
"@next/swc-darwin-x64" "14.2.4"
"@next/swc-linux-arm64-gnu" "14.2.4"
"@next/swc-linux-arm64-musl" "14.2.4"
"@next/swc-linux-x64-gnu" "14.2.4"
"@next/swc-linux-x64-musl" "14.2.4"
"@next/swc-win32-arm64-msvc" "14.2.4"
"@next/swc-win32-ia32-msvc" "14.2.4"
"@next/swc-win32-x64-msvc" "14.2.4"
"@next/swc-darwin-arm64" "14.2.12"
"@next/swc-darwin-x64" "14.2.12"
"@next/swc-linux-arm64-gnu" "14.2.12"
"@next/swc-linux-arm64-musl" "14.2.12"
"@next/swc-linux-x64-gnu" "14.2.12"
"@next/swc-linux-x64-musl" "14.2.12"
"@next/swc-win32-arm64-msvc" "14.2.12"
"@next/swc-win32-ia32-msvc" "14.2.12"
"@next/swc-win32-x64-msvc" "14.2.12"

node-releases@^2.0.14:
version "2.0.14"
Expand Down
Loading

0 comments on commit ac651db

Please sign in to comment.