Commit graph

3732 commits

Author SHA1 Message Date
moson-mo
146943b3b6
housekeep: support new default repos after git migration
community is merged into extra
testing -> core-testing & extra-testing

Announcement: https://archlinux.org/news/git-migration-announcement/

We list "testing" repos first:
See d0b0e4d88b

Co-authored-by: artafinde <artafinde@archlinux.org>
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-18 13:06:21 +02:00
moson-mo
d0b0e4d88b
fix: update repo information with aurblup script
Currently, the "Repo" column in "OfficialProviders" is not updated
when a package is moved from one repository to another.

Note that we only save a package/provides combination once,
hence if a package is available in core and testing at the same time,
it would only put just one record into the OfficialProviders table.

We iterate through the repos one by one and the last value
is kept for mapping a (package/provides) combination to a repo.
Due to that, the repos listed in the "sync-db" config setting
should be ordered such that the "testing" repos are listed first.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-17 18:22:53 +02:00
moson-mo
3253a6ad29
fix(deps): remove urllib3 from dependency list
Previously pinned urllib3 to v1.x. This is not needed though.
The incompatibility of v2.x is with poetry itself, but not aurweb.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-07 09:58:17 +02:00
Daniel M. Capella
d2e8fa0249
chore(deps): "Group all minor and patch updates together"
Treat FastAPI separately due to regular breakage.

Co-authored-by: moson-mo <mo-son@mailbox.org>
2023-05-06 18:03:05 -04:00
Leonidas Spyropoulos
1d627edbe7
chore(release): prepare for 6.2.3
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-05-06 20:34:54 +01:00
moson-mo
b115aedf97
chore(deps): update several dependencies
- Removing rfc3986 (1.5.0)
- Updating coverage (7.2.4 -> 7.2.5)
- Updating fastapi (0.94.1 -> 0.95.1)
- Updating httpcore (0.16.3 -> 0.17.0)
- Updating sqlalchemy (1.4.47 -> 1.4.48)
- Updating httpx (0.23.3 -> 0.24.0)
- Updating prometheus-fastapi-instrumentator (5.11.2 -> 6.0.0)
- Updating protobuf (4.22.3 -> 4.22.4)
- Updating pytest-asyncio (0.20.3 -> 0.21.0)
- Updating requests (2.29.0 -> 2.30.0)
- Updating uvicorn (0.21.1 -> 0.22.0)
- Updating watchfiles (0.18.1 -> 0.19.0)
- Updating werkzeug (2.3.2 -> 2.3.3)

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-06 20:29:05 +02:00
Christian Heusel
af4239bcac
replace reference to AUR TU Guidelines with AUR Submission Guidelines
Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-05-06 19:47:01 +02:00
Leonidas Spyropoulos
a8d14e0194
housekeep: remove unused templates and rework existing ones
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-05-01 10:44:45 +01:00
moson-mo
8c5b85db5c
housekeep: remove fix for poetry installer
The problems with the "modern installer" got fixed.
We don't need this workaround anymore.

https://github.com/python-poetry/poetry/issues/7572
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-01 10:23:34 +02:00
moson-mo
b3fcfb7679
doc: improve instructions for setting up a dev/test env
Provide more detailed information how to get started with a dev/test env.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-01 10:23:34 +02:00
Leonidas Spyropoulos
e896edaccc
chore: support for python 3.11 and poetry.lock update
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-04-30 10:12:09 +01:00
moson-mo
bab17a9d26
doc: amend INSTALL instructions
change path for metadata archive files

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-04-29 09:59:34 +02:00
moson-mo
ad61c443f4
fix: restore & move cgit html files
restore files accidentally deleted with PHP cleanup.

1325c71712/web/template/cgit
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-04-29 09:55:54 +02:00
moson-mo
8ca63075e9
housekeep: remove PHP implementation
removal of the PHP codebase

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-04-28 16:10:32 +02:00
moson-mo
97d0eac303
housekeep: copy static files
we copy static files used by PHP and Python versions into /static

preparation work for the removal of the PHP version

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-04-28 10:53:22 +02:00
Leonidas Spyropoulos
1325c71712
chore: update poetry.lock
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-04-24 09:13:38 +01:00
Leonidas Spyropoulos
6ede837b4f
feat: allow users to hide deleted comments
Closes: #435

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-04-24 09:13:38 +01:00
Leonidas Spyropoulos
174af5f025
chore(release): prepare for 6.2.2
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-03-15 12:09:47 +00:00
moson-mo
993a044680
fix(poetry): use classic installer
The "install" module (v0.6.0) which is being used by poetry 1.4.0
has problems installing certain packages.

Disable the modern installer for now, until things are fixed.

https://github.com/python-poetry/poetry/issues/7572
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-14 17:57:57 +01:00
moson-mo
bf0d4a2be7
fix(deps): bump dependencies
bump all deps except sqlalchemy.

- Updating exceptiongroup (1.1.0 -> 1.1.1)
- Updating pydantic (1.10.5 -> 1.10.6)
- Updating starlette (0.25.0 -> 0.26.1)
- Updating charset-normalizer (3.0.1 -> 3.1.0)
- Updating fastapi (0.92.0 -> 0.94.1)
- Updating setuptools (67.4.0 -> 67.6.0)
- Updating urllib3 (1.26.14 -> 1.26.15)
- Updating alembic (1.9.4 -> 1.10.2)
- Updating fakeredis (2.9.2 -> 2.10.0)
- Updating prometheus-fastapi-instrumentator (5.10.0 -> 5.11.1)
- Updating protobuf (4.22.0 -> 4.22.1)
- Updating pytest-xdist (3.2.0 -> 3.2.1)
- Updating uvicorn (0.20.0 -> 0.21.0)
- Updating filelock (3.9.0 -> 3.9.1)

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-14 17:57:56 +01:00
moson-mo
b9df7541b3
fix: add comments in email for direct deletion/merge
TUs and Devs can delete and merge packages directly.
Currently the comments they enter, don't end up in the ML notification.

Include the comment in the notifications for direct deletion / merge

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-14 11:17:45 +01:00
moson-mo
7d1827ffc5
feat: cancel button for comment editing
Adds button that allows cancellation while editing a comment

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-09 21:48:58 +01:00
moson-mo
52c962a590
fix(deps): fastapi 0.92.0 upgrade
middleware must be added before startup:

fixes: "RuntimeError: Cannot add middleware after an application has started"

https://fastapi.tiangolo.com/release-notes/#0910
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-04 10:29:54 +01:00
moson-mo
c0390240bc
housekeep(deps): bump dependencies
update all poetry deps to the latest version (except of sqlalchemy)

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-04 10:27:57 +01:00
moson-mo
7d06c9ab97
fix: encode package name in URL for source files
Package(Base) names might include characters that require url-encoding

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-01 18:04:20 +01:00
moson-mo
8aac842307
fix(test): use single-quotes for strings in sql statements
Currently, in the sharness test suites, we use double-quotes
for string literals in SQL statements passed to sqlite3.

With sqlite version 3.41 the usage of double-quotes for string literals
is deactivated by default:
We'll need to switch to single-quotes in our tests.

Ref: Section 6.f. at https://www.sqlite.org/releaselog/3_41_0.html
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-02-24 10:11:33 +01:00
moson-mo
0c5b4721d6
fix: include package data without "Last Packager"
Data for packages that do not have a "Last Packager"
(e.g. because the user account was deleted)
should still be available from the /rpc and metadata archives.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-02-21 11:19:02 +01:00
moson-mo
8d2e176c2f
housekeep: stop "pkgmaint" script (cron job)
With the removal of the "setup-repo" command this script becomes obsolete,
because it is not possible to reserve a repo anymore.
Hence we don't need cleanup.

We've also seen issues in case the last packager's user account is removed,
leading to the deletion of a Package.

Let's deactivate this for now.

Issue report: #425

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-02-21 11:19:02 +01:00
moson-mo
b1a9efd552
housekeep(git): remove deprecated "setup-repo" command
Marked as deprecated about 6 years ago.
Time to bury it.

Issue report: #428

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-02-21 11:19:02 +01:00
Leonidas Spyropoulos
68813abcf0
fix(RTL): make RTL layout properly displayed
Closes: #290

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-02-19 02:14:57 +00:00
Leonidas Spyropoulos
45218c4ce7
fix: per-page needs to be non zero
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-02-08 15:13:21 +00:00
Leonidas Spyropoulos
cb16f42a27
fix: validate timezone before use
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-02-06 16:40:43 +00:00
moson-mo
f9a5188fb7
chore(lint): reformatting after black update
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-02-06 09:15:18 +01:00
moson-mo
2373bdf400
fix(deps): bump pre-commit hooks
Bump hooks with "pre-commit autoupdate".

There is an issue with the latest poetry version and the "isort" hook module
https://github.com/PyCQA/isort/issues/2077

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-02-06 09:12:00 +01:00
Leonidas Spyropoulos
8b25d11a3a
chore(release): prepare for 6.2.1
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-01-27 18:08:54 +00:00
Leonidas Spyropoulos
ef2baad7b3
feat: expand on update.py tests and show on Gitlab UI
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-01-27 17:16:25 +00:00
moson-mo
137ed04d34
test: add tests .SRCINFO parsing and git update routine
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-01-27 15:40:25 +01:00
moson-mo
97e1f07f71
fix(deps): update srcinfo to 0.1.2
Fixes issue parsing .SRCINFO files

Issue report: #422

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-01-27 14:04:55 +01:00
Leonidas Spyropoulos
2b76b90885
chore(release): prepare for 6.2.0
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-01-26 23:19:04 +00:00
moson-mo
7f9ac28f6e
feat(deps): add watchfiles
When running aurweb with hot-reloading, the CPU consumption is quite high.
This is because it is using "StatReload" for detecting modified files.
(which seems to be rather inefficient)

When "watchfiles" is installed it'll automatically usees that instead and
CPU load goes down to 1%.
watchfiles uses filesystem events for detecting changes and is way more efficient.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-01-26 12:59:40 +01:00
Leonidas Spyropoulos
255cdcf667
fix:(revert): fix: only try to show dependencies if object exists
This reverts commit 0e44687ab1.

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-01-25 22:17:33 +00:00
moson-mo
ec239ceeb3
feat: add "Last Updated" column to search results
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-01-25 22:39:36 +01:00
moson-mo
becce1aac4
fix: occasional errors when loading package details
Fixes errors that might occur when loading the package details page.

Problem:
We are querying a list of "Required by" packages.
This list is loaded with all details for a "PackageDependency" record.

Now we also have a reference to some attributes from the
related package (PackageDependency.Package.xxx)

This will effectively trigger the ORM to run another query (lazyload),
to fetch the missing Package data (for each PackageDependency record).

At that point it might have happened that a referenced package
got deleted / updated so that we can't retrieve this data anymore and
our dep.Package object is "None"

Fix:
We can force our query to include Package data right away.
Thus we can avoid running a separate query (per "required by"...)

As a side-effect we get better performance.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-01-25 22:34:19 +01:00
Leonidas Spyropoulos
6c9be9eb97
fix(deps): update dependencies from renovate
fastapi ^0.89.0
coverage v7
srcinfo ^0.1.0

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-01-25 21:17:50 +00:00
Leonidas Spyropoulos
c176b2b611
feature: increase mandatory coverage to 95%
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-01-25 19:34:52 +00:00
moson-mo
ff0123b54a
fix: save notification state for unchanged comments
When we edit a comment we can enable notifications (if not yet enabled).

We should also do this when the comment text is not changed.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-01-25 09:42:20 +01:00
moson-mo
36fd58d7a6
fix: show notification box when adding a comment
Currently, the "Enable notifications" checkbox
is only shown when editing a comment.

We should also show it when a new comment is about to be added.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-01-25 09:42:19 +01:00
moson-mo
65ba735f18
fix: bleach upgrade 6.0
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-01-23 23:50:04 +01:00
renovate
a2487c20d8
fix(deps): update dependency bleach to v6 2023-01-23 17:24:53 +00:00
Christian Heusel
f41f090ed7 simplify the docker development setup instructions
use `docker compose exec` instead of `docker ps` and `docker exec`

Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-01-15 09:25:22 +00:00