Project

General

Profile

Idea #20498

Refactor jobsub_drobpox_cleanup tool to keep config info as high level as possible

Added by Shreyas Bhat 10 months ago. Updated 3 days ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Target version:
Start date:
07/31/2018
Due date:
% Done:

0%

Estimated time:
Stakeholders:
Duration:

Description

Best practice golang is to keep the config at the main package level, and simply pass structs of necessary info down. Makes it much easier to maintain code. Refactor the code (after doing the rest of the updates!!!) so that it follows this.


Related issues

Is duplicate of JobSub - Feature #20195: Take out viper config from subpackages for jobsub_dropbox_cleanup toolClosed2018-06-19

History

#1 Updated by Shreyas Bhat 8 months ago

Case in point: https://peter.bourgon.org/go-in-production/#configuration

Don't need verbose to stick around. Just set the log level in main.init based on the verbose flag. Then everything we would print as verbose becomes "log.Debug" and it sorts itself out.

Have to think about how I want to handle things like templated commands. They're in the config, and I really don't want to pass them down as parameters from main.

#2 Updated by Dennis Box 8 months ago

  • Target version set to v1.3.1

#3 Updated by Shreyas Bhat 8 months ago

  • Is duplicate of Feature #20195: Take out viper config from subpackages for jobsub_dropbox_cleanup tool added

#4 Updated by Shreyas Bhat 8 months ago

This is basically a dupe of #20195, but this has more info in it. I'll work off this ticket.

#5 Updated by Shreyas Bhat 3 days ago

  • Status changed from New to Closed

Canceling this ticket. With the advent of the Rapid Code Distribution (via CVMFS) service, this will no longer be necessary. There's no point in upgrading the code for this tool to make it prettier/more readable if it's going to be deprecated.



Also available in: Atom PDF