-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cisco_duo.auth: Provide option to ignore ingesting API Errors. #12870
Conversation
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
🚀 Benchmarks reportPackage
|
Data stream | Previous EPS | New EPS | Diff (%) | Result |
---|---|---|---|---|
auth |
3322.26 | 2141.33 | -1180.93 (-35.55%) | 💔 |
offline_enrollment |
31250 | 17857.14 | -13392.86 (-42.86%) | 💔 |
summary |
55555.56 | 27777.78 | -27777.78 (-50%) | 💔 |
telephony |
58823.53 | 32258.06 | -26565.47 (-45.16%) | 💔 |
telephony_v2 |
45454.55 | 14705.88 | -30748.67 (-67.65%) | 💔 |
To see the full report comment with /test benchmark fullreport
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor query only, otherwise LGTM
@@ -107,23 +108,36 @@ program: | | |||
|
|||
) | |||
: | |||
bytes(resp.Body).decode_json().as(body, | |||
resp.StatusCode == 429 && (state.ignore_api_errors == "true") ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does state.ignore_api_errors
not get interpreted as a boolean by YAML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it seems like without the quote, I get this error inside system tests:
Unit state changed cel-default-cel-cisco_duo-a76f1110-a53c-4c59-bf68-fec5bf59b33f (STARTING->FAILED): failed to check program: failed compilation: ERROR: <input>:76:64: found no matching overload for '_==_' applied to '(string, bool)'\n | resp.StatusCode == 429 && (state.ignore_api_errors == true) ?\n | ...............................................................^ accessing config
I defined ignore_api_errors
as boolean inside manifest.yml
but still the program considers it as string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be worth doing the converse conversion, bool(state.ignore_api_errors)
in order to catch "ture" and similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in c3f9c49
Convert string option to bool.
@@ -107,23 +108,36 @@ program: | | |||
|
|||
) | |||
: | |||
bytes(resp.Body).decode_json().as(body, | |||
resp.StatusCode == 429 && (bool(state.ignore_api_errors) == true) ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resp.StatusCode == 429 && (bool(state.ignore_api_errors) == true) ? | |
resp.StatusCode == 429 && bool(state.ignore_api_errors) ? |
Here, otherwise madness lies.
resp.StatusCode == 429 && (…((bool(state.ignore_api_errors) == true) == true) = true) …) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching. Done in 6fff53b
💚 Build Succeeded
History
cc @kcreddy |
|
Package cisco_duo - 2.4.0 containing this change is available at https://epr.elastic.co/package/cisco_duo/2.4.0/ |
Proposed commit message
Checklist
changelog.yml
file.Author's Checklist
How to test this PR locally
System tests pass for
auth
data-stream: