Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with StackClients resource using py4jps 1.0.35 #800

Closed
markushofmeister opened this issue Jun 21, 2023 · 2 comments · Fixed by #805
Closed

Issue with StackClients resource using py4jps 1.0.35 #800

markushofmeister opened this issue Jun 21, 2023 · 2 comments · Fixed by #805
Assignees
Labels
bug Something isn't working python-wrapper Issues relating to py4jps and pyderivationagent

Comments

@markushofmeister
Copy link
Collaborator

The latest release of py4jps seems to affect how additional java resources are installed/loaded.

The ForecastingAgent uses both the JPSBaseLib and StackClients via py4jps. The agent image is build using the following Dockerfile, which includes the installation of the StackClients jar resource from another Docker image using jpsrm :
https://github.com/cambridge-cares/TheWorldAvatar/blob/hotfix-forecasting-agent/Agents/ForecastingAgent/Dockerfile

While this works well for py4jps 1.0.34, using version 1.0.35 fails. The image still builds successfully; however, when trying to launch the java gateway to the StackClients, a file not found error is raised.

@markushofmeister markushofmeister added bug Something isn't working python-wrapper Issues relating to py4jps and pyderivationagent labels Jun 21, 2023
@jb2197
Copy link
Contributor

jb2197 commented Jun 22, 2023

The ForecastingAgent uses both the JPSBaseLib and StackClients via py4jps. The agent image is build using the following Dockerfile, which includes the installation of the StackClients jar resource from another Docker image using jpsrm : https://github.com/cambridge-cares/TheWorldAvatar/blob/hotfix-forecasting-agent/Agents/ForecastingAgent/Dockerfile

Just to make sure the above link can still be resolvable should the PR gets merged, please refer to below instead: https://github.com/cambridge-cares/TheWorldAvatar/blob/4ed5df32d73eb1b9acbb93384995125f85c46725/Agents/ForecastingAgent/Dockerfile

@jb2197
Copy link
Contributor

jb2197 commented Jun 23, 2023

Just for the record:

The root cause is the presence of the StackClients sub-folder in the python_wrapper/py4jps/resources directory of the machine I am making the release. This folder was left there from a previous installation of stack-client in the editable mode of py4jps in one of my environments. However, this folder was not included in the python_wrapper/MANIFEST.in file, which means that only the StackClients.py file is included in the py4jps 1.0.35 package on PyPI, but not the .jar files. (By default, .jar files are ignored unless explicitly specified in the MANIFEST.in file.) Due to the py file being present, the StackClients package is considered to exist in py4jps, which gives the "Info: Resource already exists" message when installing it from the Dockerfile (not actually installed) and subsequently the error encountered when calling it.

The short-term solution is #805. In the long run, we may want to consider the following suggestions at #360.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python-wrapper Issues relating to py4jps and pyderivationagent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants