Conversation
fbede8b to
a60d501
Compare
Nishnha
left a comment
There was a problem hiding this comment.
Love the idea of a global level logger.
This all makes sense so far. I think you'll also need to define a way for the debug flag to be set on a job, but that's probably an API change?
I find it kind of weird that the CLI uses a job ID of cli instead of another flag to indicate its environment, but I guess that's a separate issue.
There was a problem hiding this comment.
!!nil returns false here but this is kind of a weird way to do it?
There was a problem hiding this comment.
Yeah, the "double-bang operator" is an idiom in Ruby to force any type into Boolean but I do always feel odd about using it over the present? helper - but that's a Rails-isim we don't have in Core as we don't want to include ActiveSupport anymore.
There was a problem hiding this comment.
where is be_debug_enabled defined?
There was a problem hiding this comment.
Ah, this is an RSpec-isim, be_debug_enabled is translated to environment.debug_enabled? to be true under the hood.
Yeah, the context on that is that the Updater code path has a hard expectation that |
Co-authored-by: Nish Sinha <nishnha@github.com>
17bd8f6 to
43652c7
Compare
Yeah, this should be everything we need in Core, we can add debug flag setters to the various entry points like the |
This branch extracts a couple of tidy ups from some ongoing work to prepare the Dependabot::Updater to receive our prototype grouped updating strategy.
While splitting the updater up into discrete classes, there were two cross-cutting pain points:
Dependabot::Environmentobject as we start to extract code.Environmentobject should never be part of Core but some of the Updater strategies we are extracting should become Core-bound eventually so ecosystems can override themDependabot.loggeris wrapped inlogger_infoandlogger_errormethods in two levels of abstraction, the "Command" class and the Updater itself to inject ajob_idprefixDependabot::Environmentabout a debug flag so we can default to :info, but optionally invoke :debugService Changes
DEPENDABOT_DEBUGenvvar, when 'true' it will set the log level to :debug.job.debug = truevalue to set the log level on a job-by-job basis