slaclab / pysmurf

Other
2 stars 9 forks source link

Core code unable to ascertain pysmurf software version #773

Closed swh76 closed 1 year ago

swh76 commented 1 year ago

Describe the bug

Post-Ubuntu/software upgrade, the pysmurf core code running in the SMuRF servers is unable to ascertain the SMuRF software release version, resulting in the AMCc:SmurfApplication:SmurfVersion reg being populated with 0+unknown.

This should be populated by versioneer; per guidance here ; https://github.com/python-versioneer/python-versioneer#debugging; am seeing this inside the new server dockers:

cryo@smurf-srv11:$ docker exec -i -t smurf_server_s2 bash
cryo@smurf-srv11:/usr/local/src/pysmurf$ python3 setup.py version
running version
Directory /usr/local/src/pysmurf not under git control
Tried directories ['/usr/local/src/pysmurf', '/usr/local/src', '/usr/local'] but none started with prefix pysmurf-
unable to compute version
Version: 0+unknown
 full-revisionid: None
 dirty: None
 date: None
 error: unable to compute version

and this error when I try to run git commands;

fatal: detected dubious ownership in repository at '/usr/local/src/pysmurf'
To add an exception for this directory, call:

    git config --global --add safe.directory /usr/local/src/pysmurf

It works fine after running the suggested command. Need to fix server docker setup accordingly.