Visualizing relation databags for development and debugging

I am working on a charm library to implement a relation interface, and I soon discovered the pain of constantly running juju show-unit unitA/0 to check the relation databag contents. In particular my library does some back and forth between the related units exchanging application and unit data on both sides, so that means running juju show-unit unitB/0 as well to see what’s going on over there.

I thought, wouldn’t it be nice to see all databags (application, unit) side by side, updating live as the related charms ‘talk’?

Well, it would. So here is show-relation:

Future work

  • special-casing peer relations and cross-model relations
  • figuring out how to handle large lists of units where the contents wouldn’t fit on the console.

This is very interesting! @hallback @joakimnyman @jamesbeedy @heitor @emcp

1 Like

Excellent tool! It’s making my current development a lot easier.

1 Like

fyi I fixed the presentation of the data: now the data shows solely under the unit that owns it. The new layout is now consistent:

Unit A                                     Unit B
Unit A's app databag contents              Unit B's app databag contents
Unit A's unit databag contents             Unit B's unit databag contents
1 Like

v0.2 about to be released!

1 Like