distro-tracker quick-setup failed

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

distro-tracker quick-setup failed

Steven Robbins
Hi,

Following the instructions [1], I cloned and tried "bin/quick-setup.sh".  It
ended in failure:

[...]
Setting up system-config-printer (1.5.12-1) ...
Setting up python3-django-jsonfield (1.1.0-2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.9.0-2) ...
Processing triggers for mime-support (3.64) ...
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
>>> Installing a configuration file
>>> Downloading a pre-built sample database file
Traceback (most recent call last):
  File "bin/sample-database-url", line 20, in <module>
    download_url = td.parent.findChild('a', class_='btn-build')['href']
TypeError: 'NoneType' object is not subscriptable



I can't run it a second time:
$ bin/quick-setup.sh
ERROR: You already have a configuration file (distro_tracker/project/settings/
local.py)


So I tried the the next step -- start a local test server:

$ ./manage.py runserver
Performing system checks...

System check identified no issues (0 silenced).

You have 41 unapplied migration(s). Your project may not work properly until
you apply the migrations for app(s): accounts, admin, auth, contenttypes,
core, debian, django_email_accounts, mail, sessions.
Run 'python manage.py migrate' to apply them.

February 23, 2020 - 01:41:08
Django version 2.2.10, using settings 'distro_tracker.project.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.


Suggestions as to what to do about the "unapplied migrations"?

The web server is available, but it seems broken.  Tried to search for a
package and I get:

OperationalError at /search
no such table: core_packagename
Request Method: GET
Request URL: http://127.0.0.1:8000/search?package_name=gmp
Django Version: 2.2.10
Exception Type: OperationalError
Exception Value:
no such table: core_packagename
Exception Location: /usr/lib/python3/dist-packages/django/db/backends/
sqlite3/base.py in execute, line 383
Python Executable: /usr/bin/python3
Python Version: 3.7.6
Python Path:
['/home/steve/Packages/pts/distro-tracker',
 '/usr/lib/python37.zip',
 '/usr/lib/python3.7',
 '/usr/lib/python3.7/lib-dynload',
 '/home/steve/.local/lib/python3.7/site-packages',
 '/usr/local/lib/python3.7/dist-packages',
 '/usr/lib/python3/dist-packages',
 '/usr/lib/python3.7/dist-packages']
Server time: Sun, 23 Feb 2020 01:44:18 +0000


[1] https://qa.pages.debian.net/distro-tracker/contributing.html

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: distro-tracker quick-setup failed

Steven Robbins
On Saturday, February 22, 2020 7:45:34 P.M. CST Steven Robbins wrote:

> So I tried the the next step -- start a local test server:
>
> $ ./manage.py runserver
> Performing system checks...
>
> System check identified no issues (0 silenced).
>
> You have 41 unapplied migration(s). Your project may not work properly until
> you apply the migrations for app(s): accounts, admin, auth, contenttypes,
> core, debian, django_email_accounts, mail, sessions.
> Run 'python manage.py migrate' to apply them.
>
> February 23, 2020 - 01:41:08
> Django version 2.2.10, using settings 'distro_tracker.project.settings'
> Starting development server at http://127.0.0.1:8000/
> Quit the server with CONTROL-C.
>
>
> Suggestions as to what to do about the "unapplied migrations"?
OK, so after re-reading the message, I ran "manage.py migrate" and things seem
to be running now ...

-Steve

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: distro-tracker quick-setup failed

Raphael Hertzog-3
In reply to this post by Steven Robbins
Hi,

On Sat, 22 Feb 2020, Steven Robbins wrote:
> >>> Downloading a pre-built sample database file
> Traceback (most recent call last):
>   File "bin/sample-database-url", line 20, in <module>
>     download_url = td.parent.findChild('a', class_='btn-build')['href']
> TypeError: 'NoneType' object is not subscriptable

The generation of the pre-built database has been broken for a while due
to new limits imposed by the salsa admins. The jobs is failing because it
takes more than 3 hours:
https://salsa.debian.org/qa/distro-tracker/pipelines
https://salsa.debian.org/qa/distro-tracker/-/jobs/575655

We should look into running it from some alternate place or find way to
optimize the execution time.

In the mean time, we should possibly update the documentation to explain
that the quick setup is broken. Willing to submit a MR for this?

Cheers,
--
  ⢀⣴⠾⠻⢶⣦⠀   Raphaël Hertzog <[hidden email]>
  ⣾⠁⢠⠒⠀⣿⡁
  ⢿⡄⠘⠷⠚⠋    The Debian Handbook: https://debian-handbook.info/get/
  ⠈⠳⣄⠀⠀⠀⠀   Debian Long Term Support: https://deb.li/LTS

signature.asc (535 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: distro-tracker quick-setup failed

Steven Robbins
On Sunday, February 23, 2020 2:23:14 A.M. CST Raphael Hertzog wrote:

> In the mean time, we should possibly update the documentation to explain
> that the quick setup is broken. Willing to submit a MR for this?

What should the documentation suggest to do after ignoring the
error in quick-setup.sh?

In my case, I have a Debian Package Tracker instance on my local machine, but
I don't know what to do with it now.  There is a package search box, but I
haven't been able to find any packages.

Maybe it would be better to instead disable downloading the database?

-Steve


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: distro-tracker quick-setup failed

Raphael Hertzog-3
On Sun, 23 Feb 2020, Steven Robbins wrote:
> On Sunday, February 23, 2020 2:23:14 A.M. CST Raphael Hertzog wrote:
>
> > In the mean time, we should possibly update the documentation to explain
> > that the quick setup is broken. Willing to submit a MR for this?
>
> What should the documentation suggest to do after ignoring the
> error in quick-setup.sh?

Actually the documentation already covers the manual setup. In the same
bullet point it says:
> If you have more time and want to learn more about the configuration of
> distro tracker, follow the steps in the sections Setting up Distro
> Tracker and Setting up the package repositories.

The two links in that paragraph are relevant.

What you are lacking after the failed quick-setup.sh is:
- "./manage.py migrate" to create the database
- "./manage.py loaddata distro_tracker/core/fixtures/debian-repositories.xml" to
  configure the package repositories to monitor
- "./manage.py tracker_update_repositories" to scan the repositories and
  add packages. This is the minimum if you want to have packages
  available. But there are many more things that you will be lacking
  if you do only this. If you want everything, you should instead
  run "./manage.py tracker_run_all_tasks".

> In my case, I have a Debian Package Tracker instance on my local machine, but
> I don't know what to do with it now.  There is a package search box, but I
> haven't been able to find any packages.
>
> Maybe it would be better to instead disable downloading the database?

Yes, and (propose to) run the above steps instead...

Cheers,
--
  ⢀⣴⠾⠻⢶⣦⠀   Raphaël Hertzog <[hidden email]>
  ⣾⠁⢠⠒⠀⣿⡁
  ⢿⡄⠘⠷⠚⠋    The Debian Handbook: https://debian-handbook.info/get/
  ⠈⠳⣄⠀⠀⠀⠀   Debian Long Term Support: https://deb.li/LTS

signature.asc (535 bytes) Download Attachment