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

ci: Adding node-linux-medium executor #25476

Merged
merged 3 commits into from
Jun 24, 2024
Merged

Conversation

vthomas13
Copy link
Contributor

@vthomas13 vthomas13 commented Jun 21, 2024

Description

This PR implements a suggestion from @davidmurdoch to use linux machine image to reduce CI costs on the build steps in our pipeline. Starting with the build steps, we want to optimize for cost for any tests that can support a linux executor.

Open in GitHub Codespaces

Related issues

Fixes: #25229

Manual testing steps

  1. Check CI

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@vthomas13 vthomas13 requested review from kumavis and a team as code owners June 21, 2024 18:16
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@vthomas13 vthomas13 force-pushed the node-linux-medium-executor branch 2 times, most recently from 683fc5c to 2eedad6 Compare June 21, 2024 21:06
Copy link

codecov bot commented Jun 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.44%. Comparing base (f6acedb) to head (e4472a3).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25476   +/-   ##
========================================
  Coverage    70.44%   70.44%           
========================================
  Files         1274     1274           
  Lines        44078    44078           
  Branches     12453    12453           
========================================
  Hits         31049    31049           
  Misses       13029    13029           

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

davidmurdoch
davidmurdoch previously approved these changes Jun 21, 2024
Copy link
Contributor

@davidmurdoch davidmurdoch left a comment

Choose a reason for hiding this comment

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

🚀 We'll need to follow up on this PR in a week or so to measure credit usage to be sure we are saving $$$$$s

@metamaskbot
Copy link
Collaborator

Builds ready [2eedad6]
Page Load Metrics (170 ± 227 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6813795189
domContentLoaded9391473
load422229170472227
domInteractive9391473
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

DDDDDanica
DDDDDanica previously approved these changes Jun 21, 2024
@hjetpoluru hjetpoluru self-requested a review June 21, 2024 22:29
hjetpoluru
hjetpoluru previously approved these changes Jun 21, 2024
Copy link
Contributor

@hjetpoluru hjetpoluru left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@HowardBraham HowardBraham left a comment

Choose a reason for hiding this comment

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

This should reduce credits per workflow, since Linux VM medium costs 10 credits per minute, and Docker Medium+ costs 15 credits per minute. As long as we don't somehow expand our minutes by 50%.
https://circleci.com/product/features/resource-classes/

There are a few more jobs that I noticed can use node-linux-medium:

  • prep-build
  • prep-build-mv2
  • prep-build-mmi
  • prep-build-flask
  • prep-build-flask-mv2
  • prep-build-test-mmi-playwright

@@ -13,6 +13,12 @@ executors:
resource_class: medium
environment:
NODE_OPTIONS: --max_old_space_size=3072
node-linux-medium:
machine:
image: ubuntu-2204:2024.04.4
Copy link
Contributor

Choose a reason for hiding this comment

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

We're in an Ubuntu LTS transition period. I think we might as well go with the next version, which is
ubuntu-2404:2024.05.1

@metamaskbot
Copy link
Collaborator

Builds ready [0d2c654]
Page Load Metrics (50 ± 4 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint71968273
domContentLoaded9201121
load42735094
domInteractive9201121
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

image: ubuntu-2404:2024.05.1
resource_class: medium #// linux medium: 2 CPUs, 7.5 GB RAM, 10 credits/min
environment:
NODE_OPTIONS: --max_old_space_size=6144
Copy link
Member

Choose a reason for hiding this comment

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

Curious that we're allowing for a larger heap here than on medium+. I guess there should be adequate room though, as long as we're not running multiple Node.js processes in one job.

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@metamaskbot
Copy link
Collaborator

Builds ready [e4472a3]
Page Load Metrics (220 ± 245 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint64228974924
domContentLoaded8191132
load401778220511245
domInteractive8191132
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@vthomas13 vthomas13 merged commit 230dec7 into develop Jun 24, 2024
73 checks passed
@vthomas13 vthomas13 deleted the node-linux-medium-executor branch June 24, 2024 17:14
@github-actions github-actions bot locked and limited conversation to collaborators Jun 24, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.1.0 Issue or pull request that will be included in release 12.1.0 team-extension-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Reduce the size of ressources dedicated to circle.ci job that builds the Extension
7 participants