Metronome make dist doesn't produce ez files

173 views
Skip to first unread message

biiiipy

unread,
Aug 10, 2020, 10:23:39 AM8/10/20
to rabbitmq-users
I followed plugin development guide and tried to compile metronome example repository.
make works, produced *.beam and *.app files.
But make dist doesn't produce *.ez files:

make[1]: Entering directory '/mnt/c/rabbitmq-metronome'
 DIST   plugins/amqp_client-3.8.0+rc.1.30.gb53120f
 DIST   plugins/aten-0.5.5
 DIST   plugins/credentials_obfuscation-2.1.1
 DIST   plugins/cuttlefish-2.3.0
 DIST   plugins/gen_batch_server-0.8.4
 DIST   plugins/getopt-1.0.1
 DIST   plugins/goldrush-0.1.9
 DIST   plugins/jsx-2.11.0
 DIST   plugins/lager-3.8.0
 DIST   plugins/observer_cli-1.5.4
 DIST   plugins/ra-1.1.6
 DIST   plugins/rabbit-3.8.0+rc.1.386.g9b905fc
 DIST   plugins/rabbitmq_prelaunch-3.8.0+rc.1.386.g9b905fc
 DIST   plugins/rabbit_common-3.8.0+rc.1.115.gd1fbe77
 DIST   plugins/ranch-1.7.1
 DIST   plugins/recon-2.5.1
 DIST   plugins/stdout_formatter-0.2.4
 DIST   plugins/syslog-3.4.5
 DIST   plugins/sysmon_handler-1.3.0
 DIST   plugins/rabbitmq_metronome-3.7.0.milestone18+83.g550870f.dirty
make[1]: Leaving directory '/mnt/c/rabbitmq-metronome'
 GEN    install-cli-scripts
 GEN    install-cli-escripts
make[1]: Entering directory '/mnt/c/rabbitmq-metronome/deps/rabbitmq_cli'
 GEN    install
make[1]: Leaving directory '/mnt/c/rabbitmq-metronome/deps/rabbitmq_cli'

I have no errors while running make. Building on Ubuntu in WSL2 environment.
elixir -v produces:
Erlang/OTP 23 [erts-11.0.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]

Elixir 1.10.4 (compiled with Erlang/OTP 22)

Eric Wang

unread,
Aug 11, 2020, 5:04:45 AM8/11/20
to rabbitmq-users
Also hitting this issue (macos) trying to compile a plugin that was generating .ez files previously.

BTW as a temporary workaround I've just been creating a zip file of the bundle with the .ez extension manually.

Parikshit Manchare

unread,
Aug 18, 2020, 1:33:20 AM8/18/20
to rabbitmq-users
I have also faced this same issue recently. Earlier i used to see metronome ez's generated properly just by using 'make' command, but now I can only see the complete directory generated instead of the archive .ez file. 
Is this a known behavior or anything to be checked from our end ? 
What i wonder most is this is a standard RabbitMQ plugin itself and not our custom plugin. So ideally the behavior must be consistent everytime. 
As per your suggestion, manually .ez creation works fine, but what if we see this same issue when we are creating our own custom plugins ? 
Isn't this an inconsistent behavior ? Also if we create our own build scripts, there we will have to add some additional checks to see if there's an .ez generated already then fine, else create it explicitly.

Parikshit Manchare

unread,
Aug 18, 2020, 1:36:28 AM8/18/20
to rabbitmq-users
I tried 'make dist' as well, that too is not generating .ez

Luke Bakken

unread,
Aug 18, 2020, 5:50:11 PM8/18/20
to rabbitmq-users
Hello,

Are you using the current master code for rabbitmq-metronome? As of this commit we are no longer packaging plugins as ez files - https://github.com/rabbitmq/rabbitmq-common/pull/408

Thanks,
Luke

Michael Klishin

unread,
Aug 19, 2020, 2:11:51 AM8/19/20
to rabbitmq-users
RabbitMQ 3.9 no longer distributes plugins as .ez files, although .ez file support is still there if you place one on the code path [1].
We'd have to add a new target that produces an .ez file.

There are several questions from our team:

 * Metronome is an example plugin. Let's assume it's a tier 1 plugin that ships with RabbitMQ. Why do you need to build it from source?
 * If you need to build a custom version of a tier 1 plugin from source, why do you do it from master? Do you also build RabbitMQ 3.9 from master and run it? Because 3.8 releases are not produced off of master, there are separate branches for every release series.

So maybe our team should be less excited about dropping all the .ez file extraction code, even if it complicates deployments and does not support OS-specific library loading,
it is a fairly convenient way to distribute custom builds.

biiiipy

unread,
Aug 19, 2020, 2:29:37 AM8/19/20
to rabbitmq-users
I needed to recompile my plugin when upgrading to 3.8.x. The best way to do it, is to take metronome plugin repo and replace with my own files, because we're not erlang devs and don't want to mess with compilation setup. 
I kind of expected for that to work (this approach did previously). Obviously it's not the best way to do it, because repo (as was in this case) is ahead of the released rabbitmq version, but because there was no info about these changes, and because the plugin still targets 3.8.x version, it seemed that everything should work out.

Long story short - we take Metronome and adapt to our plugin, so we expect for Metronome compilation to work properly.

biiiipy

unread,
Aug 19, 2020, 2:32:29 AM8/19/20
to rabbitmq-users
P.S. So there's nothing against dropping .ez files, it was just unexpected behavior

Parikshit Manchare

unread,
Aug 20, 2020, 4:27:43 AM8/20/20
to rabbitmq-users
So this change is applicable from RabbitMQ-3.9 onwards or from 3.8.x as well ? I can see the ez's not being generated in 3.8.3 version too. I am building my custom plugins using rabbitmq-public-umbrella repo. Previously few days back, i was able to see the ez's of all dependencies (deps), but now i can see only the directories. So my concern was, its fine to explicitly create archive (ez) out of my custom plugin, but this is just an additional step that I will have to do because I can't copy the directory as is. My application expects an *.ez which it copies directly to the rabbitmq's plugins directory via a script. 

Jean-Sébastien Pédron

unread,
Aug 20, 2020, 1:58:14 PM8/20/20
to rabbitm...@googlegroups.com
Hi!

If you are building against RabbitMQ's master branch, you can request to
package plugins as .ez archives by specifying DIST_AS_EZS on your
make(1) command line:

make dist DIST_AS_EZS=1

If you build against a release branch (e.g. v3.8.x), the default is
still to produce .ez archives.

This is an experiment we run in the master branch, nothing is set in stone.

Thank you all for your feedback!

--
Jean-Sébastien Pédron
RabbitMQ Core team
VMware, Inc.

signature.asc

manch...@gmail.com

unread,
Aug 24, 2020, 8:32:00 AM8/24/20
to rabbitmq-users
Thank you for all the guidance so far. It helped me in understanding things in a better way. 

I have 1 query though, I am building a sample plugin and inside my Makefile if I have to provide some dependencies to rabbit_common, rabbit & amqp_clent how to specify the appropriate versions of these required dependencies ? If I write below lines in my Makefile, by default it downloads from master branch. I want them to be downloaded from v3.8.x instead of master branch. 

My Makefile has below line : 

DEPS = rabbit_common rabbit amqp_clent

Let me know if any details required. 

Regards
Parikshit

Reply all
Reply to author
Forward
0 new messages