diff --git a/assets/images/help/docs/hover-card.png b/assets/images/help/docs/hover-card.png new file mode 100644 index 0000000000..328c12e8d9 Binary files /dev/null and b/assets/images/help/docs/hover-card.png differ diff --git a/content/get-started/learning-about-github/index.md b/content/get-started/learning-about-github/index.md index 0ccdcbf2aa..4637cc412e 100644 --- a/content/get-started/learning-about-github/index.md +++ b/content/get-started/learning-about-github/index.md @@ -18,6 +18,7 @@ topics: children: - /githubs-plans - /about-versions-of-github-docs + - /using-hover-cards-on-github-docs - /github-language-support - /types-of-github-accounts - /access-permissions-on-github diff --git a/content/get-started/learning-about-github/using-hover-cards-on-github-docs.md b/content/get-started/learning-about-github/using-hover-cards-on-github-docs.md new file mode 100644 index 0000000000..9cecedbff3 --- /dev/null +++ b/content/get-started/learning-about-github/using-hover-cards-on-github-docs.md @@ -0,0 +1,24 @@ +--- +title: Using hover cards on GitHub Docs +intro: 'Hover cards give you information about other articles on {% data variables.product.prodname_docs %}.' +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +shortTitle: Hover cards on Docs +--- + +## About hover cards + +When you're reading an article on {% data variables.product.prodname_docs %} and find a link to another article, you can open a hover card to get more information about the article. The hover card provides basic information about the article, so you can determine whether it will be useful to you without leaving the article you're reading. + +If you navigate {% data variables.product.prodname_docs %} with a mouse, the hover card is displayed when you hover the cursor over a link. + +![Screenshot of part of an article on {% data variables.product.prodname_docs %}. A cursor hovers over a link to an article called "Create a repo," and a hover card displays the article's location, title, and introduction.](/assets/images/help/docs/hover-card.png) + +## Using hover cards with a keyboard + +When you have placed focus on a link to an article, you can press Enter to follow the link directly, or you can press Alt+ (Windows/Linux) or Option+ (Mac) to open the hover card. + +With the hover card open, you can press Enter to follow the link, or you can press Esc to close the hover card. diff --git a/data/reusables/actions/actions-group-concurrency.md b/data/reusables/actions/actions-group-concurrency.md index a8c47bf599..a38c87ed0d 100644 --- a/data/reusables/actions/actions-group-concurrency.md +++ b/data/reusables/actions/actions-group-concurrency.md @@ -2,7 +2,10 @@ When a concurrent job or workflow is queued, if another job or workflow using th {% note %} -**Note:** The concurrency group name is case insensitive. For example, `prod` and `Prod` will be treated as the same concurrency group. +**Notes:** + +- The concurrency group name is case insensitive. For example, `prod` and `Prod` will be treated as the same concurrency group. +- Ordering is not guaranteed for jobs or runs using concurrency groups, they are handled in the order that they are processed. {% endnote %} diff --git a/data/reusables/actions/jobs/section-using-concurrency-jobs.md b/data/reusables/actions/jobs/section-using-concurrency-jobs.md index 81aaf28d60..9bda5ba7d4 100644 --- a/data/reusables/actions/jobs/section-using-concurrency-jobs.md +++ b/data/reusables/actions/jobs/section-using-concurrency-jobs.md @@ -1,9 +1,3 @@ -{% note %} - -**Note:** When concurrency is specified at the job level, order is not guaranteed for jobs or runs that queue within 5 minutes of each other. - -{% endnote %} - You can use `jobs..concurrency` to ensure that only a single job or workflow using the same concurrency group will run at a time. A concurrency group can be any string or expression. Allowed expression contexts: [`github`](/actions/learn-github-actions/contexts#github-context), [`inputs`](/actions/learn-github-actions/contexts#inputs-context), [`vars`](/actions/learn-github-actions/contexts#vars-context), [`needs`](/actions/learn-github-actions/contexts#needs-context), [`strategy`](/actions/learn-github-actions/contexts#strategy-context), and [`matrix`](/actions/learn-github-actions/contexts#matrix-context). For more information about expressions, see "[AUTOTITLE](/actions/learn-github-actions/expressions)." You can also specify `concurrency` at the workflow level. For more information, see [`concurrency`](/actions/using-workflows/workflow-syntax-for-github-actions#concurrency). diff --git a/src/pageinfo/middleware.js b/src/pageinfo/middleware.js index 8399d5891f..741091210f 100644 --- a/src/pageinfo/middleware.js +++ b/src/pageinfo/middleware.js @@ -83,6 +83,22 @@ const pageinfoMiddleware = (req, res, next) => { return next() } +// THIS IS AN EXPERIMENT. THIS CODE WILL BE DELETED IN THE NEAR FUTURE. +// The cache-control headers (and surrogate-control) are set to be +// aggressive. That means that in theory, after a deployment, when Fastly +// has been purged accordingly, the next time a pageinfo is requested, +// it'll come here to the backend code and produce the JSON response, +// and once it's done it once, it won't be needed again, because, +// in theory, the CDN will have cached it. +// But pageinfo requests are very frequent. So frequent that sometimes, +// the delay of CDN is longer than the chance of it being requested again +// from the backend. This can possibly still happen even with a origin +// shield. +// In this experiment we want to measure how often this happens. +// We are going to test how often the CDN requests the *same* pageinfo from the +// backend. +const CACHEABLE_PATHNAMES = new Map() + router.get( '/v1', validationMiddleware, @@ -159,8 +175,20 @@ router.get( intro, } - const tags = ['version:v1', `pathname:${pathname}`] - statsd.increment('api.pageinfo', 1, tags) + const tags = [ + // According to https://docs.datadoghq.com/getting_started/tagging/#define-tags + // the max length of a tag is 200 characters. Most of ours are less than + // that but we truncate just to be safe. + `pathname:${pathname}`.slice(0, 200), + ] + statsd.increment('pageinfo.lookup', 1, tags) + + // See lengthy comment above about the experiment and the + // CACHEABLE_PATHNAMES global Map object. + if (CACHEABLE_PATHNAMES.has(pathname)) { + statsd.increment('pageinfo.cacheable', CACHEABLE_PATHNAMES.get(pathname), tags) + } + CACHEABLE_PATHNAMES.set(pathname, (CACHEABLE_PATHNAMES.get(pathname) || 0) + 1) defaultCacheControl(res)