From 350c98806e7a0fbb554780fa2f8fdcbe346df80e Mon Sep 17 00:00:00 2001
From: lukken <lukken@astron.nl>
Date: Thu, 29 Sep 2022 08:49:03 +0000
Subject: [PATCH] L2SS-951: Finishing touch for documentation

---
 .gitlab-ci.yml                      | 2 +-
 docker-compose/integration-test.yml | 5 +++++
 sbin/run_integration_test.sh        | 4 ++++
 tangostationcontrol/tox.ini         | 6 +++---
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 71459469f..5e7b26942 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: git.astron.nl:5000/lofar2.0/tango/lofar-device-base:l2ss-951
+image: git.astron.nl:5000/lofar2.0/tango/lofar-device-base:latest
 variables:
   GIT_SUBMODULE_STRATEGY: recursive
   PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
diff --git a/docker-compose/integration-test.yml b/docker-compose/integration-test.yml
index 1a856078d..5d27f716a 100644
--- a/docker-compose/integration-test.yml
+++ b/docker-compose/integration-test.yml
@@ -31,6 +31,11 @@ services:
       - --strict
       - --
       - tox -e integration
+# TODO(L2SS-992): Update me to use sitepackages once L2SS-992 is fixed.
+# sitepackages can be enabled for inside docker once pytango is installed from
+# requirements.txt (To ensure reliable builds / all environments same versions)
+# When run outside of docker, environment will be recreated if mismatched
+#      - tox --sitepackages -e integration
     command:
 #     Allow for arguments to be passed that wil be put after the entrypoint
 #     tox is configured to take these arguments as integration test directory
diff --git a/sbin/run_integration_test.sh b/sbin/run_integration_test.sh
index 50e488d50..367d96f7f 100755
--- a/sbin/run_integration_test.sh
+++ b/sbin/run_integration_test.sh
@@ -96,6 +96,10 @@ make stop elk
 
 # Run dummy integration test to install pytango in tox virtualenv without
 # the memory pressure of the ELK stack.
+# Alternatively this step can be avoided if we use:
+# `tox --sitepackages -e integration` for the integration docker container,
+# however, that does require creating a container specific integration job.
+# TODO(L2SS-992): Remove me and above documentation
 integration_test dummy
 
 make start elk
diff --git a/tangostationcontrol/tox.ini b/tangostationcontrol/tox.ini
index f6cedb23e..f4d8ddce0 100644
--- a/tangostationcontrol/tox.ini
+++ b/tangostationcontrol/tox.ini
@@ -6,7 +6,7 @@ skipsdist = True
 [testenv]
 usedevelop = True
 ; Python and tox variables are used to access modules and binaries instead of
-; directly. This is an artifact of having used sitepackages = true in the past.
+; directly. This makes the setup robust for using sitepackages=True.
 install_command = {envbindir}/pip3 install {opts} {packages}
 passenv = HOME
 setenv =
@@ -14,6 +14,8 @@ setenv =
    PYTHONWARNINGS=default::DeprecationWarning
 ; Share the same envdir with as many jobs as possible due to extensive time it
 ; takes to compile the pytango wheel, in addition to its large install size.
+; should the environment change (such as the Python version) the environment
+; will automatically be recreated.
 envdir = {toxworkdir}/testenv
 deps =
     -r{toxinidir}/requirements.txt
@@ -41,8 +43,6 @@ envdir = {toxworkdir}/testenvpy39
 envdir = {toxworkdir}/testenvpy310
 
 [testenv:integration]
-; Warning running integration tests will make changes to your docker system!
-; These tests should only be run by the integration-test docker container.
 allowlist_externals = echo
 passenv = TANGO_HOST
 setenv =
-- 
GitLab