Skip to content

Create log file if doesnt exist

James Nutt requested to merge create_log_file into master

What does this MR do and why?

Describe in detail what your merge request does and why.

I ran into this error today

Verify Trigger matrix creates 2 trigger jobs and passes corresponding matrix variables
     Got 0 failures and 2 other errors:

     1.1) Failure/Error: logdev = File.open(filename, (File::WRONLY | File::APPEND | File::CREAT | File::EXCL))

          Errno::ENOENT:
            No such file or directory @ rb_sysopen - /Users/tiffanyrea/src/gitlab-development-kit/gitlab/qa/tmp/qa-tests.log
          # ./qa/runtime/logger.rb:16:in `logger'
          # ./qa/specs/spec_helper.rb:38:in `block (2 levels) in <top (required)>'
          # ------------------
          # --- Caused by: ---
          # Errno::ENOENT:
          #   No such file or directory @ rb_sysopen - /Users/tiffanyrea/src/gitlab-development-kit/gitlab/qa/tmp/qa-tests.log
          #   ./qa/runtime/logger.rb:16:in `logger'

So adding this one liner to fix it 😸

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by James Nutt

Merge request reports

Loading