Skip to content

Commit

Permalink
not record "tiup __complete" in telemetry and audit log (#1717)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar authored Jan 11, 2022
1 parent 081243e commit 5dc5a4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ func Execute() {
teleReport.InstallationUUID = teleMeta.UUID
} // default to false on errors
}
if teleCommand == "tiup __complete" {
reportEnabled = false
}

if reportEnabled {
teleReport.EventUUID = eventUUID
Expand Down
4 changes: 3 additions & 1 deletion components/cluster/command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ func init() {

tidbSpec = spec.GetSpecManager()
cm = manager.NewManager("tidb", tidbSpec, spec.TiDBComponentVersion, log)
logger.EnableAuditLog(spec.AuditDir())
if cmd.Name() != "__complete" {
logger.EnableAuditLog(spec.AuditDir())
}

// Running in other OS/ARCH Should be fine we only download manifest file.
env, err = tiupmeta.InitEnv(repository.Options{
Expand Down

0 comments on commit 5dc5a4a

Please sign in to comment.