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

chore: Update worker.config.json to remove debug carets #1654

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

vrdmr
Copy link
Member

@vrdmr vrdmr commented Mar 15, 2025

Description

Enabled the no_debug_ranges flag.

Before

Found Python version 3.11.9 (py).

Azure Functions Core Tools
Core Tools Version:       4.0.6821 Commit hash: N/A +c09a2033faa7ecf51b3773308283af0ca9a99f83 (64-bit)
Function Runtime Version: 4.1036.1.23224

[2025-03-15T02:54:38.203Z] Worker failed to index functions
[2025-03-15T02:54:38.221Z] Result: Failure
Exception: AttributeError: property 'auth_level' of 'MCPFunctionApp' object has no setter  
Stack:   File "C:\Program Files\Microsoft\AzureFunctionsCoreTools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\dispatcher.py", line 469, in _handle__functions_metadata_request
    self.load_function_metadata(
  File "C:\Program Files\Microsoft\AzureFunctionsCoreTools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\dispatcher.py", line 449, in load_function_metadata
    self.index_functions(function_path, function_app_directory)) \
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Microsoft\AzureFunctionsCoreTools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\dispatcher.py", line 822, in index_functions
    indexed_functions = loader.index_function_app(function_path)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Microsoft\AzureFunctionsCoreTools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\utils\wrappers.py", line 44, in call
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Microsoft\AzureFunctionsCoreTools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\loader.py", line 244, in index_function_app
    imported_module = importlib.import_module(module_name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\vameru\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Work\experiments\mcp-functionapp\function_app.py", line 9, in <module>
    app = MCPFunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Work\github-repos\azure-functions-python-extensions\azurefunctions-extensions-mcp-fastapi\azurefunctions\extensions\mcp_server\decorators\mcp_app.py", line 40, in __init__
    self.auth_level = http_auth_level
    ^^^^^^^^^^^^^^^
.

After

Found Python version 3.11.9 (py).

Azure Functions Core Tools
Core Tools Version:       4.0.6821 Commit hash: N/A +c09a2033faa7ecf51b3773308283af0ca9a99f83 (64-bit)
Function Runtime Version: 4.1036.1.23224

[2025-03-15T03:04:40.133Z] Worker failed to index functions
[2025-03-15T03:04:40.139Z] Result: Failure
Exception: AttributeError: property 'auth_level' of 'MCPFunctionApp' object has no setter  
Stack:   File "C:\Program Files\Microsoft\AzureFunctionsCoreTools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\dispatcher.py", line 469, in _handle__functions_metadata_request
    self.load_function_metadata(
  File "C:\Program Files\Microsoft\AzureFunctionsCoreTools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\dispatcher.py", line 449, in load_function_metadata
    self.index_functions(function_path, function_app_directory)) \
  File "C:\Program Files\Microsoft\AzureFunctionsCoreTools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\dispatcher.py", line 822, in index_functions
    indexed_functions = loader.index_function_app(function_path)
  File "C:\Program Files\Microsoft\AzureFunctionsCoreTools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\utils\wrappers.py", line 44, in call
    return func(*args, **kwargs)
  File "C:\Program Files\Microsoft\AzureFunctionsCoreTools\workers\python\3.11\WINDOWS\X64\azure_functions_worker\loader.py", line 244, in index_function_app
    imported_module = importlib.import_module(module_name)
  File "C:\Users\vameru\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Work\experiments\mcp-functionapp\function_app.py", line 9, in <module>
    app = MCPFunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
  File "C:\Work\github-repos\azure-functions-python-extensions\azurefunctions-extensions-mcp-fastapi\azurefunctions\extensions\mcp_server\decorators\mcp_app.py", line 40, in __init__
    self.auth_level = http_auth_level
.
[2025-03-15T03:04:40.662Z] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).

Fixes https://github.com/Azure/azure-functions-pyfx-planning/issues/569


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

@gavin-aguiar gavin-aguiar changed the title Update worker.config.json to remove debug carets chore: Update worker.config.json to remove debug carets Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants