Skip to content

Commit

Permalink
vdk-core: Improve log message for python version disparity (#2250)
Browse files Browse the repository at this point in the history
This change improves the warning log message of the python version
disparity check to be more concise and without unnecessary information.

Testing Done: Local execution of a test job.

Result:

```bash
warning:                     ********************************************************************************
warning:                         What: Python version mismatch between local python and configure python.
warning:                         Why: The Python version specified in the job's config.ini file  is (3.9)
warning:                         while the local python version used to execute the data job is (3.8).
warning:                         Consequences: Developing a data job using one Python version and deploying
warning:                         it with a different version can result in unexpected and
warning:                         difficult-to-troubleshoot errors like module incompatibilities, or
warning:                         unexpected behavior during execution.
warning:                         Countermeasures: To resolve this issue, ensure that the Python version
warning:                         specified in the python_version property of the config.ini file matches
warning:                         the Python version of your execution environment by either editing the
warning:                         python_version property in config.ini, or switching local environment
warning:                         to a matching version of python.
warning:                         
warning:                     ********************************************************************************
```

Signed-off-by: Andon Andonov <[email protected]>
  • Loading branch information
doks5 authored Jun 15, 2023
1 parent 7269d5c commit 45d559e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions projects/vdk-core/src/vdk/internal/builtin_plugins/run/cli_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,18 @@ def __warn_on_python_version_disparity(
log.warning(
f"""
{os.linesep + (' ' * 20) + ('*' * 80)}
Python version ({configured_python_version}), set in the job's config.ini file, is different
from the python version ({local_py_version}) used to execute the data job.
WHAT: python_version is different from the version of the execution
environment.
WHY: The python_version set in the data job's config.ini file is
different from the python version of the execution environment.
CONSEQUENCES: Developing a data job with one python version, and
using a different version for the deployed data job could lead to
unexpected and hard to troubleshoot errors.
COUNTERMEASURES: Please, make sure that the python version set in
the python_version property of the config.ini file is the same as
the python version of your execution environment.
What: Python version mismatch between local python and configure python.
Why: The Python version specified in the job's config.ini file is ({configured_python_version})
while the local python version used to execute the data job is ({local_py_version}).
Consequences: Developing a data job using one Python version and deploying
it with a different version can result in unexpected and
difficult-to-troubleshoot errors like module incompatibilities, or
unexpected behavior during execution.
Countermeasures: To resolve this issue, ensure that the Python version
specified in the python_version property of the config.ini file matches
the Python version of your execution environment by either editing the
python_version property in config.ini, or switching local environment
to a matching version of python.
{os.linesep + (' ' * 20) + ('*' * 80)}
"""
)
Expand Down

0 comments on commit 45d559e

Please sign in to comment.