DUNE-DAQ / daq-buildtools

Make life for developers easier through a collection of CMake functions and scripts
0 stars 1 forks source link

Using existing python venv in cvmfs for a release #163

Closed dingp closed 3 years ago

dingp commented 3 years ago

This PR contains the following changes/additions:

  1. adding bin/clonevirtualenv.py and scripts/dbt-clone-pyvenv.sh for cloning existing python virtual environment to another directory;
  2. adding a -c option to dbt-create.sh, which will clone the pyvenv instead of creating one using the requirements file;
  3. adding dbt-setup-release function to env.sh, which calls the newly added script `scripts/dbt-setup-release.sh; this is to enable developers setting up a running environment using the release in cvmfs together with the existing pyvenv.

Two tests suggested for this PR:

jcfreeman2 commented 3 years ago

Thanks for the test suggestions. Here are the results of the tests on mu2edaq13; I have a couple of refactoring-related comments after them.

Test one, everything worked fine (build cmdlib + appfwk, created an mdapp_fake directory) up until the nanorc test. When I tried running the nanorc test as described in the minidaqapp documentation I got this right after the nanorc intro message:

Running on the apparatus mdapp_fake:
mdapp_fake
└── mdapp_fake
[11:02:40] WARNING  NanoRC context cleanup: Terminating RC before exiting

i.e., nanorc basically didn't do anything.

For test two, I was again able to create an mdapp_fake subdirectory, but when I ran nanorc I got this:

[11:08:40] ERROR    Failed to build NanoRC
ValueError: Key DBT_AREA_ROOT is not in environment and no default specified!

and when I set DBT_AREA_ROOT to the work area I created for test one, I recreated test one's problem.

Now, for a couple of refactoring suggestions: -Since PROD_BASEPATH and NIGHTLY_BASEPATH are now both used in dbt-create.sh and dbt-setup-release.sh, they strike me as good candidates for addition to the dbt-setup-constants.sh file -There are some typos: "where another running evelopment", "by cloing"

dingp commented 3 years ago

Got the same error WARNING NanoRC context cleanup: Terminating RC before exiting cli.py:124 using daq-buildtools v4.0.0 on mu2edaq13 and np04-srv-015. Note that, I am not using the cloned env in both of these tests.

The issue looks more likely connected to the new version of nanorc.