Skip to content

Commit 685caf1

Browse files
authored
fix: 3.13 debug logging, error message typo, remove unhelpful warning log (#1799)
* minor fixes * flake
1 parent ea12fd2 commit 685caf1

File tree

9 files changed

+13
-10
lines changed

9 files changed

+13
-10
lines changed

eng/templates/official/jobs/publish-library-release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
dependsOn: ['CheckGitHubRelease']
5858
displayName: 'PyPI Package'
5959
steps:
60+
- script: |
61+
echo "##vso[task.setvariable variable=BranchName]refs/heads/${{ parameters.BRANCH_NAME }}/$(NewLibraryVersion)"
62+
displayName: 'Set branch variable'
6063
- task: DownloadPipelineArtifact@2
6164
displayName: 'Download Python V2 Library release-*/x.y.z Artifact'
6265
inputs:
@@ -65,7 +68,7 @@ jobs:
6568
definition: 652
6669
specificBuildWithTriggering: true
6770
buildVersionToDownload: latestFromBranch
68-
branchName: 'refs/heads/${{ parameters.BRANCH_NAME }}/$(NewLibraryVersion)'
71+
branchName: '$(BranchName)'
6972
targetPath: PythonRuntimeArtifact
7073
- task: UsePythonVersion@0
7174
displayName: 'Use Python 3.13'

eng/templates/official/jobs/publish-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ jobs:
127127
((Get-Content test\WebJobs.Script.Tests\WebJobs.Script.Tests.csproj) -replace "PythonWorker`" Version=`"(\d)+.(\d)+.(\d)+.?(\d)*`"","PythonWorker`" Version=`"$newWorkerVersion`"" -join "`n") + "`n" | Set-Content -NoNewline test\WebJobs.Script.Tests\WebJobs.Script.Tests.csproj
128128
129129
# Modify release_notes.md
130-
Write-Host "Adding a new entry in release_note.md"
131-
((Get-Content release_notes.md) -replace "-->","$&`n- Update Python Worker Version to [$newWorkerVersion](https://github.com/Azure/azure-functions-python-worker/releases/tag/$newWorkerVersion)" -join "`n") + "`n" | Set-Content -NoNewline release_notes.md
130+
Write-Host "Adding a new entry in release_notes.md"
131+
Add-Content -Path release_notes.md -Value "`n- Update Python Worker Version to [$newWorkerVersion](https://github.com/Azure/azure-functions-python-worker/releases/tag/$newWorkerVersion)"
132132
133133
# Commit Python Version
134134
Write-Host "Pushing $newBranch to host repo"

runtimes/v1/azure_functions_runtime_v1/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def validate_function_params(params: dict, bound_params: dict,
135135
raise FunctionLoadError(
136136
func_name,
137137
'the following parameters are declared in function.json but '
138-
'not in Python: ' + repr(set(params) - set(bound_params)))
138+
'not in Python: ' + repr(set(bound_params) - set(params)))
139139

140140
input_types: typing.Dict[str, ParamTypeInfo] = {}
141141
output_types: typing.Dict[str, ParamTypeInfo] = {}

runtimes/v1/azure_functions_runtime_v1/handle_event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ async def function_environment_reload_request(request):
276276
os.environ[var] = env_vars[var]
277277

278278
if is_envvar_true(PYTHON_ENABLE_DEBUG_LOGGING):
279-
root_logger = logging.getLogger("azure.functions")
279+
root_logger = logging.getLogger()
280280
root_logger.setLevel(logging.DEBUG)
281281

282282
# calling load_binding_registry again since the

runtimes/v2/azure_functions_runtime/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def validate_function_params(params: dict, bound_params: dict,
160160
func_name,
161161
'Extra parameters in binding definition — the following parameters '
162162
'are declared as bindings but are not '
163-
'present in Python: ' + repr(set(params) - set(bound_params)))
163+
'present in Python: ' + repr(set(bound_params) - set(params)))
164164

165165
input_types: typing.Dict[str, ParamTypeInfo] = {}
166166
output_types: typing.Dict[str, ParamTypeInfo] = {}

runtimes/v2/azure_functions_runtime/handle_event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ async def function_environment_reload_request(request):
326326
# TODO: Apply PYTHON_THREADPOOL_THREAD_COUNT
327327

328328
if is_envvar_true(PYTHON_ENABLE_DEBUG_LOGGING):
329-
root_logger = logging.getLogger("azure.functions")
329+
root_logger = logging.getLogger()
330330
root_logger.setLevel(logging.DEBUG)
331331

332332
# calling load_binding_registry again since the

workers/azure_functions_worker/utils/dependency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def _remove_module_cache(path: str):
405405
if any([p for p in module_paths if p.startswith(path)]):
406406
sys.modules.pop(module_name)
407407
except Exception as e:
408-
logger.warning(
408+
logger.debug(
409409
'Attempt to remove module cache for %s but failed with '
410410
'%s. Using the original module cache.',
411411
module_name, e)

workers/proxy_worker/utils/dependency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def _remove_module_cache(path: str):
302302
if any([p for p in module_paths if p.startswith(path)]):
303303
sys.modules.pop(module_name)
304304
except Exception as e:
305-
logger.warning(
305+
logger.debug(
306306
'Attempt to remove module cache for %s but failed with '
307307
'%s. Using the original module cache.',
308308
module_name, e)

workers/proxy_worker/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33

4-
VERSION = "4.40.2"
4+
VERSION = '4.40.2'

0 commit comments

Comments
 (0)