Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-23.1: cli: add system.job_info to debug zip #101232

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/cli/testdata/zip/partial1
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null
[cluster] retrieving SQL data for system.descriptor... writing output: debug/system.descriptor.txt... done
[cluster] retrieving SQL data for system.eventlog... writing output: debug/system.eventlog.txt... done
[cluster] retrieving SQL data for system.external_connections... writing output: debug/system.external_connections.txt... done
[cluster] retrieving SQL data for system.job_info... writing output: debug/system.job_info.txt... done
[cluster] retrieving SQL data for system.jobs... writing output: debug/system.jobs.txt... done
[cluster] retrieving SQL data for system.lease... writing output: debug/system.lease.txt... done
[cluster] retrieving SQL data for system.locations... writing output: debug/system.locations.txt... done
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/testdata/zip/partial1_excluded
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ debug zip /dev/null --concurrency=1 --exclude-nodes=2 --cpu-profile-duration=0
[cluster] retrieving SQL data for system.descriptor... writing output: debug/system.descriptor.txt... done
[cluster] retrieving SQL data for system.eventlog... writing output: debug/system.eventlog.txt... done
[cluster] retrieving SQL data for system.external_connections... writing output: debug/system.external_connections.txt... done
[cluster] retrieving SQL data for system.job_info... writing output: debug/system.job_info.txt... done
[cluster] retrieving SQL data for system.jobs... writing output: debug/system.jobs.txt... done
[cluster] retrieving SQL data for system.lease... writing output: debug/system.lease.txt... done
[cluster] retrieving SQL data for system.locations... writing output: debug/system.locations.txt... done
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/testdata/zip/partial2
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0 /dev/null
[cluster] retrieving SQL data for system.descriptor... writing output: debug/system.descriptor.txt... done
[cluster] retrieving SQL data for system.eventlog... writing output: debug/system.eventlog.txt... done
[cluster] retrieving SQL data for system.external_connections... writing output: debug/system.external_connections.txt... done
[cluster] retrieving SQL data for system.job_info... writing output: debug/system.job_info.txt... done
[cluster] retrieving SQL data for system.jobs... writing output: debug/system.jobs.txt... done
[cluster] retrieving SQL data for system.lease... writing output: debug/system.lease.txt... done
[cluster] retrieving SQL data for system.locations... writing output: debug/system.locations.txt... done
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/testdata/zip/testzip
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ debug zip --concurrency=1 --cpu-profile-duration=1s /dev/null
[cluster] retrieving SQL data for system.descriptor... writing output: debug/system.descriptor.txt... done
[cluster] retrieving SQL data for system.eventlog... writing output: debug/system.eventlog.txt... done
[cluster] retrieving SQL data for system.external_connections... writing output: debug/system.external_connections.txt... done
[cluster] retrieving SQL data for system.job_info... writing output: debug/system.job_info.txt... done
[cluster] retrieving SQL data for system.jobs... writing output: debug/system.jobs.txt... done
[cluster] retrieving SQL data for system.lease... writing output: debug/system.lease.txt... done
[cluster] retrieving SQL data for system.locations... writing output: debug/system.locations.txt... done
Expand Down
3 changes: 3 additions & 0 deletions pkg/cli/testdata/zip/testzip_concurrent
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ zip
[cluster] retrieving SQL data for system.external_connections...
[cluster] retrieving SQL data for system.external_connections: done
[cluster] retrieving SQL data for system.external_connections: writing output: debug/system.external_connections.txt...
[cluster] retrieving SQL data for system.job_info...
[cluster] retrieving SQL data for system.job_info: done
[cluster] retrieving SQL data for system.job_info: writing output: debug/system.job_info.txt...
[cluster] retrieving SQL data for system.jobs...
[cluster] retrieving SQL data for system.jobs: done
[cluster] retrieving SQL data for system.jobs: writing output: debug/system.jobs.txt...
Expand Down
2 changes: 2 additions & 0 deletions pkg/cli/testdata/zip/testzip_shared_process_tenant
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ debug zip --concurrency=1 --cpu-profile-duration=1s /dev/null
[cluster] retrieving SQL data for system.descriptor... writing output: debug/system.descriptor.txt... done
[cluster] retrieving SQL data for system.eventlog... writing output: debug/system.eventlog.txt... done
[cluster] retrieving SQL data for system.external_connections... writing output: debug/system.external_connections.txt... done
[cluster] retrieving SQL data for system.job_info... writing output: debug/system.job_info.txt... done
[cluster] retrieving SQL data for system.jobs... writing output: debug/system.jobs.txt... done
[cluster] retrieving SQL data for system.lease... writing output: debug/system.lease.txt... done
[cluster] retrieving SQL data for system.locations... writing output: debug/system.locations.txt... done
Expand Down Expand Up @@ -231,6 +232,7 @@ debug zip --concurrency=1 --cpu-profile-duration=1s /dev/null
[cluster] retrieving SQL data for system.descriptor... writing output: debug/tenants/test-tenant/system.descriptor.txt... done
[cluster] retrieving SQL data for system.eventlog... writing output: debug/tenants/test-tenant/system.eventlog.txt... done
[cluster] retrieving SQL data for system.external_connections... writing output: debug/tenants/test-tenant/system.external_connections.txt... done
[cluster] retrieving SQL data for system.job_info... writing output: debug/tenants/test-tenant/system.job_info.txt... done
[cluster] retrieving SQL data for system.jobs... writing output: debug/tenants/test-tenant/system.jobs.txt... done
[cluster] retrieving SQL data for system.lease... writing output: debug/tenants/test-tenant/system.lease.txt... done
[cluster] retrieving SQL data for system.locations... writing output: debug/tenants/test-tenant/system.locations.txt... done
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/testdata/zip/testzip_tenant_separate_process
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ debug zip --concurrency=1 --cpu-profile-duration=1s /dev/null
[cluster] retrieving SQL data for system.descriptor... writing output: debug/system.descriptor.txt... done
[cluster] retrieving SQL data for system.eventlog... writing output: debug/system.eventlog.txt... done
[cluster] retrieving SQL data for system.external_connections... writing output: debug/system.external_connections.txt... done
[cluster] retrieving SQL data for system.job_info... writing output: debug/system.job_info.txt... done
[cluster] retrieving SQL data for system.jobs... writing output: debug/system.jobs.txt... done
[cluster] retrieving SQL data for system.lease... writing output: debug/system.lease.txt... done
[cluster] retrieving SQL data for system.locations... writing output: debug/system.locations.txt... done
Expand Down
12 changes: 12 additions & 0 deletions pkg/cli/zip_table_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,18 @@ var zipSystemTables = DebugZipTableRegistry{
to_hex(progress) AS hex_progress
FROM system.jobs`,
},
"system.job_info": {
// `value` column may contain customer info, such as URI params
// containing access keys, encryption salts, etc.
customQueryUnredacted: `SELECT *,
to_hex(value) AS hex_value
FROM system.job_info`,
customQueryRedacted: `SELECT job_id,
info_key,
written,
'redacted' AS value
FROM system.job_info`,
},
"system.lease": {
nonSensitiveCols: NonSensitiveColumns{
`"descID"`,
Expand Down