SIGN IN SIGN UP

fix: bound user_info_server prompt loops + allow .local in deliverability test

Two related issues, both surfaced when running the regression suite
non-interactively:

1. user_info_server()'s while-not-validate retry loops had no upper
   bound. With a mocked or closed stdin (test mocks, EOF in CI/cron,
   typo'd PGADMIN_SETUP_EMAIL=''), the loop would call input()/pprompt()
   forever, printing 'Invalid email address. Please try again.' on
   every iteration. We saw this manifest as a 13.5 million-line
   25 GB log when test_no_email_deliverability hit the case.

   Cap each loop at MAX_PROMPT_ATTEMPTS=5 and raise RuntimeError with a
   pointer to PGADMIN_SETUP_EMAIL/PASSWORD env vars on exhaustion.

2. test_no_email_deliverability included pg@postgres.local in its
   "should be accepted with deliverability=False" data set. The .local
   suffix is in email_validator.SPECIAL_USE_DOMAIN_NAMES which fails
   syntactic validation regardless of the deliverability flag, so
   validate_email always rejected it - looping forever pre-fix #1.

   Set config.ALLOW_SPECIAL_EMAIL_DOMAINS = ['local'] in the test's
   try/finally block so .local is allowed for this scenario, restored
   afterward to avoid leaking state into other tests.

With both fixes in place, the test can be removed from the regression
runtests --exclude list.
A
Ashesh Vashi committed
ddc371adf780a4ae60a45bfa53418a1d31686770
Parent: 0fad04d