diff --git a/artifactory/commands/transferfiles/transfer.go b/artifactory/commands/transferfiles/transfer.go index f303c1ca9..31b3f77a8 100644 --- a/artifactory/commands/transferfiles/transfer.go +++ b/artifactory/commands/transferfiles/transfer.go @@ -289,7 +289,7 @@ func (tdc *TransferFilesCommand) reportTransferFilesUsage() { AttributeValue: sourceStorageInfo.BinariesSize, }, } - if err = usage.NewArtifactoryCallHome().SendUsage(coreutils.GetCliUserAgent(), tdc.CommandName(), tdc.targetStorageInfoManager.GetServiceManager(), reportUsageAttributes...); err != nil { + if err = usage.NewArtifactoryCallHome().Send(coreutils.GetCliUserAgent(), tdc.CommandName(), tdc.targetStorageInfoManager.GetServiceManager(), reportUsageAttributes...); err != nil { log.Debug(err.Error()) } } diff --git a/common/commands/command.go b/common/commands/command.go index 56cebcd56..6f865173e 100644 --- a/common/commands/command.go +++ b/common/commands/command.go @@ -50,7 +50,7 @@ func reportUsage(command Command, channel chan<- bool) { serverDetails, err := command.ServerDetails() if err != nil { - log.Debug("Usage reporting:", err.Error()) + log.Debug("Usage reporting. Failed accessing ServerDetails.", err.Error()) return } if serverDetails == nil || serverDetails.ArtifactoryUrl == "" { @@ -58,12 +58,12 @@ func reportUsage(command Command, channel chan<- bool) { } serviceManager, err := utils.CreateServiceManager(serverDetails, -1, 0, false) if err != nil { - log.Debug("Usage reporting:", err.Error()) + log.Debug("Usage reporting. Failed creating the Artifactory Service Manager.", err.Error()) return } ArtifactoryVersion, err := serviceManager.GetVersion() if err != nil { - log.Debug("Usage reporting:", err.Error()) + log.Debug("Usage reporting. Failed getting the Artifactory", err.Error()) return } @@ -99,7 +99,7 @@ func reportUsageToVisibilitySystem(command Command, serverDetails *config.Server func reportUsageToArtifactoryCallHome(command Command, serviceManager rtClient.ArtifactoryServicesManager) { log.Debug(usageReporter.ArtifactoryCallHomePrefix, "Sending info...") - if err := usage.NewArtifactoryCallHome().SendUsage(coreutils.GetCliUserAgent(), command.CommandName(), serviceManager); err != nil { + if err := usage.NewArtifactoryCallHome().Send(coreutils.GetCliUserAgent(), command.CommandName(), serviceManager); err != nil { log.Debug(err.Error()) } } diff --git a/go.mod b/go.mod index 01ee183f8..fa3fee0a9 100644 --- a/go.mod +++ b/go.mod @@ -96,7 +96,7 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect ) -replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20241223175448-88f1089d0694 +replace github.com/jfrog/jfrog-client-go => github.com/eyalbe4/jfrog-client-go v1.28.1-0.20241225095445-ce46100f95eb // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20241121100855-e7a75ceee2bd diff --git a/go.sum b/go.sum index be2367cd0..20f520a45 100644 --- a/go.sum +++ b/go.sum @@ -51,6 +51,8 @@ github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcej github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/eyalbe4/jfrog-client-go v1.28.1-0.20241225095445-ce46100f95eb h1:DgmqzmU62LwBjuQdduH2iobx4QatkvEV3DFDxfPLvZE= +github.com/eyalbe4/jfrog-client-go v1.28.1-0.20241225095445-ce46100f95eb/go.mod h1:2ySOMva54L3EYYIlCBYBTcTgqfrrQ19gtpA/MWfA/ec= github.com/forPelevin/gomoji v1.2.0 h1:9k4WVSSkE1ARO/BWywxgEUBvR/jMnao6EZzrql5nxJ8= github.com/forPelevin/gomoji v1.2.0/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -93,8 +95,6 @@ github.com/jfrog/build-info-go v1.10.7 h1:10NVHYg0193gJpQft+S4WQfvYMtj5jlwwhJRvk github.com/jfrog/build-info-go v1.10.7/go.mod h1:JcISnovFXKx3wWf3p1fcMmlPdt6adxScXvoJN4WXqIE= github.com/jfrog/gofrog v1.7.6 h1:QmfAiRzVyaI7JYGsB7cxfAJePAZTzFz0gRWZSE27c6s= github.com/jfrog/gofrog v1.7.6/go.mod h1:ntr1txqNOZtHplmaNd7rS4f8jpA5Apx8em70oYEe7+4= -github.com/jfrog/jfrog-client-go v1.28.1-0.20241223175448-88f1089d0694 h1:1EP8yAhB+SGTXhfGa/w4S748S12qJKXU4u/yiAJxnX0= -github.com/jfrog/jfrog-client-go v1.28.1-0.20241223175448-88f1089d0694/go.mod h1:2ySOMva54L3EYYIlCBYBTcTgqfrrQ19gtpA/MWfA/ec= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= diff --git a/utils/usage/usage.go b/utils/usage/usage.go index b73cfd2b4..6834b63d3 100644 --- a/utils/usage/usage.go +++ b/utils/usage/usage.go @@ -169,7 +169,7 @@ func (ur *UsageReporter) reportToArtifactory(features ...ReportFeature) (err err if err != nil { return } - return usage.NewArtifactoryCallHome().SendUsageToArtifactory(ur.ProductId, serviceManager, converted...) + return usage.NewArtifactoryCallHome().SendToArtifactory(ur.ProductId, serviceManager, converted...) } func convertAttributesToMap(reportFeature ReportFeature) (converted map[string]string) {