-
Notifications
You must be signed in to change notification settings - Fork 722
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
Criterion integrationv2 python changes #3534
Conversation
5eedca3
to
bcdbcf7
Compare
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.
Just wondering - what caused this to break the sslyze tests? And how does this PR fix it?
Added the diffs from the original PR in the description |
e751161
to
2aef968
Compare
2aef968
to
470defd
Compare
470defd
to
1a776b3
Compare
1800996
to
305fd14
Compare
305fd14
to
3a0b337
Compare
90d21c8
to
ae6d0bf
Compare
tests/integrationv2/providers.py
Outdated
|
||
# Copy the command arguments to an environment variable for the harness to read. |
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.
Why can't the harness accept the arguments as arguments? Is the environment variable necessary?
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.
Was unable to find a way to access the arguments in the handler, the env. variable seemed the cleanest at the time.
Co-authored-by: Lindsay Stewart <[email protected]>
# TODO: Understand the failure with criterion and this endpoint. | ||
if get_flag(S2N_USE_CRITERION) != "off" and 'www.netflix.com' in endpoint: |
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.
I'm a little paranoid that if we get the disabling / default value of this flag wrong, we would always skip netflix. Like if you change "off" to "disable" but forget to update this line. Hardcoded strings are dangerous, particularly if you're only checking "!=".
Can you put CriterionS2N's criterion_off somewhere accessible to this logic, as well as everywhere else you have "off" hardcoded? So they're all guaranteed to use the same value? Or maybe add a "is_criterion_enabled" type method.
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.
Added a choices
option to the pytest arguments to cause pytest to fail if the criterion flag is unexpected and moved the "is it off" logic into a function in global_flags.
-o log_cli=true --log-cli-level=INFO \ | ||
--provider-version={env:S2N_LIBCRYPTO} \ |
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.
Why add log_cli?
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 was helpful for early development, with only one xdist worker and cli-level increased
Co-authored-by: Lindsay Stewart <[email protected]>
@@ -105,6 +105,10 @@ | |||
if get_flag(S2N_FIPS_MODE) is True: | |||
client_options.trust_store = TRUST_STORE_TRUSTED_BUNDLE | |||
|
|||
# TODO: Understand the failure with criterion and this endpoint. | |||
if is_criterion_on() and 'www.netflix.com' in endpoint: |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization
@@ -2,8 +2,10 @@ | |||
import pytest | |||
import subprocess | |||
|
|||
from global_flags import get_flag, is_criterion_on, S2N_USE_CRITERION |
Check notice
Code scanning / CodeQL
Unused import
from configuration import PROTOCOLS | ||
from common import ProviderOptions, Ciphers, pq_enabled | ||
from fixtures import managed_process # lgtm [py/unused-import] | ||
from global_flags import get_flag, S2N_FIPS_MODE | ||
from global_flags import get_flag, is_criterion_on, S2N_FIPS_MODE, S2N_USE_CRITERION |
Check notice
Code scanning / CodeQL
Unused import
Resolved issues:
One of three final PRs for #3130
Description of changes:
Changes to the integrationv2 test frame work to allow an optional criterion benchmark to be inserted into the test, instead of s2nc. The PR for changes to CodeBuild will be in a separate PR.
Delta's from previous PR:
Call-outs:
Testing:
How is this change tested (unit tests, fuzz tests, etc.)? CI
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.