crowdsec/pkg
mmetc 6a6501691a
change behavior of flag disable_http_retry_backoff (#2426)
now it does not attempt any retry, instead of attempting all retries
immediately

example: cannot reach LAPI

Before:

$ CROWDSEC_FEATURE_DISABLE_HTTP_RETRY_BACKOFF=true cscli decisions list
ERRO[27-07-2023 10:44:44] error while performing request: dial tcp [::1]:8080: connect: connection refused; 4 retries left
INFO[27-07-2023 10:44:44] retrying in 0 seconds (attempt 2 of 5)
[...]
ERRO[27-07-2023 10:44:44] error while performing request: dial tcp [::1]:8080: connect: connection refused; 1 retries left
INFO[27-07-2023 10:44:44] retrying in 0 seconds (attempt 5 of 5)
ERRO[27-07-2023 10:44:44] error while performing request: dial tcp [::1]:8080: connect: connection refused; 0 retries left
FATA[27-07-2023 10:44:44] Unable to list decisions : performing request: Get "http://localhost:8080/v1/alerts?has_active_decision=true&include_capi=false&limit=100": could not get jwt token: Post "http://localhost:8080/v1/watchers/login": dial tcp [::1]:8080: connect: connection refused

After:

$ CROWDSEC_FEATURE_DISABLE_HTTP_RETRY_BACKOFF=true ./test/local/bin/cscli decisions list
FATA[11-08-2023 16:49:58] unable to retrieve decisions: performing request: Get "http://127.0.0.1:8080/v1/alerts?has_active_decision=true&include_capi=false&limit=100": could not get jwt token: Post "http://127.0.0.1:8080/v1/watchers/login": dial tcp 127.0.0.1:8080: connect: connection refused
2023-08-16 21:04:07 +02:00
..
acquisition CI: increase test sleep to fix flaky acquisition/file test under win (#2410) 2023-08-08 16:11:32 +02:00
alertcontext types.InSlice() -> slices.Contains() (#2246) 2023-05-31 12:39:22 +02:00
apiclient change behavior of flag disable_http_retry_backoff (#2426) 2023-08-16 21:04:07 +02:00
apiserver apic: minor refactoring (#2415) 2023-08-10 13:03:47 +02:00
cache support for regexps result cache (#2104) 2023-03-08 16:07:49 +01:00
csconfig apic: minor refactoring (#2415) 2023-08-10 13:03:47 +02:00
csplugin update dependency on go-cs-lib; drop the pkg/ part (#2393) 2023-07-28 16:35:08 +02:00
csprofiles fix a confusing debug message (#2386) 2023-07-28 09:52:21 +02:00
cticlient update dependency on go-cs-lib; drop the pkg/ part (#2393) 2023-07-28 16:35:08 +02:00
cwhub replace imports of path with path/filepath (#2330) 2023-07-26 10:29:58 +02:00
cwversion update dependency on go-cs-lib; drop the pkg/ part (#2393) 2023-07-28 16:35:08 +02:00
database Add bouncers prune command (#2379) 2023-07-28 15:37:39 +01:00
exprhelpers Unmarshal Json (#2414) 2023-08-09 09:42:08 +01:00
fflag update dependency on go-cs-lib; drop the pkg/ part (#2393) 2023-07-28 16:35:08 +02:00
hubtest fix the ci by adding the ability to enforce event ordering (#2347) 2023-07-20 11:41:30 +02:00
leakybucket conditional overflow doesn't overflow on capacity (#2412) 2023-08-08 16:12:50 +01:00
longpollclient Add cscli papi status and cscli papi sync (#2091) 2023-03-03 13:46:28 +01:00
metabase update dependency on go-cs-lib; drop the pkg/ part (#2393) 2023-07-28 16:35:08 +02:00
models Polling API Integration (#1715) 2023-01-31 14:47:44 +01:00
modelscapi v3 capi and blocklists links support (#2019) 2023-02-06 14:06:14 +01:00
parser Add method name to child logger so we can see which function is erroring when in enrichers (#2411) 2023-08-08 13:38:11 +01:00
protobufs Add plugin interface code in protobufs package (#921) 2021-08-31 14:40:17 +02:00
setup update dependency on go-cs-lib; drop the pkg/ part (#2393) 2023-07-28 16:35:08 +02:00
time Windows Support (#1159) 2022-05-17 12:14:59 +02:00
types errors.Wrap -> fmt.Errorf (#2317) 2023-06-29 11:34:59 +02:00