Hosting platform for the Arch User Repository (AUR), a collection of packaging scripts created by the Arch Linux community
Find a file
Kevin Morris a467b18474
Merge branch 'pu': pre-v6.0.0
Release v6.0.0 - Python

This documents UX and functional changes for the v6.0.0 aurweb release.
Following this release, we'll be working on a few very nice features
noted at the end of this article in Upcoming Work.

Preface
-------

This v6.0.0 release makes the long-awaited Python port official.

Along with the development of the python port, we have modified a
number of features. There have been some integral changes to how
package requests are dealt with, so _Trusted Users_ should read
the entirety of this document.

Legend
------

There are a few terms which I'd like to define to increase
understanding of these changes as they are listed:

- _self_
    - Refers to a user viewing or doing something regarding their own account
- _/pkgbase/{name}/{action}_
    - Refers to a POST action which can be triggered via the relevent package
      page at `/{pkgbase,packages}/{name}`.

Grouped changes explained in multiple items will always be prefixed with
the same letter surrounded by braces. Example:

- [A] Some feature that does something
- [A] The same feature where another thing has changed

Infrastructure
--------------

- Python packaging is now done with poetry.
- SQLite support has been removed. This was done because even though
  SQLAlchemy is an ORM, SQLite has quite a few SQL-server-like features
  missing both out of the box and integrally which force us to account
  for the different database types. We now only support mysql, and should
  be able to support postgresql without much effort in the future.
  Note: Users wishing to easily spin up a database quickly can use
  `docker-compose up -d mariadb` for a Docker-hosted mariadb service.
- An example systemd service has been included at `examples/aurweb.service`.
- Example wrappers to `aurweb-git-(auth|serve|update)` have been included
  at `examples/aurweb-git-(auth|serve|update).sh` and should be used to
  call these scripts when aurweb is installed into a poetry virtualenv.

HTML
----

- Pagers have all been modified. They still serve the same purpose, but
  they have slightly different display.
- Some markup and methods around the website has been changed for
  post requests, and some forms have been completely reworked.

Package Requests
----------------

- Normal users can now view and close their own requests
- [A] Requests can no longer be accepted through manual closures
- [A] Requests are now closed via their relevent actions
    - Deletion
        - Through `/packages` bulk delete action
        - Through `/pkgbase/{name}/delete`
    - Merge
        - Through `/pkgbase/{name}/merge`
    - Orphan
        - Through `/packages` bulk disown action
        - Through `/pkgbase/{name}/disown`
- Deletion and merge requests (and their closures) are now autogenerated
  if no pre-existing request exists. This was done to increase tracking of
  package modifications performed by those with access to do so (TUs).
- Deletion, merge and orphan request actions now close all (1 or more)
  requests pertaining to the action performed. This comes with the downside
  of multiple notifications sent out about a closure if more than one
  request (or no request) exists for them
- Merge actions now automatically reject other pre-existing merge requests
  with a mismatched `MergeBaseName` column when a merge action is performed
- The last `/requests` page no longer goes nowhere

Package Bulk Actions: /packages
-------------------------------

- The `Merge into` field has been removed. Merges now require being
  performed via the `/pkgbase/{name}/merge` action.

Package View
------------

- Some cached metadata is no longer cached (pkginfo). Previously,
  this was defaulted to a one day cache for some package information.
  If we need to bring this back, we can.

TU Proposals
------------

- A valid username is now required for any addition or removal of a TU.

RPC
---

- `type=get-comment-form` has been removed and is now located at
  `/pkgbase/{name}/comments/{id}/form`.
- Support for versions 1-4 have been removed.
- JSON key ordering is different than PHP's JSON.
- `type=search` performance is overall slightly worse than PHP's. This
  should not heavily affect users, as a 3,000 record query is returned
  in roughly 0.20ms from a local standpoint. We will be working on this
  in aim to push it over PHP.

Archives
--------

- Added metadata archive `packages-meta-v1.json.gz`.
- Added metadata archive `packages-meta-ext-v1.json.gz`.
    - Enable this by passing `--extended` to `aurweb-mkpkglists`.

Performance Changes
-------------------

As is expected from a complete rewrite of the website, performance
has changed across the board. In most places, Python's implementation
now performs better than the pre-existing PHP implementation, with the
exception of a few routes. Notably:

- `/` loads much quicker as it is now persistently cached forcibly
  for five minutes at a time.
- `/packages` search is much quicker.
- `/packages/{name}` view is slightly slower; we are no longer caching
  various pieces of package info for `cache_pkginfo_ttl`, which is
  defaulted to 86400 seconds, or one day.
- Request actions are slower due to the removal of the `via` parameter.
  We now query the database for requests related to the action based on
  the current state of the DB.
- `/rpc?type=info` queries are slightly quicker.
- `/rpc?type=search` queries of low result counts are quicker.
- `/rpc?type=search` queries of large result counts (> 2500) are slower.
    - We are not satisfied with this. We'll be working on pushing this
      over the edge along with the rest of the DB-intensive routes.
      However, the speed degredation is quite negligible for users'
      experience: 0.12ms PHP vs 0.15ms Python on a 3,000 record query
      on my local 4-core 8-thread system.

Upcoming Work
-------------

This release is the first major release of the Python implementation.
We have multiple tasks up for work immediately, which will bring us
a few more minor versions forward as they are completed.

- Update request and tu vote pagers
- Archive differentials
- Archive mimetypes
- (a) Git scripts to ORM conversion
- (a) Sharness removal
- Restriction of number of requests users can submit
2022-01-18 10:39:59 -08:00
.gitlab/issue_templates add labels to gitlab issue templates 2021-11-11 16:50:16 -08:00
.tx Rename translation resources from aur to aurweb 2018-07-07 16:05:12 +02:00
aurweb Merge branch 'pu': pre-v6.0.0 2022-01-18 10:39:59 -08:00
cache Improve Docker ecosystem 2021-06-24 19:02:35 -07:00
conf feat(python): catch all exceptions thrown through fastapi route paths 2022-01-09 23:10:02 -08:00
doc Merge branch 'pu': pre-v6.0.0 2022-01-18 10:39:59 -08:00
docker fix: docker cron config timing and doc 2022-01-18 09:05:47 -08:00
examples examples: poetry-driven git scripts & aurweb service 2022-01-17 14:05:39 -08:00
LICENSES feat(fastapi): add prometheus /metrics 2021-11-01 11:41:39 -07:00
logs Docker: add [c]git, nginx, fastapi, php-fpm, ca 2021-06-24 19:02:35 -07:00
migrations feat(migrations): add upgrade_voteinfo_integers ref 2022-01-06 20:27:23 -08:00
po merge: updated translations 2022-01-18 10:15:47 -08:00
schema Added ability to specify fortune file via an environment variable 2021-09-05 16:13:45 -05:00
templates housekeep: move templates/partials/widgets/* to templates/partials/ 2022-01-18 08:33:00 -08:00
test Merge branch 'pu': pre-v6.0.0 2022-01-18 10:39:59 -08:00
upgrading Add new upgrade instructions 2020-03-27 08:49:34 -04:00
util feat: add aurweb-adduser console script 2022-01-08 13:40:38 -08:00
web Merge branch 'pu': pre-v6.0.0 2022-01-18 10:39:59 -08:00
.coveragerc Support SQLAlchemy 1.4 URL.create recommendation 2021-06-05 19:52:56 -07:00
.dockerignore .dockerignore: ignore user-produced configs 2021-07-27 20:38:59 -07:00
.editorconfig add https://EditorConfig.org setup to ensure consistent style 2021-04-28 18:06:06 -04:00
.env feat(docker): configure fastapi's commit_hash based on $COMMIT_HASH 2021-10-28 08:19:20 -07:00
.gitignore change(.gitignore): ignore archives 2021-11-17 01:36:18 -08:00
.gitlab-ci.yml feat: support LOG_CONFIG environment variable 2022-01-18 07:27:36 -08:00
.mailmap Update maintainer email address 2015-04-11 12:48:15 +02:00
.pre-commit-config.yaml pre-commit: add initial config 2021-02-20 11:24:30 -05:00
alembic.ini Set up Alembic for database migrations 2020-02-27 16:44:36 +01:00
AUTHORS AUTHORS: Add date ranges to current maintainers 2015-09-29 20:51:03 +02:00
cliff.toml fix(git-cliff): define Housekeeping group + match all tags 2021-12-09 14:57:31 -08:00
CONTRIBUTING.md Merge branch 'master' into pu 2021-06-25 19:03:29 -07:00
COPYING added GPL2 as our license 2007-09-09 01:31:34 +00:00
docker-compose.aur-dev.yml fix(docker): reorg ./data mounts 2021-11-27 21:03:24 -08:00
docker-compose.override.yml fix(docker): reorg ./data mounts 2021-11-27 21:03:24 -08:00
docker-compose.yml feat: support LOG_CONFIG environment variable 2022-01-18 07:27:36 -08:00
Dockerfile fix(docker): compile doc during image build 2022-01-13 22:16:17 -08:00
INSTALL Merge branch 'pu': pre-v6.0.0 2022-01-18 10:39:59 -08:00
logging.conf change(logging): restrict logging.conf & add logging.test.conf 2022-01-17 12:11:08 -08:00
logging.test.conf change(logging): restrict logging.conf & add logging.test.conf 2022-01-17 12:11:08 -08:00
poetry.lock feat(poetry): add srcinfo 2022-01-16 18:16:42 -08:00
pyproject.toml feat(poetry): add srcinfo 2022-01-16 18:16:42 -08:00
pytest.ini change(aurweb): add parallel tests and improve aurweb.db 2021-11-17 01:34:59 -08:00
README.md Merge branch 'pu': pre-v6.0.0 2022-01-18 10:39:59 -08:00
setup.cfg remove C901 and E741 per-file-ignores exclusion 2021-11-17 06:00:12 -08:00
TESTING Merge branch 'pu': pre-v6.0.0 2022-01-18 10:39:59 -08:00

aurweb

aurweb is a hosting platform for the Arch User Repository (AUR), a collection of packaging scripts that are created and submitted by the Arch Linux community. The scripts contained in the repository can be built using makepkg and installed using the Arch Linux package manager pacman.

The aurweb project includes

  • A web interface to search for packaging scripts and display package details.
  • An SSH/Git interface to submit and update packages and package meta data.
  • Community features such as comments, votes, package flagging and requests.
  • Editing/deletion of packages and accounts by Trusted Users and Developers.
  • Area for Trusted Users to post AUR-related proposals and vote on them.

Directory Layout

  • aurweb: aurweb Python modules, Git interface and maintenance scripts
  • conf: configuration and configuration templates
  • static: static resource files
  • templates: jinja2 template collection
  • doc: project documentation
  • po: translation files for strings in the aurweb interface
  • schema: schema for the SQL database
  • test: test suite and test cases
  • upgrading: instructions for upgrading setups from one release to another
  • web: PHP-based web interface for the AUR

Translations

Translations are welcome via our Transifex project at https://www.transifex.com/lfleischer/aurweb; see doc/i18n.txt for details.

Transifex

Testing

See test/README.md for details on dependencies and testing.