Make PathResolver errors more configurable
This will have absolutely no effect on current workflows, it just adds some options.
Path resolver likes to spit warnings when you look for files in the dev/
area. That's (kind of) ok, but a lot of us are using the dev/
area on purpose which makes it really confusing for newcommers. It would be nice to have the option to turn them off.
Worse is that when you build exactly the same code in an Athena
release the WARNING
becomes an ERROR
. This really confuses people. I understand the reasoning (we grep the log files for ERROR
and use this to kill production jobs) but it seems like we could handle these errors more directly.
I added some configuration via an environment variable (PATHRESOLVER_DEVAREARESPONSE
). Since PathResolver
is a set of functions there's not a great way to further configure the behavior otherwise. The default behavior is unchanged, but there are several options:
-
DEFAULT
: same as now, just explicitly set via the environment variable -
SILENT
: no warnings or errors for using thedev/
area -
THROW
: throw an exception if anyone uses thedev/
area -
ERROR
: print an error, same behavior we get in Athena builds -
WARNING
: print a warning, same behavior that we get in builds where theXAOD_ANALYSIS
macro is set -
INFO
: print info, because why not add this option too?
I think the THROW
case might be useful for production if we want the error to appear more directly in the future, but that's for later discussion.