Skip to content

Commit 2897713

Browse files
hectorsectorheiskrEbonsignori
authored
Remove unused things, mostly Azure-related (#54192)
Co-authored-by: Kevin Heis <[email protected]> Co-authored-by: Evan Bonsignori <[email protected]>
1 parent 7a16634 commit 2897713

File tree

18 files changed

+11
-409
lines changed

18 files changed

+11
-409
lines changed

.github/workflows/codeql.yml

-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ jobs:
3939
- uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
4040
with:
4141
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp, ruby}
42-
config: |
43-
paths-ignore:
44-
- 'src/open-source/scripts/add-pr-links.js'
4542
- uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
4643
continue-on-error: true
4744

.prettierignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
data/release-notes/
22
src/bookmarklets/
3-
src/open-source/scripts/add-pr-links.js
43
/.next/
54

65
/.coverage

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,6 @@
232232
"!/.*",
233233
"/.next/",
234234
"src/bookmarklets/*",
235-
"src/open-source/scripts/add-pr-links.js",
236-
"src/open-source/scripts/pr-link-source.js",
237235
"rest-api-description/",
238236
"docs-internal-data/",
239237
"src/code-scanning/scripts/generate-code-scanning-query-list.ts"

src/bookmarklets/README.md

-8
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,3 @@ The installation requires a few steps:
3939
1. Paste the path in place of where it says `REPLACE_ME` in line 1 (make sure to leave the single quotes around it).
4040
1. Change the title to something like `Open in VSC`.
4141
1. Drag the generated link onto your bookmarks bar.
42-
43-
## Add preview links to PRs
44-
45-
[`src/bookmarklets/add-pr-links.js`](./add-pr-links.js)
46-
47-
This bookmarklet modifies the `Files changed` page of a GitHub pull request that has a current staging deployment. For each Markdown file in the diff view, it adds links to the preview deployment of the file for each version: `FPT / GHEC / GHES / AE`. (Some of these may redirect to another version or 404 if that version of the page doesn't exist.)
48-
49-
Note: readable JavaScript source lives in `src/bookmarklets/pr-link-source.js`. The bookmarklet code was generated via https://chriszarate.github.io/bookmarkleter.

src/frame/middleware/healthcheck.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const router = express.Router()
55

66
/**
77
* Returns the healthiness of the service.
8-
* This may be used by azure app service (forthcoming) to determine whether this
8+
* This may be used by Moda to determine whether this
99
* instance remains in the pool to handle requests
1010
* For example: if we have a failing database connection we may return a 500 status here.
1111
*/

src/frame/middleware/index.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,8 @@ export default function (app: Express) {
115115
app.use(datadog)
116116
}
117117

118-
// Put this early to make it as fast as possible because it's used,
119-
// and used very often, by the Azure load balancer to check the
120-
// health of each node.
118+
// Put this early to make it as fast as possible because it's used
119+
// to check the health of each cluster.
121120
app.use('/healthcheck', healthcheck)
122121

123122
// Must appear before static assets and all other requests

src/frame/tests/robots-txt.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ describe('robots.txt', () => {
3030
).toBe(true)
3131
})
3232

33-
test('disallows indexing of azurecontainer.io domains', async () => {
33+
test('disallows indexing of internal domains', async () => {
3434
const res = await get('/robots.txt', {
3535
headers: {
36-
host: 'docs-internal-preview-12345-asdfz.azurecontainer.io',
36+
host: 'docs-internal.github.com',
3737
},
3838
})
3939
expect(res.body).toEqual('User-agent: *\nDisallow: /')

src/languages/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Periodically, translators read the `content/**` and `data/**` directories from `
2626

2727
## Deployment of translated content
2828

29-
In the deployment workflow, we [checkout](https://github.com/github/docs-internal/blob/a8e52aad1a6b67f41da92d314bd7fd8cd84193a4/.github/workflows/azure-prod-build-deploy.yml#L90-L92) each and every translation repo and put their contents into the `translations/` directory.
29+
During the build step of our deployment, we checkout every translation repo into the `translations/` directory.
3030

3131
The enabled languages and their source directories are interpreted in [`src/languages/lib/languages.js`](https://github.com/github/docs-internal/blob/a8e52aad1a6b67f41da92d314bd7fd8cd84193a4/src/languages/lib/languages.js), which ensures English and translated content are in the same Docker image we deploy.
3232

src/links/scripts/update-developer-site-links.ts

-74
This file was deleted.

src/observability/lib/statsd.js

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export default new StatsD({
2424
// DD_AGENT_HOST and DD_DOGSTATSD_PORT environment variables.
2525
// If undefined, the host will default to 'localhost' and the port
2626
// will default to 8125.
27-
// Azure docker templates configure DD_AGENT_HOST but not DD_DOGSTATSD_PORT.
2827
// Moda configuration defines DD_DOGSTATSD_PORT but not DD_AGENT_HOST.
2928
// For Moda, the host must be set to the Kubernetes node name, which is
3029
// set in KUBE_NODE_HOSTNAME.

src/open-source/README.md

-3
This file was deleted.

src/open-source/scripts/add-pr-links.js

-1
This file was deleted.

src/open-source/scripts/find-unicorn-action-shas.js

-87
This file was deleted.

src/open-source/scripts/pr-link-source.js

-92
This file was deleted.

src/shielding/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ At its root, the `src/shielding/frame/middleware/index.js` is injected into our
2323
Express server. From there, it loads all its individual middleware handlers.
2424

2525
Each middleware is one file that focuses on a single use-case. The
26-
use-cases are borne from studying log files (CDN and Azure App Service) to
26+
use-cases are borne from studying log files to
2727
spot patterns of request abuse.
2828

2929
## Notes
3030

3131
- The best place to do shielding is as close to the client(s) as possible,
32-
i.e. in the CDN or in Azure Frontdoor. Having the code in our own backend
32+
i.e. in the CDN. Having the code in our own backend
3333
has the advantage that it's easier to write custom business logic
3434
along with end-to-end tests.
3535
- Some shielding "tricks" appear in other places throughout the code

src/shielding/middleware/rate-limit.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export function createRateLimiter(max = MAX) {
1919
// 1 minute
2020
windowMs: EXPIRES_IN_AS_SECONDS * 1000,
2121
// limit each IP to X requests per windowMs
22-
// We currently have about 25 instances in production. That's routed
23-
// in Azure to spread the requests to each healthy instance.
22+
// We currently have about 12 instances in production. That's routed
23+
// in Moda to spread the requests to each healthy instance.
2424
// So, the true rate limit, per `windowMs`, is this number multiplied
2525
// by the current number of instances.
2626
max: max,
@@ -32,7 +32,7 @@ export function createRateLimiter(max = MAX) {
3232

3333
keyGenerator: (req) => {
3434
let { ip } = req
35-
// In our Azure preview environment, with the way the proxying works,
35+
// In our previous environments, with the way the proxying works,
3636
// the `x-forwarded-for` is always the origin IP with a port number
3737
// attached. E.g. `75.40.90.27:56675, 169.254.129.1`
3838
// This port number portion changes with every request, so we strip it.

0 commit comments

Comments
 (0)