1. 21 Mar, 2019 1 commit
    • Tomasz Maczukin's avatar
      Remove unnecessary log alias for logrus inport · d9e9d81c
      Tomasz Maczukin authored
      Some time ago [we had a discussion](!934 (comment 91891281))
      about why we're aliasing some of the imports of `github.com/sirupsen/logrus`
      package with a `log` alias.
      
      At that moment we've been doing that in 17 from 68 cases when logrus
      was imported in Runners codebase.
      
      The conclusion was this aliasing is unnecessary, because:
      - we relay on logrus interface so much that moving to another logging
        library will be not so simple as switching the import name;
      - we're totally not consistent in the alias usage which makes the code
        even more messy.
      
      Three GitLab Runner maintainers agreeded hat there is no reason to use
      the aliasing and that we should just use `logrus` everywhere.
      
      But no action was don since then. The cleanup was left for a future.
      
      Unfortunately, because GitLab Runner is one of our biggest projects in
      Go, for some people it becomes a source of suggestions of how certain
      things should be handled. For example here is a discussion in a new
      project that creates a go-based tool for our Serverless integration:
      
      gitlabktl!9 (comment 152472275)
      
      The most important statement is:
      
      > perhaps we could leave it as is since it is how we are exposing
        logrus in the runner project
      
      Because we already know that it should be changed and others start to
      look on Runner's code to find good patterns, let's finally cleanup
      the `log` aliasing mess.
      d9e9d81c
  2. 19 Mar, 2019 4 commits
  3. 18 Mar, 2019 4 commits
  4. 17 Mar, 2019 2 commits
  5. 16 Mar, 2019 1 commit
  6. 14 Mar, 2019 5 commits
  7. 13 Mar, 2019 3 commits
  8. 12 Mar, 2019 2 commits
  9. 11 Mar, 2019 3 commits
    • Tomasz Maczukin's avatar
      Merge branch 'fix-project-dir-masking' into 'master' · a2cafc6a
      Tomasz Maczukin authored
      Fix CI_PROJECT_DIR handling
      
      Closes #4043
      
      See merge request !1241
      a2cafc6a
    • Kamil Trzciński's avatar
      Fix CI_PROJECT_DIR handling · 11d5b835
      Kamil Trzciński authored
      11d5b835
    • Tomasz Maczukin's avatar
      Restore availability of pprof in the debug server · 0cb2512f
      Tomasz Maczukin authored
      With CI Web Terminal initial implementation
      (!934)
      we've changed the way how the debug server is started.
      
      It can be seen at !934 (diffs)
      
      ```diff
      +		mux := http.NewServeMux()
      +
      		go func() {
      -			log.Fatalln(http.Serve(listener, nil))
      +			log.Fatalln(http.Serve(listener, mux))
      		}()
      ```
      
      Instead of relaying on the `http.DefaultServeMux` (which is used when
      `http.Serve(listener, nil)` is called), we're creating our own ServeMux
      which next is used for handling requests.
      
      Unfortunately this breaks automatic registration of pprof handlers,
      which in `net/http/pprof`'s `init()` are using `http.Handle()`, which
      registers the handlers in `http.DefaultServeMux`.
      
      This commit adds an explicit registration of pprof handlers to the
      `mux` ServeMux created by us. This will restore the functionality
      that we had present before version 11.3.0.
      0cb2512f
  10. 08 Mar, 2019 5 commits
  11. 07 Mar, 2019 10 commits