Skip to content

Commit

Permalink
Report usages of the deprecated 'ext.loadimpact' option (#4084)
Browse files Browse the repository at this point in the history
* Report usages of the deprecated 'ext.loadimpact' option

* Align the report with existing keys

---------

Co-authored-by: Oleg Bespalov <[email protected]>
  • Loading branch information
joanlopez and olegbespalov authored Dec 16, 2024
1 parent ecabc88 commit 053f3a2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/test_load.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,19 @@ func loadSystemCertPool(logger logrus.FieldLogger) {
func (lct *loadedAndConfiguredTest) buildTestRunState(
configToReinject lib.Options,
) (*lib.TestRunState, error) {
// This might be the full derived or just the consodlidated options
// This might be the full derived or just the consolidated options
if err := lct.initRunner.SetOptions(configToReinject); err != nil {
return nil, err
}

// Here, where we get the consolidated options, is where we check if any
// of the deprecated options is being used, and we report it.
if _, isPresent := configToReinject.External["loadimpact"]; isPresent {
if err := lct.preInitState.Usage.Uint64("deprecations/options.ext.loadimpact", 1); err != nil {
return nil, err
}
}

// it pre-loads system certificates to avoid doing it on the first TLS request.
// This is done async to avoid blocking the rest of the loading process as it will not stop if it fails.
go loadSystemCertPool(lct.preInitState.Logger)
Expand Down

0 comments on commit 053f3a2

Please sign in to comment.