Uploaded image for project: 'Coin'
  1. Coin
  2. COIN-348

Writing agent log might fail due to message being bytes instead of string

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • master
    • Scheduler
    • None
    • ccd5fe84b1aa6d33d3f35736f9748d018b4d56e7 (qtqa/tqtc-coin-ci/master)

    Description

      Weirdly enough, python interprets might interpret sent strings as bytes which will lead to encoding error while appending to work item log:

       

      Aug 19 10:34:20 personal-coins pipenv[25338]: Task exception was never retrieved
      Aug 19 10:34:20 personal-coins pipenv[25338]: future: <Task finished coro=<appendToAgentLog() done, defined at src/scheduler.py:200> exception=TypeError('write() argument must be str, not bytes',)>
      Aug 19 10:34:20 personal-coins pipenv[25338]: Traceback (most recent call last):
      Aug 19 10:34:20 personal-coins pipenv[25338]: File "src/scheduler.py", line 208, in appendToAgentLog
      Aug 19 10:34:20 personal-coins pipenv[25338]: await workItem.appendToAgentLog(agentId, message, phase)
      Aug 19 10:34:20 personal-coins pipenv[25338]: File "/home/aakeskim/tqtc-coin-ci/src/workitem.py", line 602, in appendToAgentLog
      Aug 19 10:34:20 personal-coins pipenv[25338]: await self.log.appendToAgentLog(message, phase)
      Aug 19 10:34:20 personal-coins pipenv[25338]: File "/home/aakeskim/tqtc-coin-ci/src/workitem.py", line 172, in appendToAgentLog
      Aug 19 10:34:20 personal-coins pipenv[25338]: self.logFile.write(message)
      Aug 19 10:34:20 personal-coins pipenv[25338]: TypeError: write() argument must be str, not bytes

       

      This means that we might loose log data that is pretty bad.

      Attachments

        For Gerrit Dashboard: COIN-348
        # Subject Branch Project Status CR V

        Activity

          People

            aakeskimo Aapo Keskimölö
            aakeskimo Aapo Keskimölö
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes