In version ArcGIS Pro 2.9,3.0 and 3.1 the following structure of a web tool worked as intended when it was staged, in order to be published in ArcGIS Enterprise:
Updm2018 └── TestService.atbx ├ __init__.py ├ MyTestService.py ├ foo.py └──bar ├ __init__.py ├ real_bar.py ├ file_required_by_baz.json └─ baz.py The definition was staged using the StageService function and the .sd file will include the required files.
In the version 3.3 it does not behave as it used to do it, now the referenced modules in subfolders are not consolidated.
Note: I also tried using the Save As Offline Service Definition tool:
It is worth to mention that the file MyTestService.py include the imports:
… import foo from bar import realbar from bar import baz … Execution of the tool StageService in ArcGIS Pro 3.3.1 generates an .sd file with the following structure (.sd file is just a zip file):
│ manifest.xml │ serviceconfiguration.json │ tilingservice.xml │ ├───cd │ └───updm2018 │ foo.py │ MyTestService.py │ TestService.atbx │ ├───esriinfo │ │ iteminfo.xml │ │ │ └───metadata │ metadata.xml │ └───p30 MyTestService.msd MyTestService.rltx MyTestService.tbx There are missing files required by the tool to properly run:
real_bar.py file_required_by_baz.json baz.py Following the indications of the documentation , it should be possible to do it. As a matter of fact it has been working with out any issue, until this version.
Am I missing some new configuration in the staging process?


file_required_by_baz.json, where is the reference? I could be wrong, but I thought only files referenced from the main script were consolidated. Not a file referenced from a consolidated file (however I could be wrong in this point)baz.py. I can confirm you that files referenced by other consolidated files were consolidated too in version 3.0 and 3.1 of ArcGIS Pro.