Project

General

Profile

Bug #23225

archiveRunConfiguration doesn't let calling programs know it wasn't able to save a FHiCL document

Added by John Freeman about 1 month ago. Updated about 1 month ago.

Status:
Reviewed
Priority:
Normal
Category:
artdaq-database
Target version:
-
Start date:
09/04/2019
Due date:
% Done:

100%

Estimated time:
Experiment:
-
Co-Assignees:
Duration:

Description

Just a little while ago I filed DAQInterface Issue #23244, since under certain circumstances DAQInterface creates a boot.fcl file which contains illegal FHiCL syntax and consequently doesn't get saved to the database. I only uncovered this as part of regression testing and was trying to figure out why this problem had flown under the radar; what I discovered is that the archiveRunConfiguration function from conftool returns True even if it can't save boot.fcl and prints out an error message:

Caught fhicl::exception message=---- Parse error BEGIN
  detected at or near line 28, character 35, of file "-" 

  trigcand600_tpwindow_inputs_keys: "["felix601","felix602","felix603","felix604","felix605","felix606","felix607","felix608","felix609","felix610"]" 
                                    ^
---- Parse error END

While a message like this is useful for a human to read, for a calling program like DAQInterface, there should be another way to alert it that there was a problem. DAQInterface assumes that if archiveRunConfiguration returns True, then there wasn't a problem, but that doesn't appear to be the case.

History

#1 Updated by John Freeman about 1 month ago

Correction - by "Issue #23244" I actually meant Issue #23224

#2 Updated by Gennadiy Lukhanin about 1 month ago

  • % Done changed from 0 to 90
  • Status changed from New to Work in progress

Fixed error reporting in the bulkloader and bulkdownloader applications.

Please follow the steps below to test this bugfix.

  1. Install the e17:s82:prof variant of artdaq_demo v3_06_00.
  2. Download and install artdaq_database v1_4_76 with the same qualifiers from scisoft.
    1. https://scisoft.fnal.gov/scisoft/packages/artdaq_database/v1_04_76/
  3. Open two shells and setup artdaq_database in both of them.
    1. source [your-artdaq-products-area]/setup
    2. setup artdaq_database v1_04_76 -q e17:prof:s82
    3. export ARTDAQ_DATABASE_URI=mongodb://127.0.0.1/artdaqtest_db
  4. In the first shell start mongodb.
    1. mkdir -p $HOME/database/mongodb
    2. mongod --dbpath=$HOME/database/mongodb --bind_ip=127.0.0.1
    3. leave mongod running in the foreground
  5. Switch to the second shell, which will be used for running conftool.py and confirm that the test database is accessible.
    1. conftool.py readDatabaseInfo
  6. Create a working directory for configuration files and copy a test configuration into it.
    1. mkdir -p $HOME/database/work-dir/aa/
    2. cp -r [your-test-configuration] $HOME/database/work-dir/aa/
    3. cd $HOME/database/work-dir/aa/
  7. Archive your good configuration into the run history database.
    1. conftool.py archiveRunConfiguration mygoodconfig 1
    2. confirm that the last printed line says "True" and the "echo $?" prints "0"
  8. Now change the contents of any configuration file in the $HOME/database/work-dir/aa/ directory to be invalid fhicl.
  9. Archive your broken configuration into the run history database.
    1. conftool.py archiveRunConfiguration mybrokenconfig 1
    2. confirm that the last printed line says "False" and the "echo $?" prints "1"

#3 Updated by Gennadiy Lukhanin about 1 month ago

  • % Done changed from 90 to 100
  • Status changed from Work in progress to Resolved

#4 Updated by John Freeman about 1 month ago

  • Status changed from Resolved to Reviewed

I've confirmed that following the steps outlined above I get the expected result.



Also available in: Atom PDF