From 7267294f1ab8042024e44ad18512ca27278b1234 Mon Sep 17 00:00:00 2001 From: Michael Bahr Date: Mon, 2 Jun 2025 16:44:26 +0200 Subject: [PATCH 1/6] feat(batches): docs for batch spec library labels --- docs/admin/config/batch_changes.mdx | 44 +++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/docs/admin/config/batch_changes.mdx b/docs/admin/config/batch_changes.mdx index 16ae529d3..d3eb91f57 100644 --- a/docs/admin/config/batch_changes.mdx +++ b/docs/admin/config/batch_changes.mdx @@ -353,20 +353,58 @@ Site admins can manage the library through the GraphQL mutations `createBatchSpe ```graphql createBatchSpecLibraryRecord(name: "example", spec: "version: 2\nname: example") { id + labels } updateBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4", name: "example-2", spec: "version: 2\nname: example-2") { id + labels } -deleteBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4") { - alwaysNil +batchSpecLibrary(first: 100) { + nodes { + id + name + labels + } } +``` -batchSpecLibrary(first: 100) { +### Featured Templates + +Sourcegraph 6.4+ + +Site-admins can mark a template as featured by either clicking the star button next to the list of library records. Featured records will automatically move to a section atop the remaining library records. + +### Labels + +Sourcegraph 6.4+ + +Batch Spec Library records support an optional `labels` field for categorization and filtering. Common labels include: + +- `"featured"` - Marks popular or recommended batch specs that are displayed in a "Featured Templates" section above the remaining examples +- Custom labels for organizational categorization (not exposed to Batch Changes users yet) + +To remove the featured status, you can update the library record with an empty list of labels (`[]`). + +```graphql +createBatchSpecLibraryRecord(name: "example", spec: "version: 2\nname: example", labels: ["featured"]) { + id + labels +} + +updateBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4", name: "example-2", spec: "version: 2\nname: example-2", labels: ["featured"]) { + id + labels +} + +# Query only featured batch specs +batchSpecLibrary(first: 100, labels: ["featured"]) { nodes { id name + labels + spec } } ``` From aee38d38bc625e3bf8872e229ba0d4b6287b9f2d Mon Sep 17 00:00:00 2001 From: Michael Bahr Date: Mon, 2 Jun 2025 18:40:41 +0200 Subject: [PATCH 2/6] smol update --- docs/admin/config/batch_changes.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/admin/config/batch_changes.mdx b/docs/admin/config/batch_changes.mdx index d3eb91f57..92eda3b71 100644 --- a/docs/admin/config/batch_changes.mdx +++ b/docs/admin/config/batch_changes.mdx @@ -353,19 +353,20 @@ Site admins can manage the library through the GraphQL mutations `createBatchSpe ```graphql createBatchSpecLibraryRecord(name: "example", spec: "version: 2\nname: example") { id - labels } updateBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4", name: "example-2", spec: "version: 2\nname: example-2") { id - labels +} + +deleteBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4") { + alwaysNil } batchSpecLibrary(first: 100) { nodes { id name - labels } } ``` From 807eac3f714ae42b3b15d7d9b5419a4132344725 Mon Sep 17 00:00:00 2001 From: Michael Bahr Date: Tue, 3 Jun 2025 16:19:44 +0200 Subject: [PATCH 3/6] add troubleshooting for Own memory crashes --- docs/own/index.mdx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/own/index.mdx b/docs/own/index.mdx index 83b956dde..2cbae92e7 100644 --- a/docs/own/index.mdx +++ b/docs/own/index.mdx @@ -83,6 +83,23 @@ To find all commits between versions `5.0` and `5.1` made by `sourcegraph/own` t Same query can be run for any owner (a person or a team). +## Troubleshooting + +### Memory issues and worker crashes + +The Own background processes (such as ownership signals computation) can consume significant memory, potentially causing worker jobs to crash due to excessive memory usage. If you experience memory problems or worker crashes related to Own: + +1. **Disable ownership signals**: Go to **Site admin > Code graph > Ownership signals** and disable the signals that are causing issues: + - Recent contributors signal + - Recent views signal + - Analytics computation + +2. **Exclude large repositories**: Use the repository filtering options to exclude large repositories from ownership signal computation. + +3. **Monitor resource usage**: Check your instance's memory usage after disabling signals to confirm the issue is resolved. + +If memory issues persist after disabling ownership features, consider whether Own functionality is essential for your use case, as temporarily disabling these features may be preferable to system instability. + ## Further reading In order to learn more please check out our references: From 49ca55c381ec50614815c1752db4792748312466 Mon Sep 17 00:00:00 2001 From: Michael Bahr Date: Tue, 3 Jun 2025 16:21:32 +0200 Subject: [PATCH 4/6] revert batch changes --- docs/admin/config/batch_changes.mdx | 39 ----------------------------- 1 file changed, 39 deletions(-) diff --git a/docs/admin/config/batch_changes.mdx b/docs/admin/config/batch_changes.mdx index 92eda3b71..16ae529d3 100644 --- a/docs/admin/config/batch_changes.mdx +++ b/docs/admin/config/batch_changes.mdx @@ -370,42 +370,3 @@ batchSpecLibrary(first: 100) { } } ``` - -### Featured Templates - -Sourcegraph 6.4+ - -Site-admins can mark a template as featured by either clicking the star button next to the list of library records. Featured records will automatically move to a section atop the remaining library records. - -### Labels - -Sourcegraph 6.4+ - -Batch Spec Library records support an optional `labels` field for categorization and filtering. Common labels include: - -- `"featured"` - Marks popular or recommended batch specs that are displayed in a "Featured Templates" section above the remaining examples -- Custom labels for organizational categorization (not exposed to Batch Changes users yet) - -To remove the featured status, you can update the library record with an empty list of labels (`[]`). - -```graphql -createBatchSpecLibraryRecord(name: "example", spec: "version: 2\nname: example", labels: ["featured"]) { - id - labels -} - -updateBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4", name: "example-2", spec: "version: 2\nname: example-2", labels: ["featured"]) { - id - labels -} - -# Query only featured batch specs -batchSpecLibrary(first: 100, labels: ["featured"]) { - nodes { - id - name - labels - spec - } -} -``` From 00d666761e87ea5f10975a4a93f79e8a080d88bd Mon Sep 17 00:00:00 2001 From: Michael Bahr Date: Tue, 3 Jun 2025 16:22:37 +0200 Subject: [PATCH 5/6] simplify --- .tool-versions | 2 +- docs/own/index.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index fcfaa7659..78114258d 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -nodejs 20.8.1 +nodejs 22 pnpm 8.13.1 diff --git a/docs/own/index.mdx b/docs/own/index.mdx index 2cbae92e7..06d45644a 100644 --- a/docs/own/index.mdx +++ b/docs/own/index.mdx @@ -98,7 +98,7 @@ The Own background processes (such as ownership signals computation) can consume 3. **Monitor resource usage**: Check your instance's memory usage after disabling signals to confirm the issue is resolved. -If memory issues persist after disabling ownership features, consider whether Own functionality is essential for your use case, as temporarily disabling these features may be preferable to system instability. +If memory issues persist after disabling ownership features, consider whether Own functionality is essential for your use case. ## Further reading From c99445c915b1bb122eb870cd1a8a3f78a3db059c Mon Sep 17 00:00:00 2001 From: Michael Bahr Date: Tue, 3 Jun 2025 16:23:09 +0200 Subject: [PATCH 6/6] revert tool version --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 78114258d..fcfaa7659 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -nodejs 22 +nodejs 20.8.1 pnpm 8.13.1