Skip to content

Commit eaeb571

Browse files
authored
Merge branch 'main' into sourcegraph-pricing
2 parents 425059c + 578a3ae commit eaeb571

File tree

8 files changed

+191
-31
lines changed

8 files changed

+191
-31
lines changed

docs/admin/executors/executors_troubleshooting.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,22 @@ Tells us that the Pod cannot be scheduled because the pod affinity rules (`EXECU
242242
configured do not match any nodes.
243243

244244
In this case, the `EXECUTOR_KUBERNETES_POD_AFFINITY` needs to be modified to correctly target the node.
245+
246+
### Executor Job failure issues
247+
248+
If you see below errors for executor jobs:
249+
250+
Codeintel
251+
```Index failed to index: Running command "step.kubernetes.pre-index.0": job sg-executor-job-codeintel-111877 failed: Usage of EmptyDir volume "job-data" exceeds the limit "5Gi".```
252+
253+
Batch Changes
254+
```"step.kubernetes.step.0.pre": job sg-executor-job-batches-91562 failed: Usage of EmptyDir volume "job-data" exceeds the limit "5Gi".```
255+
256+
Update the below variables in the respective executor's deployment file to increase EmptyDir volume "job-data" storage. In this example, ```KUBERNETES_JOB_VOLUME_SIZE``` is set to 20Gi, but you can tweak it as per your requirement.
257+
258+
```
259+
- name: KUBERNETES_JOB_VOLUME_TYPE value: emptyDir
260+
- name: KUBERNETES_JOB_VOLUME_SIZE value: 20Gi
261+
```
262+
263+
```KUBERNETES_JOB_VOLUME_TYPE``` can be either set to ```emptyDir``` or ```pvc``` and if it’s not set, the default is ```emptyDir```
File renamed without changes.

docs/releases.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Currently supported versions of Sourcegraph:
1212

1313
| **Release** | **General Availability Date** | **Supported** | **Release Notes** | **Install** |
1414
|--------------|-------------------------------|---------------|--------------------------------------------------------------------|------------------------------------------------------|
15+
| 5.11 Patch 4 | January 2025 || [Notes](https://sourcegraph.com/docs/technical-changelog#v5114013) | [Install](https://sourcegraph.com/docs/admin/deploy) |
1516
| 5.11 Patch 3 | January 2025 || [Notes](https://sourcegraph.com/docs/technical-changelog#v5114013) | [Install](https://sourcegraph.com/docs/admin/deploy) |
1617
| 5.11 Patch 2 | January 2025 || [Notes](https://sourcegraph.com/docs/technical-changelog#v5113601) | [Install](https://sourcegraph.com/docs/admin/deploy) |
1718
| 5.11 Patch 1 | January 2025 || [Notes](https://sourcegraph.com/docs/technical-changelog#v5112732) | [Install](https://sourcegraph.com/docs/admin/deploy) |

docs/technical-changelog.mdx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,44 @@ This page documents all notable changes to Sourcegraph. For more detailed change
44

55
{/* CHANGELOG_START */}
66

7+
# 5.11 Patch 4
8+
9+
## v5.11.5234
10+
11+
- [sourcegraph](https://github.com/sourcegraph/sourcegraph/releases/tag/v5.11.5234)
12+
13+
- [docker-compose](https://github.com/sourcegraph/deploy-sourcegraph-docker/releases/tag/v5.11.5234)
14+
15+
- [helm](https://github.com/sourcegraph/deploy-sourcegraph-helm/releases/tag/v5.11.5234)
16+
17+
- [kustomize](https://github.com/sourcegraph/deploy-sourcegraph-k8s/releases/tag/v5.11.5234)
18+
19+
### Features
20+
21+
#### Perforce
22+
23+
- Use depot name for label cache `(PR #2805)`
24+
25+
### Fix
26+
27+
#### Source
28+
29+
- Possible Perforce changelists are now converted to their respective git commit during ResolveRevision `(PR #2825)`
30+
31+
### Reverts
32+
33+
There were no reverts for this release
34+
35+
### Uncategorized
36+
37+
#### Others
38+
39+
- [Manual Backport]: update shellcheck to 0.10.0 `(PR #2838)`
40+
- NA
41+
42+
{/* RSS={"version":"v5.11.5234", "releasedAt": "2025-01-17"} */}
43+
44+
745
# 5.11 Patch 3
846

947
## v5.11.4013

next.config.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,36 @@ const nextConfig = {
1414
// https://vercel.com/docs/projects/environment-variables/system-environment-variables
1515
// basePath: process.env.VERCEL_ENV === 'production' ? '/docs' : '',
1616
basePath: '/docs',
17-
async redirects() {
18-
return [
19-
...updatedRedirectsData,
20-
{
21-
source: `/v/${config.DOCS_LATEST_VERSION}/:slug*`,
22-
destination: `https://sourcegraph.com/docs/:slug*`,
23-
permanent: false
24-
},
25-
{
26-
source: `/@${config.DOCS_LATEST_VERSION}/:slug*`,
27-
destination: `https://sourcegraph.com/docs/:slug*`,
28-
permanent: false
29-
},
30-
{
31-
source: '/v/:version(\\d+\\.\\d+)/:slug*',
32-
destination: 'https://:version.sourcegraph.com/:slug*',
33-
permanent: true
34-
},
35-
{
36-
source: '/@:version(\\d+\\.\\d+)/:slug*',
37-
destination: 'https://:version.sourcegraph.com/:slug*',
38-
permanent: true
39-
},
40-
{
41-
source: '/changelog.rss',
42-
destination: '/technical-changelog.rss',
43-
permanent: true
44-
}
45-
];
46-
}
17+
// async redirects() {
18+
// return [
19+
// ...updatedRedirectsData,
20+
// {
21+
// source: `/v/${config.DOCS_LATEST_VERSION}/:slug*`,
22+
// destination: `https://sourcegraph.com/docs/:slug*`,
23+
// permanent: false
24+
// },
25+
// {
26+
// source: `/@${config.DOCS_LATEST_VERSION}/:slug*`,
27+
// destination: `https://sourcegraph.com/docs/:slug*`,
28+
// permanent: false
29+
// },
30+
// {
31+
// source: '/v/:version(\\d+\\.\\d+)/:slug*',
32+
// destination: 'https://:version.sourcegraph.com/:slug*',
33+
// permanent: true
34+
// },
35+
// {
36+
// source: '/@:version(\\d+\\.\\d+)/:slug*',
37+
// destination: 'https://:version.sourcegraph.com/:slug*',
38+
// permanent: true
39+
// },
40+
// {
41+
// source: '/changelog.rss',
42+
// destination: '/technical-changelog.rss',
43+
// permanent: true
44+
// }
45+
// ];
46+
// }
4747
};
4848

4949
module.exports = async () => {

src/data/navigation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const navigation: NavigationItem[] = [
5555
subsections: [
5656
{ title: "Chat", href: "/cody/capabilities/chat", },
5757
{ title: "Autocomplete", href: "/cody/capabilities/autocomplete", },
58-
{ title: "Prompts", href: "/cody/capabilities/commands", },
58+
{ title: "Prompts", href: "/cody/capabilities/prompts", },
5959
{ title: "OpenCtx", href: "/cody/capabilities/openctx", },
6060
{ title: "Debug Code", href: "/cody/capabilities/debug-code", },
6161
{ title: "Context Filters", href: "/cody/capabilities/ignore-context", },

src/data/redirects.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6717,6 +6717,20 @@ const redirectsData = [
67176717
destination: "/code-search/code-navigation/inference_configuration",
67186718
permanent: true
67196719
},
6720+
// Model Config docs
6721+
{
6722+
source: "/cody/clients/model-configuration",
6723+
destination: "/cody/enterprise/model-configuration",
6724+
permanent: true
6725+
},
6726+
6727+
//Commands redirects
6728+
{
6729+
source: "/cody/capabilities/commands",
6730+
destination: "/cody/capabilities/prompts",
6731+
permanent: true
6732+
},
6733+
67206734

67216735
];
67226736

src/middleware.ts

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import { NextResponse } from 'next/server'
2+
import type { NextRequest } from 'next/server'
3+
import docsConfig from '../docs.config.js'
4+
5+
const { updatedRedirectsData } = require('./data/redirects.ts');
6+
7+
function createRedirectUrl(request: NextRequest, destination: string, path: string): string {
8+
// Handle absolute URLs
9+
if (destination.startsWith('http')) {
10+
// Handle dynamic slug replacements
11+
if (destination.includes(':slug')) {
12+
const slugMatch = path.match(/[^/]+$/)
13+
const slug = slugMatch ? slugMatch[0] : ''
14+
destination = destination.replace(':slug*', slug)
15+
}
16+
// Handle version replacements
17+
if (destination.includes(':version')) {
18+
const versionMatch = path.match(/\d+\.\d+/)
19+
const version = versionMatch ? versionMatch[0] : ''
20+
destination = destination.replace(':version', version)
21+
}
22+
23+
return destination
24+
}
25+
26+
// Handle relative paths
27+
const basePath = '/docs'
28+
return destination.startsWith('/') ?
29+
`${request.nextUrl.origin}${basePath}${destination}` :
30+
`${request.nextUrl.origin}${basePath}/${destination}`
31+
}
32+
33+
export function middleware(request: NextRequest) {
34+
const path = request.nextUrl.pathname
35+
const pathWithoutBase = path.replace('/docs', '')
36+
37+
// Handle base redirects from redirects.ts
38+
const redirect = updatedRedirectsData.find((r: any) => r.source === pathWithoutBase)
39+
if (redirect) {
40+
return NextResponse.redirect(createRedirectUrl(request, redirect.destination, path))
41+
}
42+
// Handle version without slug
43+
const versionOnlyMatch = pathWithoutBase.match(/^\/v\/(\d+\.\d+)$/)
44+
if (versionOnlyMatch) {
45+
return NextResponse.redirect(`https://${versionOnlyMatch[1]}.sourcegraph.com/`)
46+
}
47+
// Handle version-specific redirects
48+
if (pathWithoutBase.startsWith(`/v/${docsConfig.DOCS_LATEST_VERSION}/`)) {
49+
return NextResponse.redirect(createRedirectUrl(
50+
request,
51+
`https://sourcegraph.com/docs/:slug*`,
52+
pathWithoutBase
53+
))
54+
}
55+
if (pathWithoutBase.startsWith(`/@${docsConfig.DOCS_LATEST_VERSION}/`)) {
56+
return NextResponse.redirect(createRedirectUrl(
57+
request,
58+
`https://sourcegraph.com/docs/:slug*`,
59+
pathWithoutBase
60+
))
61+
}
62+
const versionMatch = pathWithoutBase.match(/^\/v\/(\d+\.\d+)\/(.*)/)
63+
if (versionMatch) {
64+
return NextResponse.redirect(createRedirectUrl(
65+
request,
66+
'https://:version.sourcegraph.com/:slug*',
67+
pathWithoutBase
68+
))
69+
}
70+
const atVersionMatch = pathWithoutBase.match(/^\/@(\d+\.\d+)\/(.*)/)
71+
if (atVersionMatch) {
72+
return NextResponse.redirect(createRedirectUrl(
73+
request,
74+
'https://:version.sourcegraph.com/:slug*',
75+
pathWithoutBase
76+
))
77+
}
78+
if (pathWithoutBase === '/changelog.rss')
79+
return NextResponse.redirect(createRedirectUrl(request, '/technical-changelog.rss', path))
80+
81+
return NextResponse.next()
82+
}
83+
84+
export const config = {
85+
matcher: [
86+
'/((?!api|_next/static|_next/image|assets|favicon.ico|sw.js).*)',
87+
],
88+
}

0 commit comments

Comments
 (0)