"relaying" messages? #136

Closed
opened 2021-11-20 13:24:32 +00:00 by ungleich-gitea · 1 comment

Created by: tom-ee

This is related to #624.
With PR #623 the question of "message relaying" re-surfaced (just using this PR as an example):

The re-implemented __apt_source manipulates files in /etc/apt/sources.list.d/ and messages for these manipulation are through the used __file-type.
We could "relay" the message by parsing $__messages_in in __apt_source/geocode-local and issue a message on it's own (relay __file/etc/apt/sources.list.d/xxx-messages as __apt_source/apt/sources.list.d/xxx).

pro:

  • Would make clear what type caused the change (here: to the file /etc/apt/sources.list.d/xxx).
  • Easier use of the message in other types.

contra:

  • This would impose a performance hit (at least 1 fork for parsing) in every run of cdist.
  • Messages would be duplicated => unclear which message is used in other types.

After writing this up my conclusion would be:
Relaying messages is not desirable and should only be done after thoroughly considering other ways.

Thoughts on this?
Should/could a note on this to the documentation (messaging or best practices)?

*Created by: tom-ee* This is related to #624. With PR #623 the question of "message relaying" re-surfaced (just using this PR as an example): The re-implemented `__apt_source` manipulates files in `/etc/apt/sources.list.d/` and messages for these manipulation are through the used `__file`-type. We could "relay" the message by parsing `$__messages_in` in `__apt_source/geocode-local` and issue a message on it's own (relay `__file/etc/apt/sources.list.d/xxx`-messages as `__apt_source/apt/sources.list.d/xxx`). pro: * Would make clear what type caused the change (here: to the file `/etc/apt/sources.list.d/xxx`). * Easier use of the message in other types. contra: * This would impose a performance hit (at least 1 fork for parsing) in _every_ run of cdist. * Messages would be duplicated => unclear which message is used in other types. After writing this up my conclusion would be: Relaying messages is not desirable and should only be done after thoroughly considering other ways. Thoughts on this? Should/could a note on this to the documentation (messaging or best practices)?
ungleich-gitea added the
Stale
label 2021-11-20 13:24:32 +00:00
Author
Owner

closed

closed
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#136
No description provided.