grafana/.vscode/launch.json
Prem Saraswat 196134b0b4
Storage Server: Avoid incorrect parsing of connection string (#85293)
Storage Server: avoid incorrect parsing of connection string

In storage server, a connection string is generated to connect to the
backing database. In case of Postgres, we were generating the string
like `"user=grafana pass= host=postgres.example port=4567"`.

This triggered an edge case in `pq` (the go postgres driver) to parse
`pass` to be equal to `host=postgres.example`, and host being reset to
default value.

Using single quotes in the connection string fixed this.

Signed-off-by: Prem Kumar <prem.saraswat@grafana.com>
2024-05-03 10:54:39 -04:00

82 lines
2.2 KiB
JSON

{
"version": "0.2.0",
"configurations": [
{
"name": "Run Server",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/pkg/cmd/grafana/",
"env": {},
"cwd": "${workspaceFolder}",
"args": ["server", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
},
{
"name": "Run API Server (testdata)",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/pkg/cmd/grafana/",
"env": {},
"cwd": "${workspaceFolder}",
"args": ["apiserver", "--secure-port=8443", "--runtime-config=testdata.datasource.grafana.app/v0alpha1=true"]
},
{
"name": "Run API Server (query-localhost)",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/pkg/cmd/grafana/",
"env": {},
"cwd": "${workspaceFolder}",
"args": [
"apiserver",
"--secure-port=8443",
"--runtime-config=query.grafana.app/v0alpha1=true",
"--grafana.authn.signing-keys-url=http://localhost:3000/api/signing-keys/keys",
"--hg-url=http://localhost:3000",
"--hg-key=$HGAPIKEY"
]
},
{
"name": "Run Storage Server",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/pkg/cmd/grafana/",
"env": {
"GF_DEFAULT_TARGET": "storage-server"
},
"cwd": "${workspaceFolder}",
"args": ["server", "target", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
},
{
"name": "Attach to Chrome",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}"
},
{
"name": "Debug UI test",
"type": "node",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeArgs": ["run", "jest", "--runInBand", "${file}"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"NODE_ENV": "test"
}
},
{
"name": "Debug Go test",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}/${relativeFileDirname}",
"showLog": true
}
]
}