File tree 5 files changed +19
-12
lines changed
test/App/Fossa/Configuration
5 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 1
1
# FOSSA CLI Changelog
2
2
3
+ ## v3.3.0
4
+ - Telemetry: CLI collects telemetry by default. ([ #936 ] ( https://github.com/fossas/fossa-cli/pull/936 ) )
5
+
6
+ Read more about telemetry: https://github.com/fossas/fossa-cli/blob/master/docs/telemetry.md . To opt-out of telemetry, provide ` FOSSA_TELEMETRY_SCOPE ` environment variable with value of: ` off ` in your shell prior to running fossa.
7
+
3
8
## v3.2.17
4
9
- Archive upload: Fix a bug when trying to tar to a filename that already exists. ([ #927 ] ( https://github.com/fossas/fossa-cli/pull/927 ) )
5
10
- Npm: Supports lockfile v3. ([ #932 ] ( https://github.com/fossas/fossa-cli/pull/932 ) )
Original file line number Diff line number Diff line change @@ -83,19 +83,18 @@ Write-Host "Notice"
83
83
Write-Host " ------"
84
84
Write-Host " "
85
85
Write-Host " FOSSA collects warnings, errors, and usage data to improve"
86
- Write-Host " the FOSSA CLI and your experience. The CLI DOES NOT collect"
87
- Write-Host " telemetry by default, but this will change in future!"
86
+ Write-Host " the FOSSA CLI and your experience."
87
+ Write-Host " "
88
+ Write-Host " Read more: https://github.com/fossas/fossa-cli/blob/master/docs/telemetry.md"
88
89
Write-Host " "
89
90
Write-Host " If you want to prevent any telemetry data from being sent to"
90
- Write-Host " the server when a future version of fossa-cli enables telemetry"
91
- Write-Host " by default, you can pre-emptively opt out of telemetry by setting"
91
+ Write-Host " the server, you can opt out of telemetry by setting"
92
92
Write-Host " FOSSA_TELEMETRY_SCOPE environment variable to 'off' in your shell."
93
93
Write-Host " "
94
94
Write-Host " For example:"
95
95
Write-Host " `$ env:FOSSA_TELEMETRY_SCOPE=off"
96
96
Write-Host " fossa analyze"
97
97
Write-Host " "
98
- Write-Host " Read more: https://github.com/fossas/fossa-cli/blob/master/docs/telemetry.md"
99
98
Write-Host " "
100
99
Write-Host " Get started by running: fossa.exe --help"
101
100
Write-Host " Running fossa.exe --version"
Original file line number Diff line number Diff line change @@ -382,18 +382,17 @@ print_telemetry_disclaimer() {
382
382
log_info " ------"
383
383
log_info " "
384
384
log_info " FOSSA collects warnings, errors, and usage data to improve"
385
- log_info " the FOSSA CLI and your experience. The CLI DOES NOT collect"
386
- log_info " telemetry by default, but this will change in future!"
385
+ log_info " the FOSSA CLI and your experience."
386
+ log_info " "
387
+ log_info " Read more: https://github.com/fossas/fossa-cli/blob/master/docs/telemetry.md"
387
388
log_info " "
388
389
log_info " If you want to prevent any telemetry data from being sent to"
389
- log_info " the server when a future version of fossa-cli enables telemetry"
390
- log_info " by default, you can pre-emptively opt out of telemetry by setting"
390
+ log_info " the server, you can opt out of telemetry by setting"
391
391
log_info " FOSSA_TELEMETRY_SCOPE environment variable to 'off' in your shell."
392
392
log_info " "
393
393
log_info " For example:"
394
394
log_info " FOSSA_TELEMETRY_SCOPE=off fossa analyze"
395
395
log_info " "
396
- log_info " Read more: https://github.com/fossas/fossa-cli/blob/master/docs/telemetry.md"
397
396
log_info " "
398
397
}
399
398
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ collectAPIMetadata cfgfile cliMeta = maybe cliMeta (mergeFileCmdMetadata cliMeta
272
272
273
273
collectTelemetrySink :: (Has (Lift IO ) sig m , Has Diagnostics sig m ) => Maybe ConfigFile -> EnvVars -> Maybe CommonOpts -> m (Maybe TelemetrySink )
274
274
collectTelemetrySink maybeConfigFile envvars maybeOpts = do
275
- let defaultScope = NoTelemetry
275
+ let defaultScope = FullTelemetry
276
276
-- Precedence is
277
277
-- (1) command line
278
278
-- (2) environment variable
Original file line number Diff line number Diff line change @@ -78,10 +78,14 @@ spec :: Spec
78
78
spec = do
79
79
describe " telemetry configuration" $ do
80
80
-- This needs to be updated when default telemetry model moves to opt-out.
81
- it' " by default telemetry sink is nothing" $ do
81
+ it' " by default telemetry sink set to nothing, if api key is not provided " $ do
82
82
sink <- collectTelemetrySink noConfig defaultEnvVars noOpts
83
83
sink `shouldBe'` Nothing
84
84
85
+ it' " by default telemetry sink set to full telemetry" $ do
86
+ sink <- collectTelemetrySink noConfig defaultEnvVars (Just defaultCommonOpts{optAPIKey = Just mockApiKeyRaw})
87
+ sink `shouldBe'` Just (TelemetrySinkToEndpoint (ApiOpts Nothing mockApiKey defaultApiPollDelay))
88
+
85
89
describe " command opts" $ do
86
90
it' " should set sink to nothing, when off scope is provided via command opts" $ do
87
91
sink <-
You can’t perform that action at this time.
0 commit comments