Project

General

Profile

Bug #22876

Exception while running test_runner: KeyError: 'WORKSPACE'

Added by Gianluca Petrillo over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Start date:
07/09/2019
Due date:
% Done:

100%

Estimated time:
Duration:

Description

While trying to update the integration tests for ICARUS, I encountered failure where test_runner would raise the exception in the subject.
This was run on icarusbuild01.fnal.gov, but any GPVM with access to CVMFS should do:

source /cvmfs/icarus.opensciencegrid.org/products/icarus/setup_icarus.sh
setup icaruscode v08_22_00 -q e17:prof
setup lar_ci
test_runner --verbose develop_test_icaruscode

I did have a Fermilab certificate proxy.
This is the full output:
$ source /cvmfs/icarus.opensciencegrid.org/products/icarus/setup_icarus.sh
Setting up LArSoft from "CVMFS":
 - executing '/cvmfs/larsoft.opensciencegrid.org/products/setup'
 - appending '/cvmfs/fermilab.opensciencegrid.org/products/common/db'
Setting up artdaq from "CVMFS":
 - appending '/cvmfs/fermilab.opensciencegrid.org/products/artdaq'
Setting up ICARUS from "CVMFS":
 - prepending '/cvmfs/icarus.opensciencegrid.org/products/icarus'
$ setup icaruscode v08_22_00 -q e17:prof
$ setup lar_ci
$ test_runner --verbose develop_test_icaruscode
Found config:  /cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/generic_ci/v1_8_0/NULL/test/ci_tests.cfg
Found config:  /cvmfs/icarus.opensciencegrid.org/products/icarus/icaruscode/v08_22_00/test/ci_tests.cfg
The current parallel limit is: 5
Test Suite:  develop_test_icaruscode
Expanded:  single_gen_quick_test_icaruscode single_detsim_quick_test_icaruscode single_g4_quick_test_icaruscode compilation_test_icaruscode single_reco_quick_test_icaruscode
      Start  1: single_gen_quick_test_icaruscode
      Start  2: single_g4_quick_test_icaruscode
      Start  3: single_detsim_quick_test_icaruscode
      Start  4: single_reco_quick_test_icaruscode
      Start  5: compilation_test_icaruscode
 1/ 5 Test  #1: single_gen_quick_test_icaruscode ..   Warning    6.81 sec;   38.13 kVs; 231968.00 kb; 
Scaled cpu usage 133.932625 not in 0.000000:120.000000 range
Traceback (most recent call last):
  File "/cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/generic_ci/v1_8_0/NULL/bin/test_runner", line 1252, in <module>
    sys.exit(tr.mainline(testlist))
  File "/cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/generic_ci/v1_8_0/NULL/bin/test_runner", line 1172, in mainline
    self.wait_all()
  File "/cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/generic_ci/v1_8_0/NULL/bin/test_runner", line 932, in wait_all
    r2 = self.wait_parallel()
  File "/cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/generic_ci/v1_8_0/NULL/bin/test_runner", line 923, in wait_parallel
    res = self.run1_finish(p,testname)
  File "/cvmfs/fermilab.opensciencegrid.org/products/common/db/../prd/generic_ci/v1_8_0/NULL/bin/test_runner", line 578, in run1_finish
    ci_stats_file = open(os.environ['WORKSPACE']+"/data_production_stats"+os.environ['ci_cur_exp_name']+".log", "a")
  File "/cvmfs/larsoft.opensciencegrid.org/products/python/v2_7_15a/Linux64bit+2.6-2.12/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'WORKSPACE'

It appears the code expects an environment variable WORKSPACE to be defined, which it is not.

History

#1 Updated by Vito Di Benedetto over 1 year ago

  • Assignee set to Vito Di Benedetto
  • Status changed from New to Work in progress

Gianluca, thank you to report this issue.
This was a known issue that has been fixed in develop branch of generic_ci, but it has not been made in a UPS product yet.
I'm sorry for the inconvenient this is causing.
Next CI release is planned for early August.

In order to get the updated generic_ci code you could checkout and setup it by doing the following:

# do your experiment code setup procedure
cd /your/ci/working/area
git clone http://cdcvs.fnal.gov/projects/generic_ci
cd generic_ci
setup lar_ci
setup -. generic_ci
# now you are ready to use the updated generic_ci code

If you need to setup this code later on, you can run the same, except for the git step.

Hopefully this will solve your issue in the meantime a new release is made available.

#2 Updated by Vito Di Benedetto over 1 year ago

  • % Done changed from 0 to 100
  • Target version set to v1_9_0
  • Status changed from Work in progress to Resolved

CI v1_9_0 declared current on Monday has this issue fixed.

#3 Updated by Vito Di Benedetto over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF