Skip to content
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

load-test: fix failing tests due to role session timeout, clean up code #676

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

PettitWesley
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@PettitWesley PettitWesley requested a review from a team as a code owner June 8, 2023 19:29
@@ -52,21 +52,13 @@ phases:
- python -m venv venv
- source venv/bin/activate
- pip install -r ./load_tests/requirements.txt
# AWS configure sts temp credentials
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may wonder, why did he remove this? Is this safe?

In load tests, everything runs via the python script, and as you can see in the other code changes, that code assumes the LOAD_TEST_CFN_ROLE_ARN role itself. This means we were previously unnecessarily chaining sessions (buildspec assumes the role, then the python uses that role to assume the same role).

Comment on lines +226 to +227
# wait for tasks and validate
for input_logger in INPUT_LOGGERS:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should speed up the tests slightly. If you read the lines above and below here, we first start the tasks for each input (tcp vs stdout) and then validate... but each of our tests uses a unique resource (log stream, firehose, kinesis, etc) for each test... so there's no reason why we can't start all of them first and then loop over them and check for results.

Copy link
Contributor

@zwj102030 zwj102030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No concern.

Comment on lines 200 to 205
session = get_sts_boto_session()

client = session.client('ecs')
waiter = client.get_waiter('tasks_stopped')

processes = []

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we till need this for loop after logic change? I don't understand what's the work for this for-loop.
At least should we remove processes = [] out of the for loop?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh you're right, thanks, processes needs to move to below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This for loop runs the tasks, then 2nd one validates.

PettitWesley added a commit to PettitWesley/aws-for-fluent-bit that referenced this pull request Jun 8, 2023
Signed-off-by: Wesley Pettit <[email protected]>
PettitWesley added a commit to PettitWesley/aws-for-fluent-bit that referenced this pull request Jun 8, 2023
Signed-off-by: Wesley Pettit <[email protected]>
PettitWesley added a commit that referenced this pull request Jun 8, 2023
Signed-off-by: Wesley Pettit <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants