Skip to content

Commit e85ea9e

Browse files
committed
feedback
1 parent 3ab30f7 commit e85ea9e

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

.github/workflows/ci_consumption_workflow.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
python-version: ${{ matrix.python-version }}
3333
- name: Install dependencies
3434
run: |
35-
python -m pip install --upgrade pip==23.0
35+
python -m pip install --upgrade pip
3636
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre
3737
python -m pip install -U -e .[dev]
3838
if [[ "${{ matrix.python-version }}" != "3.7" ]]; then

.github/workflows/ci_e2e_workflow.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
done
5959
}
6060
61-
python -m pip install --upgrade pip==23.0
61+
python -m pip install --upgrade pip
6262
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre
6363
python -m pip install -U -e .[dev]
6464
if [[ "${{ matrix.python-version }}" != "3.7" ]]; then

.github/workflows/ci_ut_workflow.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ jobs:
5656
done
5757
}
5858
59-
python -m pip install --upgrade pip==23.0
60-
python -m pip install pipdeptree
59+
python -m pip install --upgrade pip
6160
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre
6261
python -m pip install -U -e .[dev]
6362
if [[ "${{ matrix.python-version }}" != "3.7" ]]; then

azure_functions_worker/dispatcher.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ async def _handle__worker_init_request(self, request):
314314
self._function_metadata_exception = ex
315315

316316
try:
317-
if HttpV2Registry.http_v2_enabled(self._functions):
317+
if HttpV2Registry.http_v2_enabled():
318318
capabilities[constants.HTTP_URI] = \
319319
initialize_http_server(self._host)
320320
except Exception as ex:
@@ -689,7 +689,7 @@ async def _handle__function_environment_reload_request(self, request):
689689
except Exception as ex:
690690
self._function_metadata_exception = ex
691691

692-
if HttpV2Registry.http_v2_enabled(self._functions):
692+
if HttpV2Registry.http_v2_enabled():
693693
capabilities[constants.HTTP_URI] = \
694694
initialize_http_server(self._host)
695695

azure_functions_worker/http_v2.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,16 @@ def _pop_http_request(self, invoc_id):
143143
context_ref.http_request = None
144144
return request
145145

146-
raise Exception(f"No http request found for invocation {invoc_id}")
146+
raise ValueError(f"No http request found for invocation {invoc_id}")
147147

148148
def _pop_http_response(self, invoc_id):
149149
context_ref = self._context_references.get(invoc_id)
150150
response = context_ref.http_response
151151
if response is not None:
152152
context_ref.http_response = None
153153
return response
154-
raise Exception(f"No http response found for invocation {invoc_id}")
154+
155+
raise ValueError(f"No http response found for invocation {invoc_id}")
155156

156157

157158
def get_unused_tcp_port():
@@ -184,12 +185,12 @@ async def catch_all(request: request_type): # type: ignore
184185
invoc_id = request.headers.get(X_MS_INVOCATION_ID)
185186
if invoc_id is None:
186187
raise ValueError(f"Header {X_MS_INVOCATION_ID} not found")
187-
logger.info(f'Received HTTP request for invocation {invoc_id}')
188+
logger.info('Received HTTP request for invocation %s', invoc_id)
188189
http_coordinator.set_http_request(invoc_id, request)
189190
http_resp = \
190191
await http_coordinator.await_http_response_async(invoc_id)
191192

192-
logger.info(f'Sending HTTP response for invocation {invoc_id}')
193+
logger.info('Sending HTTP response for invocation %s', invoc_id)
193194
# if http_resp is an python exception, raise it
194195
if isinstance(http_resp, Exception):
195196
raise http_resp
@@ -203,7 +204,7 @@ async def catch_all(request: request_type): # type: ignore
203204
loop.create_task(web_server_run_task)
204205

205206
web_server_address = f"http://{host_addr}:{unused_port}"
206-
logger.info(f'HTTP server starting on {web_server_address}')
207+
logger.info('HTTP server starting on %s', web_server_address)
207208

208209
return web_server_address
209210

@@ -224,7 +225,7 @@ class HttpV2Registry:
224225
_http_v2_enabled_checked = False
225226

226227
@classmethod
227-
def http_v2_enabled(cls, functions=None, **kwargs):
228+
def http_v2_enabled(cls, **kwargs):
228229
# Check if HTTP/2 enablement has already been checked
229230
if not cls._http_v2_enabled_checked:
230231
# If not checked yet, mark as checked

0 commit comments

Comments
 (0)