Fix kustomize units signature
Summary
After the refactoring to use from artifact_utils import * (!3494 (merged)), the ARTIFACT_DIGEST variable was always None when passed to the sign() function.
Root Cause
The variable ARTIFACT_DIGEST is modified dynamically at runtime in artifact_utils.py using the global statement by functions like:
artifact_exists_with_flux()artifact_exists_with_helm()artifact_exists_with_crane()
When using from artifact_utils import ARTIFACT_DIGEST, Python creates a local copy of the variable at import time (initially None). This local copy is never updated when the module-level variable changes via global statements.
Solution
Changed from:
from artifact_utils import *
sign(artifact_name, ARTIFACT_DIGEST) # Always None (local copy)To:
import artifact_utils
from artifact_utils import (...)
sign(artifact_name, artifact_utils.ARTIFACT_DIGEST) # References module variableAdded warning comment:
# WARNING: ARTIFACT_DIGEST is modified at runtime in artifact_utils module via 'global' statement.
# Must use module reference to get the updated value, not direct import.
sign(artifact_name, artifact_utils.ARTIFACT_DIGEST)This ensures that sign() receives the actual digest value set by the artifact existence check functions.