Skip to content

Commit fce368a

Browse files
authored
Merge pull request #44827 from github/repo-sync
Repo sync
2 parents ddad8e0 + 815b739 commit fce368a

43 files changed

Lines changed: 563 additions & 507 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/instructions/content.instructions.md

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,23 @@ Examples:
9595

9696
## Versioning
9797

98-
Avoid `{% ifversion fpt %}`, `{% ifversion ghec %}`, and `{% ifversion fpt or ghec %}` in content files whenever possible. Instead of suggesting or adding version-gating within an article:
98+
Follow one of these sets of instructions, depending on how articles are versioned in the frontmatter. Articles may be versioned for FPT and GHEC, for GHES only, or for all three. Articles may also be versioned using feature-based versioning defined in `data/features`. Feature-based versioning allows centralized control of when content appears for specific GHES releases.
9999

100-
* Write content that applies to all versions the article is versioned for
101-
* If content is truly version-specific, consider whether it is low-harm to show it to all readers (e.g., an enterprise-only row in a reference table)
102-
* Only use `{% ifversion %}` as a last resort when content would be actively misleading for readers on a different version
100+
### FPT/GHEC-only articles
103101

104-
**FPT and GHEC content**: When dotcom content applies to both products, version the page for `fpt` and `ghec` in the frontmatter. Do NOT use in-article Liquid versioning. Do NOT suggest adding `{% ifversion fpt or ghec %}` blocks as a fix for content that mentions a dotcom-only feature. Instead, suggest rewriting the content using the alternatives to inline versioning options listed below.
102+
All articles that are ONLY for FPT and GHEC should be versioned for these versions in the frontmatter.
105103

106-
**GHES content**: If versioning is necessary for GitHub Enterprise Server content, use feature-based versioning (FBV). GHES content should rely on feature flags defined in `data/features/` rather than inline `{% ifversion ghes %}` blocks. Feature flags allow centralized control of when content appears for specific GHES releases.
104+
For such content, DO NOT use in-article Liquid versioning such as `{% ifversion fpt %}`, `{% ifversion ghec %}`, and `{% ifversion fpt or ghec %}`.
107105

108-
### Alternatives to inline versioning
106+
### GHES-only articles
107+
108+
All articles that are ONLY for GitHub Enterprise Server (GHES) should be versioned in the frontmatter using feature-based versioning defined in `data/features/`.
109+
110+
### FPT, GHEC, GHES articles
111+
112+
All articles that are versioned for all of FPT, GHEC, and GHES in the frontmatter MAY require certain blocks of content to be versioned using in-article Liquid versioning. Before recommending this, check if this is really the case.
113+
114+
#### Check in-article versioning is required
109115

110116
Before resorting to in-article versioning, first consider whether the content is actually different across versions. Often procedures can be simplified to work at both levels.
111117

@@ -127,26 +133,6 @@ Use these strategies instead of `{% ifversion %}`, depending on the level of con
127133
* End list items with "({% data variables.product.prodname_ghe_cloud %} only)", "({% data variables.product.prodname_dotcom_the_website %} only)", etc.
128134
* Specify if the feature is not available for GHES with "NAME-OF-FEATURE is not available for {% data variables.product.prodname_ghe_server %}", "... (not available in {% data variables.product.prodname_ghe_server %})", etc.
129135

130-
### Example
131-
132-
When documenting a feature that only applies to dotcom (not GHES):
133-
134-
❌ Don't wrap content in version blocks:
135-
136-
```markdown
137-
{% ifversion fpt or ghec %}
138-
139-
## Immutable subject claims
140-
141-
Repositories created after July 15, 2026 now use an immutable default subject format.
142-
143-
{% endif %}
144-
```
145-
146-
✅ Do use prose to indicate availability:
147-
148-
```markdown
149-
## Immutable subject claims
136+
#### If in-article versioning is required
150137

151-
Repositories created after July 15, 2026 now use an immutable default subject format. This rollout does not include {% data variables.product.prodname_ghe_server %}.
152-
```
138+
In-article versioning is required if a block of content in an article is definitely ONLY relevant for GHES, but the article itself is otherwise versioned in the frontmatter for all of FPT, GHEC, and GHES. In this situation, use feature-based versioning (FBV) wherever possible, using `{% ifversion FBV %}` blocks, where FBV is defined in `data/features/`. If it's not possible to use FBV, use {% ifversion ghes %} blocks, which will version the content block for all versions of GHES.

.github/workflows/index-general-search.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,7 @@ jobs:
231231
env:
232232
FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }}
233233
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
234-
FASTLY_SURROGATE_KEY: api-search:${{ matrix.language }}
235-
run: npm run purge-fastly-edge-cache
234+
run: npm run purge-fastly -- --surrogate-key api-search:${{ matrix.language }}
236235

237236
- name: Upload failures artifact
238237
if: ${{ steps.check-failures.outputs.has_failures == 'true' }}

.github/workflows/purge-fastly-all.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/purge-fastly.yml

Lines changed: 69 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,50 @@
11
name: Purge Fastly
22

3-
# **What it does**: Sends a soft-purge to Fastly.
4-
# **Why we have it**: So that, right after a production deploy, we start afresh
5-
# **Who does it impact**: Writers and engineers.
3+
# **What it does**: Purges Fastly after a deploy and on demand. Soft purge by
4+
# default; can hard purge specific languages, or hard purge the ENTIRE cache.
5+
# **Why we have it**: So that, right after a production deploy, we start afresh,
6+
# and so docs engineering can clear a bad cache state without the Fastly UI.
7+
# **Who does it impact**: Writers and engineers. A full purge impacts all readers,
8+
# origin sees a traffic spike while the cache refills, so it's gated below.
69

710
on:
811
deployment_status:
912
workflow_dispatch:
1013
inputs:
1114
languages:
12-
description: "Comma separated languages. E.g. 'en,es,ja,pt,zh,ru,fr,ko,de' (defaults to en)"
15+
description: "Languages: Comma separated languages, e.g. 'en,es,ja,pt,zh,ru,fr,ko,de'. Blank = all languages."
1316
required: false
14-
default: 'en' # Temporary, only purge English on deploy. Set to empty string for all
17+
default: 'en'
18+
hard:
19+
description: 'Hard purge: Evict immediately instead of the default soft purge. Use when a soft purge fails to clear stale content.'
20+
type: boolean
21+
required: false
22+
default: false
23+
everything:
24+
description: 'Everything: Hard-purge the entire Fastly cache... every key, all readers. Ignores the languages/hard inputs. To confirm, type exactly: "purge everything". Otherwise leave blank.'
25+
required: false
26+
default: ''
1527

1628
permissions:
1729
contents: read
1830

31+
# Serialize full-cache purges so two can't overlap and leave the cache in an
32+
# unknown state. Every other run (per-deploy, per-language) gets a unique group
33+
# so those never block each other.
34+
concurrency:
35+
group: ${{ (inputs.everything == 'purge everything' && 'purge-fastly-all') || format('purge-fastly-{0}', github.run_id) }}
36+
cancel-in-progress: false
37+
1938
env:
2039
FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }}
2140
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
2241

2342
jobs:
2443
send-purges:
25-
# Run when workflow_dispatch is the event (manual) or when deployment_status is the event (automatic) and it's a successful production deploy.
26-
# NOTE: This workflow triggers on all deployment_status events (including staging), but only runs for production.
44+
# Run when workflow_dispatch is the event
45+
# or when deployment_status is the event and it's a successful production deploy.
46+
# NOTE: This workflow triggers on all deployment_status events,
47+
# including staging, but only runs for production.
2748
# Non-production deploys will show as "skipped" - this is expected behavior.
2849
if: >-
2950
${{
@@ -38,52 +59,50 @@ jobs:
3859

3960
- uses: ./.github/actions/node-npm-setup
4061

41-
- name: Wait for production to match build commit SHA
42-
if: github.event_name != 'workflow_dispatch'
43-
# A single /_build match only proves *one* Moda instance is serving the
44-
# new build; others can still be mid-rollout. If we purge then, Fastly's
45-
# soft purge serves stale-while-revalidate and may revalidate against a
46-
# lagging instance, re-caching old content as fresh for a full TTL. So we
47-
# require several consecutive matches to confirm the rollout has settled
48-
# across instances before purging.
62+
- name: Validate confirmation input
63+
# A full-cache purge only triggers on the exact string "purge everything".
64+
# Any other non-empty value (e.g. a typo) would otherwise be silently
65+
# ignored and fall through to a normal soft purge that finishes green, so
66+
# an operator could think they evicted the whole cache when they didn't.
67+
# Fail loudly instead.
68+
env:
69+
EVERYTHING_INPUT: ${{ inputs.everything }}
4970
run: |
50-
needs=$(git rev-parse HEAD)
51-
start_time=$(date +%s)
52-
timeout_seconds=1200
53-
required_matches=5
54-
interval_seconds=10
55-
consecutive=0
56-
while [[ $consecutive -lt $required_matches ]]
57-
do
58-
if [[ $(($(date +%s) - $start_time)) -gt $timeout_seconds ]]
59-
then
60-
echo "Production did not reach $required_matches consecutive build matches within $timeout_seconds seconds"
61-
exit 1
62-
fi
63-
if [[ $needs == $(curl -s --fail --retry-connrefused --retry 5 https://docs.github.com/_build) ]]
64-
then
65-
consecutive=$((consecutive + 1))
66-
echo "Production matches the build commit ($consecutive/$required_matches)"
67-
else
68-
if [[ $consecutive -gt 0 ]]
69-
then
70-
echo "Production stopped matching the build commit; resetting consecutive count"
71-
else
72-
echo "Production is not up to date with the build commit"
73-
fi
74-
consecutive=0
75-
fi
76-
if [[ $consecutive -lt $required_matches ]]
77-
then
78-
sleep $interval_seconds
79-
fi
80-
done
81-
echo "Production is up to date with the build commit ($required_matches consecutive matches)"
71+
if [ -n "$EVERYTHING_INPUT" ] && [ "$EVERYTHING_INPUT" != "purge everything" ]; then
72+
echo "::error::To purge the entire cache, the 'everything' input must be exactly 'purge everything'. Got: '$EVERYTHING_INPUT'. Leave it blank for a normal purge."
73+
exit 1
74+
fi
8275
83-
- name: Purge Fastly edge cache per language
76+
- name: Purge Fastly
77+
# Auto post-deploy runs wait for the build, purge English only (temporary),
78+
# and stay soft. A manual run uses the inputs: blank languages = all, the
79+
# `hard` toggle, or a confirmed full-cache purge.
80+
#
81+
# Raw inputs are passed through the environment and quoted, never spliced
82+
# into the command string, so a value like `en' --everything` can't break
83+
# out of its argument and inject another flag.
8484
env:
85-
LANGUAGES: ${{ inputs.languages || 'en' }} # Temporary, only purge English on deploy. Set to empty string for all
86-
run: npm run purge-fastly-edge-cache-per-language
85+
EVENT_NAME: ${{ github.event_name }}
86+
LANGUAGES_INPUT: ${{ inputs.languages }}
87+
HARD_INPUT: ${{ inputs.hard }}
88+
EVERYTHING_INPUT: ${{ inputs.everything }}
89+
run: |
90+
args=()
91+
if [ "$EVENT_NAME" != "workflow_dispatch" ]; then
92+
args+=(--wait-for-build)
93+
fi
94+
if [ "$EVENT_NAME" = "deployment_status" ]; then
95+
args+=(--languages en)
96+
elif [ -n "$LANGUAGES_INPUT" ]; then
97+
args+=(--languages "$LANGUAGES_INPUT")
98+
fi
99+
if [ "$HARD_INPUT" = "true" ]; then
100+
args+=(--hard)
101+
fi
102+
if [ "$EVERYTHING_INPUT" = "purge everything" ]; then
103+
args+=(--everything)
104+
fi
105+
npm run purge-fastly -- "${args[@]}"
87106
88107
- uses: ./.github/actions/slack-alert
89108
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
19.4 KB
Loading

content/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,12 +1384,15 @@ In this example, `ghe-repl-status -vv` sends verbose status information from a r
13841384
13851385
### ghe-check-background-upgrade-jobs
13861386
1387-
During an upgrade to a feature release, this utility displays the status of background jobs on {% data variables.location.product_location %}. If you're running back-to-back upgrades, you should use this utility to check that all background jobs are complete before proceeding with the next upgrade.
1387+
During an upgrade to a feature release, this utility displays the status of background upgrade jobs, such as Elasticsearch index migrations, on {% data variables.location.product_location %}. If you're running back-to-back upgrades, you should use this utility to check that all background jobs are complete before proceeding with the next feature upgrade.
13881388
13891389
```shell
13901390
ghe-check-background-upgrade-jobs
13911391
```
13921392
1393+
> [!NOTE]
1394+
> This utility only gates a **subsequent feature upgrade**. It is not a prerequisite for upgrading replica or other additional nodes to the same release.
1395+
13931396
### ghe-migrations
13941397
13951398
During an upgrade to a feature release, this utility displays the status of active database migrations on {% data variables.location.product_location %}. The output includes a version identifier for the migration, the migration's name, the migration's status, and the current duration of the migration.

content/admin/upgrading-your-instance/performing-an-upgrade/upgrading-with-an-upgrade-package.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ While you can use a hotpatch to upgrade to the latest patch release within a fea
5353

5454
See [AUTOTITLE](/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-check-background-upgrade-jobs).
5555

56+
> [!NOTE]
57+
> Background upgrade jobs only need to complete before you begin a subsequent feature upgrade. You don't need to wait for `ghe-check-background-upgrade-jobs` before upgrading replica or other additional nodes to the same release.
58+
5659
To monitor progress of the configuration run, read the output in `/data/user/common/ghe-config.log`. For example, you can tail the log by running the following command:
5760

5861
```shell

content/copilot/concepts/agents/copilot-cli/context-management.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ This means that in a very long session, {% data variables.product.prodname_copil
3434

3535
## Checking your context usage
3636

37-
You can check how much of the context window is currently in use by entering the `/context` slash command. This displays a visual breakdown of your token usage, showing:
38-
39-
* **System/Tools**: The fixed overhead of system instructions and tool definitions.
40-
* **Messages**: The space used by your conversation history.
41-
* **Free Space**: How much room is left for new messages.
42-
* **Buffer**: A reserved portion that triggers automatic context management.
37+
You can use the `/context` slash command to visualize your current context window usage. The first line of the output shows the active model and the number of tokens currently in use out of the model's total context window capacity. The remainder of the output shows token usage, and context window percentage, for:
38+
39+
* **System Prompt**: the base system prompt.
40+
* **Custom Instructions**: your loaded custom instructions (shown only when present).
41+
* **System Tools**: built-in tool definitions.
42+
* **MCP Tools**: tool definitions contributed by MCP servers.
43+
* **Messages**: your conversation history.
44+
* **Free Space**: unused context still available.
45+
* **Buffer**: capacity reserved for the model's response and headroom.
4346

4447
![Screenshot of the output of the '/context' CLI command.](/assets/images/help/copilot/copilot-cli-context-usage.png)
4548

0 commit comments

Comments
 (0)