Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1159,27 +1159,32 @@ ghe-dpages evacuate pages-server-UUID

### ghe-remove-node

This utility removes a node from a cluster. If you're replacing a node, after you've set up a replacement node, you can use this command to take the old node offline. For more information, see [AUTOTITLE](/admin/monitoring-and-managing-your-instance/configuring-clustering/replacing-a-cluster-node).
This utility removes a node from a cluster{% ifversion ghes > 3.17 %} or an additional node from a high availability (HA) configuration{% endif %}. For a planned replacement of a functional cluster node, set up the replacement node before using this command to remove the old node. For more information, see [AUTOTITLE](/admin/monitoring-and-managing-your-instance/configuring-clustering/replacing-a-cluster-node#replacing-a-functional-node).{% ifversion ghes > 3.17 %} For the required HA checks and verification steps, see [Removing an additional node](/admin/monitoring-and-managing-your-instance/additional-nodes/configuring-additional-nodes#removing-an-additional-node).{% endif %}

You must run this command from the primary MySQL node in your cluster, which is typically the node designated as `mysql-master` in your cluster configuration file (`cluster.conf`). You can use this command to remove any node, with the exception of the `mysql-master` or `redis-master` node. For more information, see [AUTOTITLE](/admin/monitoring-and-managing-your-instance/configuring-clustering/initializing-the-cluster#about-the-cluster-configuration-file).
Before using this command for a planned removal, install the latest patch release for your feature release on every node. Every node must run the same exact release. Wait for any upgrade or configuration run to finish before starting removal. For emergency replacement of an unavailable cluster node, see [AUTOTITLE](/admin/monitoring-and-managing-your-instance/configuring-clustering/replacing-a-cluster-node#replacing-a-node-in-an-emergency).

You must run this command from the primary MySQL node, which is typically the node designated as `mysql-master` in the cluster configuration file (`cluster.conf`).{% ifversion ghes > 3.17 %} In an HA configuration, run the command from the HA primary.{% endif %} You cannot remove the `mysql-master` or `redis-master` node. For more information, see [AUTOTITLE](/admin/monitoring-and-managing-your-instance/configuring-clustering/initializing-the-cluster#about-the-cluster-configuration-file).

```shell
ghe-remove-node HOSTNAME
```

The command does the following things:
* Evacuates data from any data services running on the node, so that the remaining nodes in your cluster contain copies of the data
* Marks the node as offline in your configuration, applies this change to the rest of the nodes in the cluster, and stops traffic being routed to the node

* Evacuates data from any data services running on the node, so that the remaining nodes contain copies of the data
* Drains workloads from the node
* Removes the node from the configuration.{% ifversion ghes > 3.17 %} If another non-primary node remains, the command runs `ghe-config-apply` and stops routing traffic to the removed node. If no non-primary node remains, the command removes cluster metadata and converts the primary to a standalone instance without running `ghe-config-apply`.{% else %} The command runs `ghe-config-apply` and stops routing traffic to the removed node.{% endif %}

You can run the command with the following flags.

Flag | Description
---- | ----------
`-ne/--no-evacuate` | Skips evacuation of data services (warning: may result in data loss).
`-ne/--no-evacuate` | Marks the node offline in the configuration instead of removing it, and skips evacuation of data services (warning: may result in data loss).
`-v/--verbose` | Prints additional information to the console.

> [!NOTE]
> * This command can only be used to remove a node from a cluster configuration. It cannot be used to remove a node from a high availability configuration.
> {% ifversion ghes > 3.17 %}* In an HA configuration, you can use this command to remove an additional node. You cannot use it to remove the HA primary or a replica.{% endif %}
> * The target node must report `ready` in `nomad node status` to complete removal. The `--no-evacuate` flag does not remove an offline node from the configuration.
> * This command does not support parallel execution. To remove multiple nodes, you must wait until this command has finished before running it for another node.

### ghe-spokesctl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,39 @@ We recommend a maintenance window to add stateless nodes.

## Removing an additional node

To remove a node, run `ghe-remove-node` from the node you want to remove. Then, on the primary node, you must run:
Before removing an additional node, install the same latest patch for your feature release on every node in the HA deployment and schedule a maintenance window. Wait for any upgrade or configuration run to finish before starting removal.

``` shell copy
ghe-config-apply
```
1. On the HA primary, check the status of every node in the HA deployment.

```shell copy
ghe-cluster-nodes
ghe-cluster-nodes --offline
nomad node status
ghe-cluster-status --extended --verbose
```

Confirm that both `ghe-cluster-nodes` commands list the same hostnames and include the hostname of the node you plan to remove. Confirm that every node has a Nomad status of `ready`, and `connect-ssh` and `enterprise-version` are `ok` for every node. Confirm that stateful services on the primary and any replicas are healthy. If no replica remains, a warning that no MySQL replica was found is expected. Failures limited to web, job, or memcache workloads on the target do not block removal. If any other node-level or stateful-service check fails, contact {% data variables.contact.github_support %} before removal.

1. On the HA primary, remove the additional node. Replace `HOSTNAME` with the hostname of the additional node.

```shell copy
ghe-remove-node --verbose HOSTNAME
```

If another non-primary node remains, the command drains the target, removes it from the HA configuration, and runs `ghe-config-apply`. If no non-primary node remains, the command removes the cluster metadata and converts the primary to a standalone instance without running `ghe-config-apply`. Do not run `ghe-config-apply` separately in either case.

1. Verify the removal.

If another non-primary node remains, run the following commands on the HA primary. Confirm that the hostname is absent and that the HA configuration is healthy.

```shell copy
ghe-cluster-nodes --offline
ghe-cluster-status --extended --verbose
```

The `ghe-config-apply` command is a requirement to remove stateless nodes.
If no non-primary node remains, do not run the cluster-only commands. Confirm that the removal output contains `Cluster artifacts removed; now standalone.`, then confirm that the primary serves user traffic and processes web and job workloads.

We recommend a maintenance window to remove stateless nodes.
If an additional node is offline, unreachable, or on a different version, or if `ghe-remove-node` or a verification check fails, contact {% data variables.contact.github_support %}. Do not edit `cluster.conf` manually.

## Reprovisioning a node that previously hosted {% data variables.product.prodname_ghe_server %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Replacing a cluster node
intro: If a node fails in a {% data variables.product.prodname_ghe_server %} cluster, or if you want to add a new node with more resources, mark any nodes to replace as offline, then add the new node.
intro: Replace a functional or failed node in a {% data variables.product.prodname_ghe_server %} cluster while preserving the services that the node provides.
product: '{% data reusables.gated-features.cluster %}'
redirect_from:
- /enterprise/admin/clustering/replacing-a-cluster-node
Expand Down Expand Up @@ -28,7 +28,9 @@ After you replace a node, {% data variables.location.product_location %} does no

You can replace an existing, functional node in your cluster. For example, you may want to provide a virtual machine (VM) with additional CPU, memory, or storage resources.

To replace a functional node, install the {% data variables.product.prodname_ghe_server %} appliance on a new VM, configure an IP address, add the new node to the cluster configuration file, initialize the cluster and apply the configuration, then take the node you replaced offline.
To replace a functional node, install the {% data variables.product.prodname_ghe_server %} appliance on a new VM, configure an IP address, add the new node to the cluster configuration file, initialize the cluster and apply the configuration, then remove the node you replaced.

Before starting the replacement, install the latest patch release for your feature release on every cluster node, including the replacement node. Every node must run the same exact release. Wait for any upgrade or configuration run to finish before starting replacement.

> [!NOTE]
> If you're replacing the primary database node, see [Replacing the primary database node](#replacing-the-primary-database-node-mysql-or-mysql-and-mssql).
Expand All @@ -38,13 +40,13 @@ To replace a functional node, install the {% data variables.product.prodname_ghe
{% data reusables.enterprise_clustering.replacing-a-cluster-node-modify-cluster-conf %}
{% data reusables.enterprise_clustering.replacing-a-cluster-node-initialize-new-node %}
{% data reusables.enterprise_clustering.replacing-a-cluster-node-config-node %}
1. To take the node you're replacing offline, from the primary MySQL node of your cluster, run the following command.
1. To remove the node you're replacing, from the primary MySQL node of your cluster, run the following command.

```shell
ghe-remove-node NODE-HOSTNAME
```

This command will evacuate data from any data services running on the node, mark the node as offline in your configuration, and stop traffic being routed to the node. For more information, see [AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities#ghe-remove-node).
This command evacuates data from any data services running on the node, drains its workloads, removes the node from the cluster configuration, applies the change, and stops traffic from being routed to the node. For more information, see [AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/command-line-utilities#ghe-remove-node).

## Replacing a node in an emergency

Expand All @@ -55,6 +57,8 @@ You can replace a failed node in your cluster. For example, a software or hardwa

To replace a node in an emergency, you'll take the failed node offline, add your replacement node to the cluster, then run commands to remove references to data services on the removed node.

Before starting the replacement, confirm that every available node that will remain in the cluster already runs the latest patch release for your feature release. Install that exact release on the replacement node. If the remaining nodes are not already on that release, contact {% data variables.contact.github_support %} before continuing. Wait for any active upgrade or configuration run to finish.

1. To remove the node that is experiencing issues from the cluster, from the primary MySQL node of your cluster, run the following command. Replace NODE-HOSTNAME with the hostname of the node you're taking offline.

```shell
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Archive pull requests
intro: Repository administrators can archive a pull request to remove it from public view, providing a moderation option between leaving a pull request up and permanently deleting it.
versions:
feature: archive-pull-requests
category:
- Moderate comments and conversations
redirect_from:
- /communities/moderating-comments-and-conversations/archiving-pull-requests
contentType: other
permissions: Repository administrators
---

## About archiving pull requests

Archiving a pull request removes it from public view while preserving its history for repository administrators. This provides a safer moderation path when they need to take a pull request out of public view without permanently deleting it.

When a pull request is archived:

* The pull request is only visible to repository administrators. Visitors without administrator access to the repository receive a 404 error.
* The pull request is automatically closed and locked.

When you unarchive a pull request, it becomes visible again, but it remains closed and locked. You can reopen and unlock it separately if needed.

## Archiving a pull request

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-pr %}
1. Click the pull request you want to archive.
1. Scroll to the bottom of the right sidebar. Then click **{% octicon "archive" aria-hidden="true" aria-label="archive" %} Archive pull request**.
1. Read the information about archiving the pull request, then confirm that you want to archive it.

## Unarchiving a pull request

You can find the PR by using the `is:archived` qualifier. See, [AUTOTITLE](/search-github/searching-on-github/searching-issues-and-pull-requests#search-based-on-whether-a-pull-request-is-archived).

1. Open the pull request you want to unarchive.
1. In the right sidebar, click **{% octicon "archive" aria-hidden="true" aria-label="unarchive" %} Unarchive pull request**.
1. Read the information about unarchiving the pull request, then confirm that you want to unarchive it.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Moderating comments and conversations
shortTitle: Moderation
intro: 'Moderating conversations creates a welcoming community for all contributors to your project by promoting healthy collaboration and de-escalating conflict. You can apply your community''s code of conduct to discussions by viewing reported content, editing and deleting comments, and locking conversations.'
intro: Moderating conversations creates a welcoming community for all contributors to your project by promoting healthy collaboration and de-escalating conflict. You can apply your community's code of conduct to discussions by viewing reported content, editing and deleting comments, and locking conversations.
redirect_from:
- /articles/moderating-comments-and-conversations
- /github/building-a-strong-community/moderating-comments-and-conversations
Expand All @@ -12,6 +12,7 @@ versions:
children:
- /managing-disruptive-comments
- /locking-conversations
- /archive-pull-requests
- /limiting-interactions-in-your-repository
- /limiting-interactions-for-your-personal-account
- /limiting-interactions-in-your-organization
Expand Down
1 change: 1 addition & 0 deletions content/rest/code-quality/code-quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ shortTitle: Code quality
intro: Use the REST API to manage a code quality configuration.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
ghec: '*'
autogenerated: rest
allowTitleToDifferFromFilename: true
category:
Expand Down
1 change: 1 addition & 0 deletions content/rest/code-quality/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ children:
- /code-quality
versions:
fpt: '*'
ghec: '*'
---
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ You can filter issues and pull requests based on whether they're open or closed
| `is:open` | [**performance is:open is:issue**](https://github.com/search?q=performance+is%3Aopen+is%3Aissue&type=Issues) matches open issues with the word "performance."
| `is:closed` | [**android is:closed**](https://github.com/search?utf8=%E2%9C%93&q=android+is%3Aclosed&type=) matches closed issues and pull requests with the word "android."

{% ifversion archive-pull-requests %}

## Search based on whether a pull request is archived

Repository administrators can archive a pull request to remove it from public view. You can search for archived pull requests using the `is:archived` qualifier. For more information, see [AUTOTITLE](/communities/moderating-comments-and-conversations/archive-pull-requests).

| Qualifier | Example
| ------------- | -------------
| `is:archived` | [**is:archived is:pr spam**](https://github.com/search?q=is%3Aarchived+is%3Apr+spam) matches archived pull requests that contain the word "spam" in repositories where you are a repository administrator.

{% endif %}

## Search for pull requests in the merge queue

You can also use the `is` qualifier to find pull requests that are queued to merge.
Expand Down
6 changes: 6 additions & 0 deletions data/features/archive-pull-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Reference: https://github.com/github/docs-content/issues/21075
# Archiving pull requests moderation feature
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.21'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1. To add the newly provisioned replacement node, on any node, modify the `cluster.conf` file to remove the failed node and add the replacement node. For example, this modified `cluster.conf` file replaces `ghe-data-node-3` with the newly provisioned node, `ghe-replacement-data-node-3`:
1. To add the newly provisioned replacement node, on any node, modify the `cluster.conf` file to add the replacement node. Keep the node you're replacing in `cluster.conf` until you run `ghe-remove-node` later in this procedure. For example, this modified `cluster.conf` file adds the newly provisioned node, `ghe-replacement-data-node-3`:

<pre>
[cluster "<em>ghe-replacement-data-node-3</em>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2442,6 +2442,15 @@
"additional-permissions": false,
"access": "read"
},
{
"category": "copilot",
"slug": "get-copilot-organization-repository-report-for-a-specific-day",
"subcategory": "copilot-usage-metrics",
"verb": "get",
"requestPath": "/orgs/{org}/copilot/metrics/reports/repos-1-day",
"additional-permissions": false,
"access": "read"
},
{
"category": "copilot",
"slug": "get-copilot-organization-user-teams-report-for-a-specific-day",
Expand Down
6 changes: 6 additions & 0 deletions src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json
Original file line number Diff line number Diff line change
Expand Up @@ -2472,6 +2472,12 @@
"verb": "get",
"requestPath": "/orgs/{org}/copilot/metrics/reports/organization-28-day/latest"
},
{
"slug": "get-copilot-organization-repository-report-for-a-specific-day",
"subcategory": "copilot-usage-metrics",
"verb": "get",
"requestPath": "/orgs/{org}/copilot/metrics/reports/repos-1-day"
},
{
"slug": "get-copilot-organization-user-teams-report-for-a-specific-day",
"subcategory": "copilot-usage-metrics",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
"server-to-server": true,
"additional-permissions": false
},
{
"category": "copilot",
"slug": "get-copilot-enterprise-repository-report-for-a-specific-day",
"subcategory": "copilot-usage-metrics",
"verb": "get",
"requestPath": "/enterprises/{enterprise}/copilot/metrics/reports/repos-1-day",
"access": "read",
"user-to-server": true,
"server-to-server": true,
"additional-permissions": false
},
{
"category": "copilot",
"slug": "get-copilot-enterprise-user-teams-report-for-a-specific-day",
Expand Down Expand Up @@ -3214,6 +3225,17 @@
"server-to-server": true,
"additional-permissions": false
},
{
"category": "copilot",
"slug": "get-copilot-organization-repository-report-for-a-specific-day",
"subcategory": "copilot-usage-metrics",
"verb": "get",
"requestPath": "/orgs/{org}/copilot/metrics/reports/repos-1-day",
"access": "read",
"user-to-server": true,
"server-to-server": true,
"additional-permissions": false
},
{
"category": "copilot",
"slug": "get-copilot-organization-user-teams-report-for-a-specific-day",
Expand Down
Loading
Loading