Skip to content

Make PathResolver errors more configurable

Dan Guest requested to merge dguest/athena:pr-better into 23.0

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 the dev/ area
  • THROW: throw an exception if anyone uses the dev/ area
  • ERROR: print an error, same behavior we get in Athena builds
  • WARNING: print a warning, same behavior that we get in builds where the XAOD_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.

Edited by Dan Guest

Merge request reports

Loading