meta-sca
meta-sca copied to clipboard
How to speed up meta-sca
In my CI environment (gitlab-ci), I keep the sstate-cache directory and reuse it for multiple builds. The tmp directory is deleted for each build. This causes meta-sca to rerun everytime (and takes almost 4 hours!).
I can't keep the tmp directory because I am building different projects (with a common base). Is there anything similar to the sstate-cache for meta-sca which could be shared across projects ?
Also, is there some kind of whitelist for layers instead of a blacklist ? I am currently using SCA_SPARE_LAYER and I don't want to inherit sca on each layer individually if possible.
Thanks
Hmmm, meta-sca should be sstate-safe, so you wouldn't require a tmp directory for the build. Regarding the allow-list - I think that would be an interesting enhancement, could you please open up a dedicated ticket for that?
In the past I used this layer in a way to always include everything unless explicitly excluded, but I get your point. BTW does your build without meta-sca fully support the sstate cache? meaning that there won't be a rerun of it when nothing got modified
I'm pretty sure it does fully support sstate-cache, I will check again.
When rerunning a build without removing tmp it takes 2 minutes. When removing tmp it does everything meta-sca related again.
I have opened a ticket for the whitelist here. Thanks for looking into it!
@gomme600 it seems you were right, as a few host specific paths slipped into the task hash signatures - although they shouldn't be there - I fixed that with #9492. Could you please give it a try and report back if sstate caches are now working for you
Is that included in the latest dunfell build now ?
Edit : Just checked and seen that it is, am trying now !
For some reason I am getting this error in my CI environment but not on my local build : Parsing recipes...ERROR: ParseError at /app/gitlab-runner/builds/c89cebdd/1/BS_PAMELA/manifests/repo_project_dir/sources/meta-sca/dynamic-layers/meta-oe/php_%.bbappend:1: unparsed line: 'PACKAGECONFIG:class-native = "mbstring openssl zip"'
Edit : That's the error I was getting here , looks like I need to update my CI environnement.
I just got this error :
ERROR: base-files-3.0.14-r89 do_sca_get_sources: Execution of '/pamela/pcm-imx6quad-10191/tmp/work/pcm_imx6quad-actia-linux-gnueabi/base-files/3.0.14-r89/temp/run.do_sca_get_sources.5406' failed with exit code 1 ERROR: Logfile of failure stored in: /pamela/pcm-imx6quad-10191/tmp/work/pcm_imx6quad-actia-linux-gnueabi/base-files/3.0.14-r89/temp/log.do_sca_get_sources.5406 Log data follows: | DEBUG: Executing shell function do_sca_get_sources | find: ‘/pamela/pcm-imx6quad-10191/tmp/work/pcm_imx6quad-actia-linux-gnueabi/base-files/3.0.14-r89/sstate-build-deploy_source_date_epoch’: No such file or directory | WARNING: /pamela/pcm-imx6quad-10191/tmp/work/pcm_imx6quad-actia-linux-gnueabi/base-files/3.0.14-r89/temp/run.do_sca_get_sources.5406:1 exit 1 from 'find /pamela/pcm-imx6quad-10191/tmp/work/pcm_imx6quad-actia-linux-gnueabi/base-files/3.0.14-r89 -type f -exec md5sum {} ; >> /pamela/pcm-imx6quad-10191/tmp/work/pcm_imx6quad-actia-linux-gnueabi/base-files/3.0.14-r89/temp/sca_seen_sources.txt' | ERROR: Execution of '/pamela/pcm-imx6quad-10191/tmp/work/pcm_imx6quad-actia-linux-gnueabi/base-files/3.0.14-r89/temp/run.do_sca_get_sources.5406' failed with exit code 1 NOTE: recipe base-files-3.0.14-r89: task do_sca_get_sources: Failed ERROR: Task (/pamela/sources/poky/meta/recipes-core/base-files/base-files_3.0.14.bb:do_sca_get_sources) failed with exit code '1'
And I got this error on my local build :
ERROR: gobject-introspection-1.62.0-r0 do_sca_tracefiles: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function:
ERROR: Logfile of failure stored in: /home/slucas/meta-sca/repo3/build-imx_imx-distro_security_sota_test_xwayland/tmp/work/cortexa9t2hf-neon-actia-linux-gnueabi/gobject-introspection/1.62.0-r0/temp/log.do_sca_tracefiles.215 ERROR: Task (/home/slucas/meta-sca/repo3/sources/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb:do_sca_tracefiles) failed with exit code '1'