-
Notifications
You must be signed in to change notification settings - Fork 9
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
improve aws tests #3035
base: main
Are you sure you want to change the base?
improve aws tests #3035
Conversation
i guess it's still in progress? So I converted to draft. If no, please revert 😃 |
This is the full PR. Simply ensuring no periods and other special characters make it into the queue name |
All system tests ci runs within each tracer's CI has been updated to include the new AWS env variables, can we get this merged? |
tests/integrations/utils.py
Outdated
@@ -154,6 +155,22 @@ def get_span_from_agent(weblog_request): | |||
raise ValueError(f"Span is not found for {weblog_request.request.url}") | |||
|
|||
|
|||
# set AWS credentials for runner | |||
os.environ["AWS_ACCESS_KEY_ID"] = os.environ.get("SYSTEM_TESTS_AWS_ACCESS_KEY_ID", "") |
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.
Is there a way to pass those value to the sdk directly ? If it's possible to not hack to much os.environ
, it's better.
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.
Changed this code, the code now just instantiates an AWS client session, and uses the appropriate variables without modifying the user's env.
Ive added info to the AWS authentication error message on how to setup authentication (it uses |
@@ -1120,3 +1115,23 @@ def post_start(self): | |||
|
|||
logger.stdout(f"Library: {self.library}") | |||
logger.stdout(f"Image: {self.image.name}") | |||
|
|||
|
|||
def set_aws_auth_environment(image): |
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.
Make it private to prevent external usage :
def set_aws_auth_environment(image): | |
def _set_aws_auth_environment(image): |
@@ -23,6 +26,18 @@ def _get_unique_id(replay: bool, host_log_folder: str) -> str: | |||
return unique_id | |||
|
|||
|
|||
def _check_aws_variables(scenario: EndToEndScenario): |
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.
Would it be more clean to make this a method of EndToEndScenario
?
class EndToEndScenario:
...
def _check_aws_variables(self):
...
Motivation
Fixes
.
, an illegal queue name characterAWS_REGION
tous-east-1
.SYSTEM_TESTS_[AWS Var name]
INTEGRATIONS
andCROSSED_TRACING_LIBRARIES
suites, and throw an error if the variables are not set. The message provides info on how to authenticate with AWS to run the test suite.Changes
Workflow
codeowners
file quickly.🚀 Once your PR is reviewed, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
[<language>]
, double-check that only<language>
is impacted by the changebuild-XXX-image
label is present