This commit is contained in:
Shreyas Goenka 2025-02-18 17:26:16 +01:00
parent 3cfeb640e1
commit 18748f7879
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
18 changed files with 29 additions and 4 deletions

View File

@ -1,5 +1,6 @@
LocalOnly = true
RecordRequests = true
IncludeRequestHeaders = ["Authorization", "User-Agent"]
[[Repls]]
Old = '17\d{11}'

View File

@ -1,4 +1,12 @@
{
"headers": {
"Authorization": [
"Bearer [DATABRICKS_TOKEN]"
],
"User-Agent": [
"cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS auth/pat"
]
},
"method": "POST",
"path": "/telemetry-ext",
"body": {

View File

@ -1,4 +1,12 @@
{
"headers": {
"Authorization": [
"Bearer [DATABRICKS_TOKEN]"
],
"User-Agent": [
"cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS auth/pat"
]
},
"method": "POST",
"path": "/telemetry-ext",
"body": {

View File

@ -1,4 +1,12 @@
{
"headers": {
"Authorization": [
"Bearer [DATABRICKS_TOKEN]"
],
"User-Agent": [
"cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS auth/pat"
]
},
"method": "POST",
"path": "/telemetry-ext",
"body": {

View File

@ -1,6 +1,8 @@
export DATABRICKS_CLI_TELEMETRY_PID_FILE=./telemetry.pid
export DATABRICKS_CLI_TELEMETRY_UPLOAD_LOGS_FILE=./out.upload_process.txt
# TODO: Move the environment variable calculation to the daemon library.
trace $CLI selftest send-telemetry
echo "waiting for telemetry process to finish"

View File

@ -186,6 +186,8 @@ func workspaceClientOrPrompt(ctx context.Context, cfg *config.Config, allowPromp
return w, err
}
// TODO: Make upload with oauth work.
// TODO: Move env var inheritance to the daemon library.
func MustWorkspaceClient(cmd *cobra.Command, args []string) error {
cfg := &config.Config{}

View File

@ -14,10 +14,6 @@ import (
"github.com/stretchr/testify/require"
)
// TODO: Add flag to allow skipping telemetry.
// TODO: Add verification that the telemetry process uses the correct authentication
// credentials.
func TestTelemetryUploadRetries(t *testing.T) {
server := testserver.New(t)
t.Cleanup(server.Close)