cockroachdb / cockroachdb/cockroach

Output from "cockroach debug doctor recreate" needs to set allow_unsafe_internals to true.

Open Beginner friendly
#172,051 1 comment 0 reactions 0 assignees View on GitHub
C-bug O-support
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

The output of `cockroach debug doctor recreate` creates a SQL file that could be uploaded to a cluster to recreate objects based on a debug zip.

However, since the introduce of the `allow_unsafe_internals` session variable, the file errors when it's sent to a cluster. The session variable has to be overridden manually at the top of the file now.

**Expected behavior**
Add a `SET allow_unsafe_internals = true;` to the top of the file generated by `cockroach debug doctor recreate`.

Jira issue: CRDB-65191

Contributor guide

Open the contributing guide

Research direction

Start by locating the cockroach debug doctor recreate command and the code that assembles its generated SQL file. Run the recreation workflow to inspect the output; done means the file begins with SET allow_unsafe_internals = true; so it can be uploaded without a manual edit.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
cli, databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.