Skip to content

Conversation

@BrianJKoopman
Copy link
Member

Description

This fixes the determination of sodetlib version installed within the pysmurf-controller Docker image. The fix is the same one applied here for pysmurf in one of the base images.

Motivation and Context

The permissions were preventing the determination of the sodetlib version due to dubious ownership of the sodetlib repo checkout. This prevented the actual version being used from showing up in this metadata.

How Has This Been Tested?

Before this patch if you run as the cryo:smurf user within the container, git status does not work and if you try to determine the sodetlib version you would get 0+unknown:

$ docker run --rm -u 1000:1001 -it --entrypoint=/bin/bash pysmurf-controller:test
cryo@9aa8e89c2b5d:/sodetlib$ git status
fatal: detected dubious ownership in repository at '/sodetlib'
To add an exception for this directory, call:

	git config --global --add safe.directory /sodetlib
cryo@9aa8e89c2b5d:/sodetlib$ cd
cryo@9aa8e89c2b5d:~$ python
Python 3.8.10 (default, Mar 18 2025, 20:04:55)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sodetlib
>>> sodetlib.__version__
'0+unknown'

After this patch git status works and the version can be determined.

$ docker run --rm -u 1000:1001 -it --entrypoint=/bin/bash pysmurf-controller:patch
cryo@c714628d7683:/sodetlib$ git status
Not currently on any branch.
nothing to commit, working tree clean
cryo@c714628d7683:/sodetlib$ cd
cryo@c714628d7683:~$ python
Python 3.8.10 (default, Mar 18 2025, 20:04:55)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sodetlib
>>> sodetlib.__version__
'0.5.6'

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

…fely

The permissions otherwise were preventing the determination of the sodetlib
version due to dubious ownership of the sodetlib repo checkout.
@BrianJKoopman BrianJKoopman merged commit 108b21e into main Nov 14, 2025
5 checks passed
@BrianJKoopman BrianJKoopman deleted the koopman/sodetlib-version-check-fix branch November 14, 2025 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant