Azure-Samples / Azure-Python-Standardization-Template-Generator

The source repository for the space tourism templates for Python web apps for Azure
MIT License
7 stars 2 forks source link

Windows tests fail due to call method being manually set to spawn. #17

Closed kjaymiller closed 8 months ago

kjaymiller commented 8 months ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

gunicorn.py is being tested but returns an error. This testshow the application is called in Azure.

Minimal steps to reproduce

using FastAPI Postgres * ACA python -m pytest

Any log messages given by the failure

C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\multiprocessing\context.py:193: in get_context raise ValueError('cannot find context for %r' % method) from None E ValueError: cannot find context for 'fork' =========================== short test summary info

Expected/desired behavior

tests should pass like other os's

OS and Version?

Windows Latest Version as ran by Github Action

Versions

python versions 3.8-3.12

Mention any other details that might be useful

Some repose have suggested that we set our call method to spawn. that said we've intentionally set it to fork to deal with other issues that we've run into.

I suggest that we either check the operating system or add an option in the test call.


Thanks! We'll be in touch soon.

kjaymiller commented 8 months ago

correction: the value to change based on the OS is set_start_method