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

Gitlab Integration: Show only first page of a project #14928

Closed
yevhenkizin opened this issue Oct 3, 2019 · 9 comments
Closed

Gitlab Integration: Show only first page of a project #14928

yevhenkizin opened this issue Oct 3, 2019 · 9 comments

Comments

@yevhenkizin
Copy link

yevhenkizin commented Oct 3, 2019

Important Details

  • Sentry On-Premise, v 9.1.2

  • OS: Ubuntu 16.04.5 LTS
    DB: PostgreSQL 10.6 (Ubuntu 10.6-1.pgdg18.04+1)
    Other: Redis server v=3.0.6
    Python 2.7.12

    Installed packages:

anyjson==0.3.3
asn1crypto==0.24.0
attrs==18.2.0
BeautifulSoup==3.2.1
billiard==3.3.0.23
boto3==1.4.5
botocore==1.5.70
celery==3.1.18
certifi==2018.11.29
cffi==1.11.5
chardet==3.0.4
click==6.7
contextlib2==0.5.5
cryptography==2.4.2
cssselect==1.0.3
cssutils==0.9.10
Django==1.6.11
django-crispy-forms==1.4.0
django-jsonfield==0.9.13
django-picklefield==0.3.2
django-sudo==2.1.0
django-templatetag-sugar==1.0
djangorestframework==2.4.8
docutils==0.14
email-reply-parser==0.2.0
enum34==1.1.6
exam==0.10.6
funcsigs==1.0.2
functools32==3.2.3.post2
futures==3.2.0
hiredis==0.1.6
honcho==1.0.1
httplib2==0.12.0
idna==2.6
ipaddress==1.0.22
jmespath==0.9.3
jsonschema==2.6.0
kombu==3.0.35
loremipsum==1.0.5
lxml==4.2.5
meld3==1.0.2
milksnake==0.1.5
mmh3==2.3.1
mock==2.0.0
more-itertools==4.3.0
oauth2==1.9.0.post1
olefile==0.46
parsimonious==0.8.0
pbr==5.1.1
percy==2.0.1
petname==2.0
Pillow==4.2.1
pluggy==0.6.0
progressbar2==3.10.1
psycopg2==2.7.6.1
py==1.7.0
pycparser==2.19
PyJWT==1.5.3
pyOpenSSL==18.0.0
pytest==3.5.1
pytest-django==2.9.1
pytest-html==1.9.0
python-apt==1.1.0b1+ubuntu0.16.4.5
python-dateutil==2.7.5
python-memcached==1.59
python-openid==2.2.5
python-u2flib-server==4.0.1
python-utils==2.3.0
pytz==2018.7
PyYAML==3.11
qrcode==5.3
querystring-parser==1.2.3
raven==6.4.0
rb==1.7
redis==2.10.5
redis-py-cluster==1.3.6
requests==2.18.4
s3transfer==0.1.13
selenium==3.11.0
semaphore==0.1.3
sentry==9.0.0
setproctitle==1.1.10
simplejson==3.8.2
six==1.10.0
sqlparse==0.1.19
statsd==3.1
strict-rfc3339==0.7
structlog==16.1.0
supervisor==3.2.0
symbolic==5.7.6
toronado==0.0.11
ua-parser==0.7.3
unidiff==0.5.5
urllib3==1.22
uWSGI==2.0.17.1
virtualenv==16.1.0

Description

I have problem with Gitlab integration. After addition group, Sentry show only first page with repositories, and I can not add repo from second page, when I link issue.
On page Settings - Repositories work some duty hack - I correct post request, and manual change repo ID

Steps to Reproduce

  1. Create Inegration with GitLab on Settings - Integrations
  2. Open project, select issue and open error, open Link GitLab Issue. On opened dropdown, try select GitLab repository

Good items to include here include:

Nothing to help with this problem, onle errors with Сelery:

Oct  3 14:22:45 sentry-io supervisord: sentry-worker 11:22:45 [WARNING] celery.worker.job: Soft time limit (60s) exceeded for sentry.tasks.store.process_event[b8f84dd9-7edd-4d22-a31a-62afd558565e]
Oct  3 14:22:45 sentry-io supervisord: sentry-worker Traceback (most recent call last):
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/sentry/http.py", line 202, in fetch_file
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     for chunk in response.iter_content(16 * 1024):
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/requests/models.py", line 750, in generate
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     for chunk in self.raw.stream(chunk_size, decode_content=True):
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/urllib3/response.py", line 494, in stream
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     data = self.read(amt=amt, decode_content=decode_content)
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/urllib3/response.py", line 442, in read
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     data = self._fp.read(amt)
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/usr/lib/python2.7/httplib.py", line 622, in read
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     s = self.fp.read(amt)
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/usr/lib/python2.7/socket.py", line 384, in read
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     data = self._sock.recv(left)
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py", line 291, in recv
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     return self.recv(*args, **kwargs)
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py", line 291, in recv
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     return self.recv(*args, **kwargs)
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py", line 288, in recv
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     if not util.wait_for_read(self.socket, self.socket.gettimeout()):
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/urllib3/util/wait.py", line 143, in wait_for_read
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     return wait_for_socket(sock, read=True, timeout=timeout)
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/urllib3/util/wait.py", line 104, in poll_wait_for_socket
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     return bool(_retry_on_intr(do_poll, timeout))
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/urllib3/util/wait.py", line 53, in _retry_on_intr
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     return fn(timeout)
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/urllib3/util/wait.py", line 102, in do_poll
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     return poll_obj.poll(t)
Oct  3 14:22:45 sentry-io supervisord: sentry-worker   File "/home/sentry/sentry_app/local/lib/python2.7/site-packages/billiard/pool.py", line 235, in soft_timeout_sighandler
Oct  3 14:22:45 sentry-io supervisord: sentry-worker     raise SoftTimeLimitExceeded()
Oct  3 14:22:45 sentry-io supervisord: sentry-worker SoftTimeLimitExceeded: SoftTimeLimitExceeded()
Oct  3 14:22:45 sentry-io supervisord: sentry-worker 11:22:45 [ERROR] sentry.http: SoftTimeLimitExceeded()
@markstory
Copy link
Member

You should be able to use the typeahead feature of the selectbox to find the project you want.

@yevhenkizin
Copy link
Author

@markstory Alas, choosing in this way is also not possible

@manuzope
Copy link
Contributor

manuzope commented Oct 23, 2020

Hmmm, typeahead should work for this. I can't replicate this problem.

Are AJAX requests being made to the backend when you start typing?

We use gitlab's API to get a list of repos: https://github.com/getsentry/sentry/blob/master/src/sentry/integrations/gitlab/client.py#L125-L139 (link for 9.1.2) so might be useful to put some debug messages there to see what responses we're getting from Gitlab.

It doesn't have anything to do with Celery so I think we can ignore that error.

@manuzope
Copy link
Contributor

Or maybe the problem is that the repository is in a subgroup, as fixed here: #15178?

In which case, you'd have to upgrade from 9.1.2

@MadLittleMods
Copy link

The typeahead does seem to work with Sentry 9.1.2 and GitLab.com but is unintuitive and I didn't realize this was possible until I came to this issue.

There is also an odd delay with the remote typeahead where it shows "No repositories found" in between until the request comes back.

@manuzope
Copy link
Contributor

Hmmm, agree that the lag and showing "No repositories found" is odd.

@MadLittleMods What about the search was unintuitive?

@manuzope
Copy link
Contributor

Going to close out this issue given that the problem, as far as I can tell, has been solved (but still interested in getting your thoughts @MadLittleMods on the search)

@MadLittleMods
Copy link

@manuzope In the gif, you can see that when I search for webapp, it shows Searching..., then No repositories found, then a moment later, it returns actual results that I wanted after the request completes.

The No repositories found bit even though the request is still in flight is a bit disorienting.


But my first instinct was just to scroll the list of repos to find it in the list. I even tried to Ctrl + F the typeahead but it disappears when the input blurs.

After discovering the repo was not in the list, I even deleted the Sentry OAuth app and tried to figure out the old way to setup the GitLab integration with the token which I knew worked from a previous Sentry instance.

Only after comparing the results to my project list and setting it up again, did I realize it was returning the first page of projects from the GitLab API. Then I came to find the Sentry issue tracker to see if someone had already reported this "bug". The only reason I was successful was because of your post here about using the typeahead.

@MadLittleMods
Copy link

Perhaps part of it subconsciously was that it says "Filter search" which indicates it's working on the current set of results listed.

But in reality, it searches all of your projects in the group.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants