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

Feature - CI process optimization #3933

Merged
merged 8 commits into from
May 6, 2024

Conversation

Agnul97
Copy link
Contributor

@Agnul97 Agnul97 commented Jan 9, 2024

Brief description of the PR.
This PR is a collection of optimizations for the CI configuration. They follow the work started with the PR #3785.
The scope of this work is not only to speed-up the build for our interest but also to reduce the utilization of resources running jobs that we share with other eclipse projects.

Description of the solution adopted
First of all, in a separate investigation, I noticed that the 'kapua artifacts' (the ones created in the build job and later cached for the test jobs) could have been built with maven in multi-threading mode, because the plugins used for this build process are thread-safe (in contrast with the plugins used for building docker images, that are not thread-safe). As a consequence, I Inserted the multi-thread building with the '-1C' option, in this way 1 thread is spawn for each available core (this is nice in this GitHub environment because machines available for the build job could have different number of cores)

Running some tests locally, in the past, I realized that the kapua-api docker image is never used in a lot of ci-jobs. So, it is useless to re-build it in every job as we do now. I modified the abstract script that runs tests to introduce a new parameter that specifies if the job needs the rest-api image and builds it if necessary.

I modified this same script to insert a parameter (run-junit) that allows to choose if we want to run junit or cucumber tests. In this way now also the step that runs junit tests in the ci configuration uses this script.

I moved the configuration of the maven surefire plugin in the pom files that is needed to run tests without jvm parameters. In this way now there is no need to use the parameters present in the head of the CI configuration file

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 20.63%. Comparing base (b073aaa) to head (ccebfb3).
Report is 7 commits behind head on develop.

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

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3933      +/-   ##
=============================================
+ Coverage      16.85%   20.63%   +3.77%     
+ Complexity        10        6       -4     
=============================================
  Files           1987     1947      -40     
  Lines          51803    41691   -10112     
  Branches        4422     3954     -468     
=============================================
- Hits            8733     8604     -129     
+ Misses         42666    32688    -9978     
+ Partials         404      399       -5     

see 714 files with indirect coverage changes

@Agnul97 Agnul97 force-pushed the feature-ciOptimizations branch 2 times, most recently from 34696c6 to bd6bc85 Compare April 19, 2024 14:34
@Agnul97 Agnul97 force-pushed the feature-ciOptimizations branch from fb7c16f to b70972e Compare May 6, 2024 07:58
@codecov-commenter
Copy link

codecov-commenter commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 16.78%. Comparing base (be87c67) to head (b70972e).

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

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #3933   +/-   ##
==========================================
  Coverage      16.78%   16.78%           
  Complexity        10       10           
==========================================
  Files           1987     1987           
  Lines          51835    51835           
  Branches        4422     4422           
==========================================
  Hits            8702     8702           
  Misses         42730    42730           
  Partials         403      403           

@Agnul97 Agnul97 force-pushed the feature-ciOptimizations branch from b70972e to a52bb7e Compare May 6, 2024 08:19
@Coduz Coduz added Enhancement This PR/Issue improves an part of Kapua Test Test related stuff. It's a dirty job, but someone needs to do that! labels May 6, 2024
@Coduz Coduz merged commit f4c3443 into eclipse:develop May 6, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This PR/Issue improves an part of Kapua Test Test related stuff. It's a dirty job, but someone needs to do that!
Projects
Development

Successfully merging this pull request may close these issues.

3 participants