mattp- opened a new pull request, #54510:
URL: https://github.com/apache/airflow/pull/54510
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
<!-- Please keep an empty line above the dashes. -->
fixes stacktraces of the form in standalone & running directly for the
components that launch logserver under a multiprocessing process:
```
scheduler | Process SpawnProcess-1:1:
scheduler | Traceback (most recent call last):
scheduler | File "/opt/bb/lib/python3.10/multiprocessing/process.py",
line 314, in _bootstrap
scheduler | self.run()
scheduler | File "/opt/bb/lib/python3.10/multiprocessing/process.py",
line 108, in run
scheduler | self._target(*self._args, **self._kwargs)
scheduler | File
"/mnt/dev/repos/airflow/.venv/lib/python3.10/site-packages/uvicorn/_subprocess.py",
line 73, in subprocess_started
scheduler | sys.stdin = os.fdopen(stdin_fileno) # pragma: full coverage
scheduler | File "/opt/bb/lib/python3.10/os.py", line 1030, in fdopen
scheduler | return io.open(fd, mode, buffering, encoding, *args,
**kwargs)
scheduler | OSError: [Errno 9] Bad file descriptor
```
there is a bug in uvicorn that causes a crash when uvicorn.run is being
spawned from a process that itself was spawned by multiprocessing, as we do
with serve_logs: https://github.com/encode/uvicorn/issues/2679
until uvicorn itself fixes what it tries to do with stdin, just use 1 worker
instead of 2 to avoid the codepath that causes the break.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]