Content-Length: 132397 | pFad | http://phabricator.wikimedia.org/T365096

s ⚓ T365096 Adding new (nonexistent) members to Cloud VPS project fails without useful feedback
Page MenuHomePhabricator

Adding new (nonexistent) members to Cloud VPS project fails without useful feedback
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Go to page https://horizon.wikimedia.org/project/member/
  • Login
  • Select correct project (in my case "Imagehash")
  • Click "Add user" button to open a "Add a project reader" dialog
  • Fill user name and shell name and click "Add user"

What happens?:

  • Add user dialog closes and after slight delay there is top right corner message "Danger: There was error submitting the form. Please try again."
  • In browser console there is information that request failed with "500 Server error"

What should have happened instead?:
User should have been added

Other information (browser name/version, screenshots, etc.):

Mac os : 14.4.1 (23E224)
Browser version: Safari Version 17.4.1 (19618.1.15.11.14)

One of the error messages should be done at Thu, 16 May 2024 07:33:48 GMT (time is taken from error message server response headers)

Event Timeline

@Andrew, this seems related to the recent Horizon Django upgrade:

[Thu May 16 07:06:34.034090 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838] Internal Server Error: /project/member/add/
[Thu May 16 07:06:34.034114 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838] Traceback (most recent call last):
[Thu May 16 07:06:34.034117 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/django/core/handlers/exception.py", line 55, in inner
[Thu May 16 07:06:34.034118 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     response = get_response(request)
[Thu May 16 07:06:34.034120 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/django/core/handlers/base.py", line 197, in _get_response
[Thu May 16 07:06:34.034122 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Thu May 16 07:06:34.034123 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/horizon/decorators.py", line 51, in dec
[Thu May 16 07:06:34.034124 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     return view_func(request, *args, **kwargs)
[Thu May 16 07:06:34.034125 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/horizon/decorators.py", line 35, in dec
[Thu May 16 07:06:34.034144 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     return view_func(request, *args, **kwargs)
[Thu May 16 07:06:34.034145 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/horizon/decorators.py", line 35, in dec
[Thu May 16 07:06:34.034146 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     return view_func(request, *args, **kwargs)
[Thu May 16 07:06:34.034147 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/horizon/decorators.py", line 111, in dec
[Thu May 16 07:06:34.034149 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     return view_func(request, *args, **kwargs)
[Thu May 16 07:06:34.034150 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/django/views/generic/base.py", line 104, in view
[Thu May 16 07:06:34.034151 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     return self.dispatch(request, *args, **kwargs)
[Thu May 16 07:06:34.034152 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/django/views/generic/base.py", line 143, in dispatch
[Thu May 16 07:06:34.034154 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     return handler(request, *args, **kwargs)
[Thu May 16 07:06:34.034155 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/django/views/generic/edit.py", line 152, in post
[Thu May 16 07:06:34.034156 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     if form.is_valid():
[Thu May 16 07:06:34.034158 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/django/forms/forms.py", line 201, in is_valid
[Thu May 16 07:06:34.034159 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     return self.is_bound and not self.errors
[Thu May 16 07:06:34.034160 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/django/forms/forms.py", line 196, in errors
[Thu May 16 07:06:34.034161 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     self.full_clean()
[Thu May 16 07:06:34.034163 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/django/forms/forms.py", line 434, in full_clean
[Thu May 16 07:06:34.034166 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     self._clean_form()
[Thu May 16 07:06:34.034168 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/django/forms/forms.py", line 455, in _clean_form
[Thu May 16 07:06:34.034169 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     cleaned_data = self.clean()
[Thu May 16 07:06:34.034170 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]   File "/opt/lib/python/site-packages/wikimediamemberdashboard/views.py", line 180, in clean
[Thu May 16 07:06:34.034172 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838]     if cleaned_data['username'] and cleaned_data['shellname']:
[Thu May 16 07:06:34.034173 2024] [wsgi:error] [pid 8:tid 139706610005760] [remote 208.80.154.150:59838] KeyError: 'shellname'

Is there any timetable when this is fixed (or is there alternative methods to add project members)?

Hello @Zache

I'm unable to reproduce this issue, and I'm a bit surprised by the .mov you attached -- when I use that interface I'm unable to enter both username and shellname; if I do that I get a quick message in the dialog, 'Please specify only one of username and shell name.' If I only do one or the other then I'm able to add the user.

It's possible that some service was down when you tried this, would you be willing to try again?

Also, just to double-check: the user you're adding already has a developer account, correct?

Hi Andrew,

I tested it second time at this week at it still failed so it was not random insident. I added the browser information to the ticket (OS X Safari) if it helps.

User has developer account and has toolforge account. (https://wikitech.wikimedia.org/wiki/User_talk:Ipr1). However it is possible that this is case sensitivy error: ipr1 vs Ipr1 if the system is picky about this. (Based on video i used Ipr1 from wiki account)

I can try again at monday when i am with my Two-factor authentication device.

Ok, now i tested the adding user to the project. So shell name is case sensitive and it worked when i filled only one of the values.

Failed with 500 server error:

  • Username: Ipr1
  • Shell name: Ipr1

Failed with validation error message "Please specify only one of username and shell name."

  • Username: Ipr1
  • Shell name: ipr1

Worked

  • Username: Ipr1
  • Shell name:

Change #1037609 had a related patch set uploaded (by Andrew Bogott; author: Andrew Bogott):

[operations/puppet@production] codfw1dev: update horizon release

https://gerrit.wikimedia.org/r/1037609

Change #1037609 merged by Andrew Bogott:

[operations/puppet@production] codfw1dev: update horizon release

https://gerrit.wikimedia.org/r/1037609

Change #1037797 had a related patch set uploaded (by Andrew Bogott; author: Andrew Bogott):

[operations/puppet@production] Horizon: update eqiad1 release

https://gerrit.wikimedia.org/r/1037797

Change #1037797 merged by Andrew Bogott:

[operations/puppet@production] Horizon: update eqiad1 release

https://gerrit.wikimedia.org/r/1037797

Andrew renamed this task from Adding new members to Cloud VPS project fails to Adding new (nonexistent) members to Cloud VPS project fails.May 31 2024, 2:09 PM
Andrew renamed this task from Adding new (nonexistent) members to Cloud VPS project fails to Adding new (nonexistent) members to Cloud VPS project fails without useful feedback.
Andrew closed this task as Resolved.

Thanks for the followup @Zache . I've re-titled this task to reflect what I now think is the issue, which is: error handling on bad user input. I've deployed a small fix which I think resolves the bad behavior you're seeing. Please re-open if you're still seeing incoherent behavior.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://phabricator.wikimedia.org/T365096

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy