Skip to content

Message rework

Tom Pollard requested to merge tpollard/messageobject into master

Description

This is partly for work towards #1036 (closed). Adding the element full name (note the instance full name is that of the Element, not the underlying plugin module __kind name) and display key into all element related messages removes the need to look up the plugintable via a plugin unique_id just to retrieve the same values for logging and widget frontend display. Relying on plugintable state is also incompatible when the frontend will be running in a different process compared to scheduler/job/queue execution, as it will exist in multiple states. It can also be seen as more 'correct' as the frontend should not need knowledge of the plugin table and the message should reflect the state at which it was generated.

For messaging, the full name (element name + prepended junction if required) is unique within buildstream when referencing the the instance name of any element or source plugin, regardless of underlying class module __kind.

Changes proposed in this merge request:

  • Remove the concept of unique_id / plugin_id in Message(), use element_name & element_key to achieve same outcome
  • Ensure ElementJob & any other messaging sources related to Elements are reworked to support
  • Change certain places to print the element full name instead of the unique_id, such as in the debugging widget. Also full name to be used in placed of 'name' (i.e not including any junction prepend) as again this is more useful in terms of informing the user.
  • Pass-through Element if failure & in interactive mode, this is in place of doing a look up on the plugin table for the same instance
  • All existing tests pass, but manually builds should be run to check the frontend is behaving as expected.

Edited by Tom Pollard

Merge request reports