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

Speed up CodeBuild CI #1426

Merged
merged 2 commits into from
Feb 8, 2024
Merged

Speed up CodeBuild CI #1426

merged 2 commits into from
Feb 8, 2024

Conversation

andrewhop
Copy link
Contributor

@andrewhop andrewhop commented Jan 31, 2024

Description of changes:

  1. Split OpenSSH into two jobs, one for main branch, and another for 8.9
  2. Use RelWithDebInfo build for MySQL
  3. Force MySQL to use double the number of jobs to run the tests
  4. Update ARM fuzzer to run for a shorter period of time

Call-outs:

The majority of the MySQL CI time is spent building (~50 minutes) and then running the tests (22 minutes). The build already uses all CPU cores, but the tests seem not take full advantage with the default parallel=auto which just uses 1 test per core (orange is CPU usage %, blue is memory usage %):
image

Testing:

Locally and in this CI.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

1. Split OpenSSH into two jobs, one for main branch, and another for 8.9
2. Use RelWithDebInfo build for MySQL
3. Force MySQL to use double the number of jobs to run the tests
4. Update ARM fuzzer to run for a shorter period of time
@andrewhop andrewhop requested a review from a team as a code owner January 31, 2024 01:15
@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (67d3e50) 76.87% compared to head (cc2e7fe) 76.84%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1426      +/-   ##
==========================================
- Coverage   76.87%   76.84%   -0.04%     
==========================================
  Files         425      425              
  Lines       71527    71527              
==========================================
- Hits        54985    54962      -23     
- Misses      16542    16565      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

tests/ci/integration/run_mysql_integration.sh Outdated Show resolved Hide resolved
Comment on lines +89 to +91
if [ "$OPENSSH_BRANCH" != "master" ]; then
checkout_openssh_branch "$OPENSSH_BRANCH"
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

can you do this checkout unconditionally? if OpenSSH ever changes the name of their default branch, this might break.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Git was complaining about a 'master' branch already existing, I couldn't find a nice option to checkout if it doesn't already exist so i went with this.

Copy link
Contributor

Choose a reason for hiding this comment

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

hm, maybe you could do something like

if [ "$OPENSSH_BRANCH != $(git branch --show-current) ]; then
    checkout_openssh_branch "$OPENSSH_BRANCH
fi

env:
type: ARM_CONTAINER
privileged-mode: false
compute-type: BUILD_GENERAL1_LARGE
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 need BUILD_GENERAL1_LARGE here considering we use BUILD_GENERAL1_SMALL for x86?

@justsmth justsmth merged commit af5fe84 into aws:main Feb 8, 2024
37 checks passed
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.

5 participants