Skip to content

Refactor app initialization

Tomasz Maczukin requested to merge refactor-app-initialization into master

What does this MR do?

Refactorizes the way how application is initialized.

Why was this MR needed?

Several reasons:

  1. Move binaries sources (main package) to cmd/[binnary-name]/main.go, which is the pattern commonly used for Go apps,
  2. Move code parts common for gitlab-runner/main.go and gitlab-runner-helper/main.go to one place: app package.
  3. Move some code related to application initialization from helpers/cli to the app package. This is a next step in decomposing the big, messed helpers/ package in more structured and domain oriented parts.
  4. Prepare a hooks mechanism in app package, to simplify the initialization of apps.

Are there points in the code the reviewer needs to double check?

Built on top of !1020 (merged) so needs to wait for it to be merged This is done 😉

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

Closes #4302

Edited by Wayne Haber

Merge request reports