Uploaded image for project: 'RHEL Conversions'
  1. RHEL Conversions
  2. RHELC-976

Get consistent log messages to be returned from Actions

XMLWordPrintable

    • 5
    • 1.4 GA, 2023-Q2
    • Testable

      This will mostly be `logger.warning()` calls but `logger.info` should also be looked at to see if there is information in there that should be passed back.

      Some places that definitely should be examined (These were found by looking at where we removed ask_to_continue in this PR https://github.com/oamg/convert2rhel/pull/790/files# )

       

      Some thoughts on the design of the framework to handle these:

      • We need to have separate returns for final results (SUCCESS, FAILURE, and SKIP) because there must be one and only one of those after run() finishes.
      • final result messages should be a list so that adding multiple messages to SUCCESS can be nicely formatted.
      • WARNING, and other things that can occur multiple times should be stored in a new list attribute on the Action class.
      • When evaluating logger.warning and logger.info, decide whether to set it as a SUCCESS messages or WARNING message. success messages will not be shown in convresion, only in analyze. warning messages will be shown in both.
      • add_result() should be renamed since we want results to be final results only. Maybe add_message()?

      Design notes: https://gist.github.com/pr-watson/6fee04e75bdad40287cb1e51d70ba702

              prwatson@redhat.com Preston Watson
              tkuratom@redhat.com Toshio Kuratomi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: