From 6957a4a830040e9917e6788396bbdb1e88271e88 Mon Sep 17 00:00:00 2001 From: "James M. Greene" Date: Tue, 2 Feb 2021 09:43:53 -0600 Subject: [PATCH 1/2] Test bypassing Fastly for the Discussions, Packages, and Actions product families (#17611) Co-authored-by: Kevin Heis Co-authored-by: Kevin Heis --- middleware/set-fastly-cache-headers.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/middleware/set-fastly-cache-headers.js b/middleware/set-fastly-cache-headers.js index f7c2140307..9e6cc02667 100644 --- a/middleware/set-fastly-cache-headers.js +++ b/middleware/set-fastly-cache-headers.js @@ -1,7 +1,19 @@ const FASTLY_TTL = process.env.FASTLY_TTL || String(60 * 60 * 24) // 24 hours const STALE_TTL = String(60 * 10) // 10 minutes +const BYPASS_FASTLY = process.env.TEST_BYPASS_FASTLY === 'true' +const BYPASS_PRODUCTS = /^\/([a-z]{2})\/([a-z0-9._-]+@[a-z0-9._-]+\/)?(discussions|packages|actions)(\/.*|$)/i + module.exports = (req, res, next) => { + // Test bypassing Fastly for all pages inside of the Discussions product + if (BYPASS_FASTLY && BYPASS_PRODUCTS.test(req.originalUrl)) { + res.set({ + 'surrogate-control': 'private, no-store', + 'cache-control': 'private, no-store' + }) + return next() + } + res.set({ // Say you want Fastly to cache your content but you don't want it cached by browsers. From aa69cf3c3f0b0ca074c23e6dabaaf1827242458b Mon Sep 17 00:00:00 2001 From: Sarah Edwards Date: Tue, 2 Feb 2021 08:35:14 -0800 Subject: [PATCH 2/2] ubuntu-latest migration is in progress (#17606) Co-authored-by: Lucas Costi --- data/reusables/github-actions/supported-github-runners.md | 4 ++-- data/reusables/github-actions/ubuntu-runner-preview.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/reusables/github-actions/supported-github-runners.md b/data/reusables/github-actions/supported-github-runners.md index 80614213e4..3af3da15cb 100644 --- a/data/reusables/github-actions/supported-github-runners.md +++ b/data/reusables/github-actions/supported-github-runners.md @@ -1,8 +1,8 @@ | Virtual environment | YAML workflow label | | --------------------|---------------------| | Windows Server 2019 | `windows-latest` or `windows-2019` | -| Ubuntu 20.04 | `ubuntu-20.04` | -| Ubuntu 18.04 | `ubuntu-latest` or `ubuntu-18.04` | +| Ubuntu 20.04 | `ubuntu-latest` (see note) or `ubuntu-20.04` | +| Ubuntu 18.04 | `ubuntu-latest` (see note) or `ubuntu-18.04` | | Ubuntu 16.04 | `ubuntu-16.04` | | macOS Big Sur 11.0 | `macos-11.0` | | macOS Catalina 10.15 | `macos-latest` or `macos-10.15` | diff --git a/data/reusables/github-actions/ubuntu-runner-preview.md b/data/reusables/github-actions/ubuntu-runner-preview.md index 1a3636e0e1..6eb91edc13 100644 --- a/data/reusables/github-actions/ubuntu-runner-preview.md +++ b/data/reusables/github-actions/ubuntu-runner-preview.md @@ -1,5 +1,5 @@ {% note %} -**Note:** The Ubuntu 20.04 virtual environment is currently provided as a preview only. The `ubuntu-latest` YAML workflow label still uses the Ubuntu 18.04 virtual environment. +**Note:** The `ubuntu-latest` label is currently being migrated from the Ubuntu 18.04 virtual environment to Ubuntu 20.04. Specifying the `ubuntu-latest` label during the migration might use either virtual environment. To explicitly use Ubuntu 20.04 or Ubuntu 18.04, specify `ubuntu-20.04` or `ubuntu-18.04`. When the migration is complete, `ubuntu-latest` will use the Ubuntu 20.04 virtual environment. For more information about the migration, see "[Ubuntu-latest workflows will use Ubuntu-20.04](https://github.com/actions/virtual-environments/issues/1816)." {% endnote %}