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

Change ERL_FLAGS to limit compile concurrency on CircleCI #2028

Merged
merged 3 commits into from
Apr 25, 2024

Conversation

stuartc
Copy link
Member

@stuartc stuartc commented Apr 25, 2024

Manually sets the Erlang scheduler count to 4:4.

This appears to fix the compile warning we were getting repeatedly:

warning: invalid association `snapshot` in schema Lightning.Invocation.Step: associated module Lightning.Workflows.Snapshot is not an Ecto schema
  lib/lightning/invocation/step.ex:1: Lightning.Invocation.Step (module)

...
Compilation failed due to warnings while using the --warnings-as-errors option

Exited with code exit status 1

I couldn't reproduce this locally, on either x86 or aarch64 - using the official Elixir image we use in CI; also using elixir --erl "+T 9" -S mix compile --force to slow down the scheduler timings.

I found a note on the CircleCI resource_class docs that noted:

Java, Erlang and any other languages that introspect the /proc directory for information about CPU count may require additional configuration to prevent them from slowing down when using the CircleCI resource class feature. Programs with this issue may request 32 CPU cores and run slower than they would when requesting one core. Users of languages with this issue should pin their CPU count to their guaranteed CPU resources.

So I've added an ERL_FLAGS var to the job not only did the test suite run way faster, it also doesn't appear to have any compile warnings (at least for the Ecto case).

Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.06%. Comparing base (5a76c0c) to head (d2d37d0).

❗ Current head d2d37d0 differs from pull request most recent head 8055b51. Consider uploading reports for the commit 8055b51 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2028   +/-   ##
=======================================
  Coverage   90.06%   90.06%           
=======================================
  Files         248      248           
  Lines        8227     8227           
=======================================
  Hits         7410     7410           
  Misses        817      817           

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

@stuartc stuartc marked this pull request as ready for review April 25, 2024 06:53
@stuartc stuartc merged commit dd55573 into main Apr 25, 2024
6 checks passed
@stuartc stuartc deleted the erl_flags_on_ci branch April 25, 2024 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant