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

Dev sanity #16256

Merged
merged 3 commits into from
Jul 10, 2024
Merged

Dev sanity #16256

merged 3 commits into from
Jul 10, 2024

Conversation

ewdurbin
Copy link
Member

A few things to improve local dev.

  • Run more than one gunicorn worker to prevent locking up the server
  • Upgrade all user passwords to argon2 so logins work on first shot
  • Add a known TOTP secret IU7UP3EMIPI7EBPQUUSEHEJUFNBIWOYG for select users

the current setup leads to lots of lockups and hangs.

this _seems_ to have helped for me locally.
this is the root cause of the 'password invalidated by password change' issue on first login in dev.

passlib was upgrading users password hashes to argon and thus the moving the password_date
@ewdurbin ewdurbin requested a review from a team as a code owner July 10, 2024 20:31
@miketheman miketheman added the developer experience Anything that improves the experience for Warehouse devs label Jul 10, 2024
Copy link
Member

@miketheman miketheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looking nice - one question

Makefile Show resolved Hide resolved
@miketheman miketheman merged commit 81717df into main Jul 10, 2024
17 checks passed
@miketheman miketheman deleted the dev_sanity branch July 10, 2024 20:43
@@ -110,7 +111,7 @@ services:

web:
image: warehouse:docker-compose
command: gunicorn --reload --reload-extra-file=warehouse/api/openapi.yaml -b 0.0.0.0:8000 --access-logfile - --error-logfile - warehouse.wsgi:application
command: gunicorn --reload --reload-extra-file=warehouse/api/openapi.yaml -w 4 -b 0.0.0.0:8000 --access-logfile - --error-logfile - warehouse.wsgi:application
Copy link
Member

@miketheman miketheman Jul 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change disabled the debug toolbar, as shown:

/opt/warehouse/lib/python3.12/site-packages/pyramid_debugtoolbar/toolbar.py:244: UserWarning: pyramid_debugtoolbar has detected that the application is being served by a forking / multiprocess web server. The toolbar relies on global state to work and is not compatible with this environment. The toolbar will be disabled.

What was the behavior you observed that led to adding this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops!

I experienced lockups pretty regularly when I had two browsers open with different profiles attempting to interact with the web server.

@di di mentioned this pull request Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience Anything that improves the experience for Warehouse devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants