aurweb merge requestshttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests2021-10-22T00:10:18Zhttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/174feat(FastAPI): add /packages (post) action: 'notify'2021-10-22T00:10:18ZKevin Morriskevr@0cost.orgfeat(FastAPI): add /packages (post) action: 'notify'Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/172feat(FastAPI): add /packages (post) action: 'unflag'2021-10-21T23:49:55ZKevin Morriskevr@0cost.orgfeat(FastAPI): add /packages (post) action: 'unflag'This MR depends on https://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/170 being merged first.
Signed-off-by: Kevin Morris <kevr@0cost.org>This MR depends on https://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/170 being merged first.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/171fix(FastAPI): add /pkgbase/{name}/flag (get)2021-10-15T21:07:50ZKevin Morriskevr@0cost.orgfix(FastAPI): add /pkgbase/{name}/flag (get)This was missed in the [un]flag (post) commit.
Signed-off-by: Kevin Morris <kevr@0cost.org>This was missed in the [un]flag (post) commit.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/170feat(FastAPI): add /packages (post)2021-10-19T20:46:07ZKevin Morriskevr@0cost.orgfeat(FastAPI): add /packages (post)The POST /packages route takes an `action`, `merge_into` and `confirm`
form data arguments. It then routes over to `action`'s callback provided
by `PACKAGE_ACTIONS`. This commit does not implement actions, but
mocks out the flow we would...The POST /packages route takes an `action`, `merge_into` and `confirm`
form data arguments. It then routes over to `action`'s callback provided
by `PACKAGE_ACTIONS`. This commit does not implement actions, but
mocks out the flow we would expect from the POST route.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/169fix(FastAPI): use popupdate when [un]voting2021-10-08T22:57:00ZKevin Morriskevr@0cost.orgfix(FastAPI): use popupdate when [un]votingThe `aurweb.scripts.popupdate` script is used to maintain
the NumVotes and Popularity field. We could do the NumVotes
change more simply; however, since this is already a long-term
implementation, we're going to use it until we move scri...The `aurweb.scripts.popupdate` script is used to maintain
the NumVotes and Popularity field. We could do the NumVotes
change more simply; however, since this is already a long-term
implementation, we're going to use it until we move scripts
over to ORM.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/168feat(FastAPI): add /pkgbase/{name}/adopt (post)2021-10-08T23:41:11ZKevin Morriskevr@0cost.orgfeat(FastAPI): add /pkgbase/{name}/adopt (post)Signed-off-by: Kevin Morris <kevr@0cost.org>Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/167change(FastAPI): user_developer_or_trusted_user always True2021-10-07T18:15:40ZKevin Morriskevr@0cost.orgchange(FastAPI): user_developer_or_trusted_user always TrueSigned-off-by: Kevin Morris <kevr@0cost.org>Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/166feat(FastAPI): support {named} fmt in auth_required redirect2021-10-07T19:54:07ZKevin Morriskevr@0cost.orgfeat(FastAPI): support {named} fmt in auth_required redirectSigned-off-by: Kevin Morris <kevr@0cost.org>Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/165feat(FastAPI): add /pkgbase/{name}/disown (get, post)2021-10-08T03:25:14ZKevin Morriskevr@0cost.orgfeat(FastAPI): add /pkgbase/{name}/disown (get, post)Signed-off-by: Kevin Morris <kevr@0cost.org>Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/164feat(FastAPI): add /pkgbase/{name}/delete (get, post)2021-10-08T04:00:54ZKevin Morriskevr@0cost.orgfeat(FastAPI): add /pkgbase/{name}/delete (get, post)Signed-off-by: Kevin Morris <kevr@0cost.org>Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/163feat(FastAPI): add /pkgbase/{name}/[un]vote (post)2021-10-08T01:51:26ZKevin Morriskevr@0cost.orgfeat(FastAPI): add /pkgbase/{name}/[un]vote (post)Signed-off-by: Kevin Morris <kevr@0cost.org>Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/162feat(FastAPI): add /pkgbase/{name}/[un]notify (post)2021-10-08T01:00:46ZKevin Morriskevr@0cost.orgfeat(FastAPI): add /pkgbase/{name}/[un]notify (post)Signed-off-by: Kevin Morris <kevr@0cost.org>Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/161feat(FastAPI): add /pkgbase/{name}/[un]flag (post)2021-10-08T00:10:21ZKevin Morriskevr@0cost.orgfeat(FastAPI): add /pkgbase/{name}/[un]flag (post)Signed-off-by: Kevin Morris <kevr@0cost.org>Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/159fix(FastAPI): fix padding on email inputs2021-10-08T06:32:47ZSteven Guikalfix(FastAPI): fix padding on email inputsThis wasn't necessary with PHP because email form inputs used `type="text"` instead of `type="email"`.This wasn't necessary with PHP because email form inputs used `type="text"` instead of `type="email"`.https://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/158fix(FastAPI): add missing translation filter for request type2021-10-05T08:57:22ZSteven Guikalfix(FastAPI): add missing translation filter for request typehttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/157fix(FastAPI): use consistent ordering on dashboard and request page2021-10-05T01:13:54ZSteven Guikalfix(FastAPI): use consistent ordering on dashboard and request pageThis order is copied from [the requests endpoint](https://gitlab.archlinux.org/archlinux/aurweb/-/blob/7bfc2bf9b44ba13526b20160531aea208f694c89/aurweb/routers/packages.py#L563).
Signed-off-by: Steven Guikal <void@fluix.one>This order is copied from [the requests endpoint](https://gitlab.archlinux.org/archlinux/aurweb/-/blob/7bfc2bf9b44ba13526b20160531aea208f694c89/aurweb/routers/packages.py#L563).
Signed-off-by: Steven Guikal <void@fluix.one>https://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/156fix(FastAPI): include MergeBaseName in merge request type2021-10-08T06:29:51ZSteven Guikalfix(FastAPI): include MergeBaseName in merge request typeThis was done on the dedicated requests page, but missed on the
dashboard.This was done on the dedicated requests page, but missed on the
dashboard.https://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/154fix(FastAPI): use configured letter case for SSH fingerprints2021-10-05T08:46:32ZSteven Guikalfix(FastAPI): use configured letter case for SSH fingerprintsThe default configparser [converts keys to lowercase](https://docs.python.org/3/library/configparser.html#id1) which we don't want because it makes the SSH fingerprint section on the homepage display
```
ed25519: SHA256:HQ03dn6EasJHNDlt...The default configparser [converts keys to lowercase](https://docs.python.org/3/library/configparser.html#id1) which we don't want because it makes the SSH fingerprint section on the homepage display
```
ed25519: SHA256:HQ03dn6EasJHNDlt51KpQpFkT3yBX83x7BoIkA1iv2k
ecdsa: SHA256:L71Q91yHwmHPYYkJMDgj0xmUuw16qFOhJbBr1mzsiOI
rsa: SHA256:Ju+yWiMb/2O+gKQ9RJCDqvRg7l+Q95KFAeqM5sr6l2s
```
when keys should be "Ed25519", "ECDSA", and "RSA" according to the config.
This has been corrected[1] alongside some code simplification in relevant sections and *very slightly* improved testing (check keys and values instead of just values), though for this to be fully tested the config would have to be spoofed. Let me know if that's necessary.
[1]: [Python docs here, under `ConfigParser.optionxform(option)`](https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour)https://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/153fix(FastAPI): Improve sqlite testing speed2021-10-06T02:14:55ZKevin Morriskevr@0cost.orgfix(FastAPI): Improve sqlite testing speedfix(FastAPI): Improve sqlite testing speed
This commit adds a new Arch dependency: `libeatmydata`, which
provides the `eatmydata` executable that stubs out fsync() operations.
We use `eatmydata` to run our sharness and pytests in Docker...fix(FastAPI): Improve sqlite testing speed
This commit adds a new Arch dependency: `libeatmydata`, which
provides the `eatmydata` executable that stubs out fsync() operations.
We use `eatmydata` to run our sharness and pytests in Docker now.
With `autocommit=True`, required by SQLAlchemy to keep the
session up to date with external DB modifications, many fsync
calls are used in the SQLite backend; especially because we're wiping
and creating records in every DB-bound test.
**Before:**
- mysql: 1m42s (elapsed during pytest run)
- sqlite: 3m06s (elapsed during pytest run)
**After:**
- mysql: 1m40s (elapsed during pytest run)
- sqlite: 1m50s (elapsed during pytest run)
Closes #120
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/152feat(FastAPI): use SQLAlchemy's scoped_session2021-10-03T18:21:50ZKevin Morriskevr@0cost.orgfeat(FastAPI): use SQLAlchemy's scoped_sessionCloses #113
Signed-off-by: Kevin Morris <kevr@0cost.org>Closes #113
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.org