You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This script fails if the azure-cli repo's path is long.
DEBUG:__main__:Writing python file C:\Users\kkxxxxx\Developer\azure-cli\build_scripts\windows\artifacts\cli\Lib\site-packages\azure\cli\command_modules\network\aaz_compact\latest\network\application_gateway\waf_policy\custom_rule\match_condition\__init__.py
Traceback (most recent call last):
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 464, in <module>
compactor.compact()
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 157, in compact
self.compact_sub_resource_groups(ctx, profile_mod_name)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 187, in compact_sub_resource_groups
self.compact_resource_group(ctx, sub_dir)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 200, in compact_resource_group
self.compact_sub_resource_groups(ctx, dirs)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 187, in compact_sub_resource_groups
self.compact_resource_group(ctx, sub_dir)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 200, in compact_resource_group
self.compact_sub_resource_groups(ctx, dirs)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 187, in compact_sub_resource_groups
self.compact_resource_group(ctx, sub_dir)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 200, in compact_resource_group
self.compact_sub_resource_groups(ctx, dirs)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 187, in compact_sub_resource_groups
self.compact_resource_group(ctx, sub_dir)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 200, in compact_resource_group
self.compact_sub_resource_groups(ctx, dirs)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 187, in compact_sub_resource_groups
self.compact_resource_group(ctx, sub_dir)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 199, in compact_resource_group
self.compact_resource_group_commands(ctx, dirs)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 261, in compact_resource_group_commands
self._write_py_file(os.path.join(compact_folder, '__init__.py'), content=init_content)
File "C:\Users\kkxxxxx\Developer\azure-cli\scripts\compact_aaz.py", line 173, in _write_py_file
py_compile.compile(path)
File "py_compile.py", line 172, in compile
File "<frozen importlib._bootstrap_external>", line 191, in _write_atomic
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\kkxxxxx\\Developer\\azure-cli\\build_scripts\\windows\\artifacts\\cli\\Lib\\site-packages\\azure\\cli\\command_modules\\network\\aaz_compact\\latest\\network\\application_gateway\\waf_policy\\custom_rule\\match_condition\\__pycache__\\__init__.cpython-311.pyc.2276667489168'
This is similar to this bug https://bugs.python.org/issue14599, which is triggered by the long import path. C:\Users\kkxxxxx\Developer\azure-cli\build_scripts\windows\artifacts\cli\Lib\site-packages\azure\cli\command_modules\network\aaz_compact\latest\network\application_gateway\waf_policy\custom_rule\match_condition\__pycache__\__init__.cpython-311.pyc.2276667489168 is 261 chars, which greater than the Maximum Path Length Limitation260 on Windows.
(If you want to write that file in Python, the same error is raised)
If aaz\latest\network\application_gateway\waf_policy\custom_rule\match_condition folder is renamed to aaz\latest\network\application_gateway\waf_policy\custom_rule\match, the error disappears.
The text was updated successfully, but these errors were encountered:
bebound
added
the
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
label
Nov 27, 2023
Describe the bug
This script fails if the
azure-cli
repo's path is long.This is similar to this bug https://bugs.python.org/issue14599, which is triggered by the long import path.
C:\Users\kkxxxxx\Developer\azure-cli\build_scripts\windows\artifacts\cli\Lib\site-packages\azure\cli\command_modules\network\aaz_compact\latest\network\application_gateway\waf_policy\custom_rule\match_condition\__pycache__\__init__.cpython-311.pyc.2276667489168
is 261 chars, which greater than the Maximum Path Length Limitation 260 on Windows.(If you want to write that file in Python, the same error is raised)
If
aaz\latest\network\application_gateway\waf_policy\custom_rule\match_condition
folder is renamed toaaz\latest\network\application_gateway\waf_policy\custom_rule\match
, the error disappears.The text was updated successfully, but these errors were encountered: