[MDEV-13234] buildbot: minimal build Created: 2017-07-03  Updated: 2022-11-03

Status: Open
Project: MariaDB Server
Component/s: Compiling, Tests
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Sergei Golubchik Assignee: Daniel Bartholomew
Resolution: Unresolved Votes: 1
Labels: None

Issue Links:
Relates
relates to MDBF-127 Ecosystem CI - dbdeployer Closed

 Description   

"Minimal build" builder. All non-mandatory plugins are disabled. Just the compilation and a minimal test run. The goal is to ensure that the code compiles and the binary doesn't crash on startup.



 Comments   
Comment by Daniel Bartholomew [ 2017-07-03 ]

Any suggestions for the distro to build on?

Comment by Sergei Golubchik [ 2017-07-04 ]

Nothing in particular. I'd pick one of the existing VMs, not too old distribution. Xenial, may be. Or new Fedora.

Comment by Colin Charles [ 2019-06-20 ]

Hi!

Is this semi-related? https://jira.mariadb.org/browse/MDEV-131

I actually would love to create a minimal tarball, which may be beyond the goal of disabling non-mandatory plugins and minimal tests – but one that strips the binaries, changing compression, etc. for distribution purposes. MySQL has brought this on nowadays, and it is immensely useful for testing purposes, i.e. with tools like dbdeployer

See https://mysqlrelease.com/2019/05/the-amazing-shrinking-tarball/ for MySQL "going from 439.4Mb down to 42.2Mb". MariaDB Server 10.4.6 is 701.6MB to 874.7MB for tarballs, and it would be great to get this reduced in size!

Comment by Daniel Bartholomew [ 2019-10-10 ]

I've added a minimal build to buildbot.

Here's the log of the first build:
http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-xenial-amd64-minimal/builds/0

The minimal bintar builder is currently configured with the following additions to the standard cmake flags for bintars:

-DCMAKE_BUILD_TYPE=MinSizeRel -DPLUGIN_ROCKSDB=NO -DPLUGIN_TOKUDB=NO -DPLUGIN_CASSANDRA=NO

RocksDB and TokuDB fail to build when '-DCMAKE_BUILD_TYPE=MinSizeRel' is set, so they had to be disabled to get an initial working config in place in buildbot. I also set '-DPLUGIN_CASSANDRA=NO' because it definitely meets the definition of "non-mandatory".

Not sure if we want to eventually release this bintar or not. The size is greatly reduced from regular bintars, 142M for the 10.4 xenial minimal bintar compared to 1001M for the 10.4 trusty bintar, so I imagine some users would find it useful.

If we do decide to eventually release it we could reduce the filesize even further, down to 80M, if we switched from gzip to using xz for the final compression of the tar file. But I haven't looked into how to configure that to happen automatically when building.

serg: Now that there's an initial working config in place, let me know what other plugins I should disable for this build. Thanks.

Comment by Sergei Golubchik [ 2019-10-11 ]

the idea was to disable everything

to ensure that the code compiles and the binary doesn't crash on startup

so let's try -DWITH_NONE=1

Comment by Daniel Bartholomew [ 2019-10-11 ]

Ok, the cmake line in buildbot is now just:

-DWITH_NONE=1

Comment by Daniel Bartholomew [ 2019-10-11 ]

serg Looks like trying to compile with -DWITH_NONE=1 fails:

https://buildbot.askmonty.org/buildbot/builders/kvm-bintar-xenial-amd64-minimal/builds/23

Comment by Daniel Bartholomew [ 2019-10-11 ]

I've set up a bld-starfs-minimal builder/factory with the following cmake line:

cmake . -DWITH_NONE=1 -DPLUGIN_PARTITION=NO -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_FEEDBACK=NO -DPLUGIN_INNOBASE=NO

Builds are succeeding.

There was a 10.2 build that failed when I just did '-DWITH_NONE=1' but after adding the others it is succeeding too.

Builds on this are faster compared to the bld-starfs-release builder, e.g. 17 vs 9 minutes for 10.5, and on 10.2 it builds in only 5 minutes.

Comment by Oleksandr Byelkin [ 2019-10-15 ]

it fails on tokudb compile on 5.5 http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-xenial-amd64-minimal/builds/20

Comment by Daniel Bartholomew [ 2019-10-15 ]

Thanks Sanja! Yes, the kvm-bintar-xenial-amd64-minimal builder is failing most of its builds at the moment. I need to adjust the cmake line.

Comment by Sergei Golubchik [ 2019-11-27 ]

why do we need both? bld-starfs-minimal looks good enough. We just need to test a minimal build, not a minimal bintar — the latter is not expected to work

Comment by Daniel Bartholomew [ 2019-12-02 ]

ok, then I'll remove kvm-bintar-xenial-amd64-minimal and close this issue

Comment by Daniel Black [ 2020-12-16 ]

on dbdeployer requirements looking at the minimal build from MySQL

Default 10.5 is:

CPackConfig.cmake:set(CPACK_COMPONENTS_ALL
"Client;ClientPlugins;Common;Development;IniFiles;ManPagesClient;ManPagesDevelopment;ManPagesServer;ManPagesTest;Mytop;Readme;Server;Server_Scripts;SharedLibraries;SqlBench;SupportFiles;Test;backup;cracklib-password-check;gssapi-server;oqgraph-engine;rocksdb-engine;s3-engine")

Of which I think to match the MySQL minimal is removing:

  • Development
  • ManPagesDevelopment
  • ManpagesTest
  • Mytop
  • Server_Scripts (doesn't include mysql_install_db)
  • SqlBench
  • SupportFiles
  • Test
    + checking the mysqld embedded version isn't there

If a cpack -G TXZ command could pack that minimal list it might be achievable.

https://buildbot.mariadb.org/#/builders/124 has the largest step as fetching the tarball built so a secondary requirement is using it there.

Comment by Daniel Black [ 2022-11-03 ]

Separate tar files can be generated:

$ cmake -DCPACK_ARCHIVE_COMPONENT_INSTALL=ON   -DCPACK_GENERATOR=TXZ -DCPACK_COMPONENTS_ALL="Client;ClientPlugins;Common;DataFiles;IniFiles;ManPagesClient;ManPagesServer;Readme;SharedLibraries;SupportFiles;backup;connect-engine;cracklib-password-check;gssapi-server;oqgraph-engine;rocksdb-engine"  .
 
$ cmake --build . --target package
[8/9] Run CPack packaging tool...
CPack: Create package using TXZ
CPack: Install projects
CPack: - Install project: MySQL []
CPack: -   Install component: Client
CPack: -   Install component: ClientPlugins
CPack: -   Install component: Common
CPack: -   Install component: DataFiles
CPack: -   Install component: IniFiles
CPack: -   Install component: ManPagesClient
CPack: -   Install component: ManPagesServer
CPack: -   Install component: Readme
CPack: -   Install component: SharedLibraries
CPack: -   Install component: SupportFiles
CPack: -   Install component: backup
CPack: -   Install component: connect-engine
CPack: -   Install component: cracklib-password-check
CPack: -   Install component: gssapi-server
CPack: -   Install component: oqgraph-engine
CPack: -   Install component: rocksdb-engine
CPack: Create package
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-Client.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-ClientPlugins.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-Common.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-DataFiles.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-IniFiles.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-ManPagesClient.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-ManPagesServer.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-Readme.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-SharedLibraries.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-SupportFiles.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-backup.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-connect-engine.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-cracklib-password-check.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-gssapi-server.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-oqgraph-engine.tar.xz generated.
CPack: - package: /home/dan/repos/build-mariadb-server-10.3/mariadb-10.3.37-linux-x86_64-rocksdb-engine.tar.xz generated.

Generated at Thu Feb 08 08:03:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.