Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C Cli
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • repos
  • relengreleng
  • Cli
  • Merge requests
  • !204

Fix exit code of `docker exec` command not being used

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ollie Shotton requested to merge exit-codes into main Aug 19, 2022
  • Overview 2
  • Commits 5
  • Pipelines 5
  • Changes 6

Call os.exit at the top level so that:

  • event metrics are still emitted
  • all defered methods have been run

  • Didn't use os.Exit in DockerExec as that would prevent defered methods from being run
  • Didn't use os.Exit in each of the sub commands as that would prevent metric events from being emitted
  • Didn't use cobra.Command.RunE and return an error as they aren't all errors and the usage text is displayed

Bug: T307583

TODO

  • Update changelog
  • Remove WIP: prefix from commit message
Edited Aug 24, 2022 by Ollie Shotton
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: exit-codes