aurweb merge requestshttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests2021-10-19T22:15:55Zhttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/194fix(fastapi): pass request type's name to Request*Notification2021-10-19T22:15:55ZKevin Morriskevr@0cost.orgfix(fastapi): pass request type's name to Request*NotificationPreviously, we passed the straight up request type instance from
SQLAlchemy and had a .title() function that was transparently
treating the instance the same as the instance's Name in terms
of notify.py's use of it.
This commit removes ...Previously, we passed the straight up request type instance from
SQLAlchemy and had a .title() function that was transparently
treating the instance the same as the instance's Name in terms
of notify.py's use of it.
This commit removes that transparent behavior; it was not actually
intended.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/195fix(fastapi): remove trailing slashes from fastapi-driven links2021-10-21T00:55:37ZKevin Morriskevr@0cost.orgfix(fastapi): remove trailing slashes from fastapi-driven linksWith our FastAPI server, trailing slashes causes a 307 redirect
which ends up redirecting users to routes which do not contain
trailing slashes. This removes trailing slashes from our templates
where FastAPI is concerned to avoid unneces...With our FastAPI server, trailing slashes causes a 307 redirect
which ends up redirecting users to routes which do not contain
trailing slashes. This removes trailing slashes from our templates
where FastAPI is concerned to avoid unnecessary redirects.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/196fix(docker): add aurweb-image service2021-10-19T14:49:39ZKevin Morriskevr@0cost.orgfix(docker): add aurweb-image serviceThe new `aurweb-image` service does not perform any purpose
other than providing a build definition for 'aurweb:latest'.
With this, `docker-compose build` now just runs once for the
`aurweb-image` service, which builds the image used by ...The new `aurweb-image` service does not perform any purpose
other than providing a build definition for 'aurweb:latest'.
With this, `docker-compose build` now just runs once for the
`aurweb-image` service, which builds the image used by all
other services.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/198fix(fastapi): persist package request form inputs2021-10-19T23:20:50ZKevin Morriskevr@0cost.orgfix(fastapi): persist package request form inputsSigned-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/205Fix and expose Docker cgit services2021-10-21T18:29:15ZKevin Morriskevr@0cost.orgFix and expose Docker cgit servicesOriginally started with fixing cgit in mind (it was using the `cgit` package and not `cgit-aurweb`). It wasn't too much work to do the rest, so I just included them. See commits in the codeblock below.
```
commit fc7ed024f371bf24c9843b...Originally started with fixing cgit in mind (it was using the `cgit` package and not `cgit-aurweb`). It wasn't too much work to do the rest, so I just included them. See commits in the codeblock below.
```
commit fc7ed024f371bf24c9843b146f4fb42bbed3dd95 (HEAD -> pu-cgit-aurweb, origin/pu-cgit-aurweb)
feat(docker): expose cgit-{php,fastapi} on {13000,13001}
This change exposes the uwsgi daemon we use for cgit on:
- PHP: docker-host:13000
- FastAPI: docker-host:13001
These ports can then be used to take advantage of cgit on
a production server that hosts nginx in front of Docker.
Signed-off-by: Kevin Morris <kevr@0cost.org>
commit 8b233903c12335888bbf4bc2a76186d6d8a44e4d
fix(docker): fix cgit clone-prefix
Additionally, clone-prefix is now configurable via environment variables:
- CGIT_CLONE_PREFIX_PHP
- CGIT_CLONE_PREFIX_FASTAPI
These vars can be used by production to customize the clone prefix.
Signed-off-by: Kevin Morris <kevr@0cost.org>
commit f2182fa708662cb90e19fbdd30cc96d0008e1b21
fix(docker): swap package cgit -> cgit-aurweb
```Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/206fix(fastapi): fix various pkgbase-wise auth redirects2021-10-21T05:37:20ZKevin Morriskevr@0cost.orgfix(fastapi): fix various pkgbase-wise auth redirectsSigned-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/208fix(fastapi): centralize logging initialization2021-10-21T18:00:15ZKevin Morriskevr@0cost.orgfix(fastapi): centralize logging initializationWith this change, we provide a wrapper to `logging.getLogger`
in the `aurweb.logging` module. Modules wishing to log using
logging.conf should get their module-local loggers by calling
`aurweb.logging.getLogger(__name__)`, similar to `lo...With this change, we provide a wrapper to `logging.getLogger`
in the `aurweb.logging` module. Modules wishing to log using
logging.conf should get their module-local loggers by calling
`aurweb.logging.getLogger(__name__)`, similar to `logging.getLogger`,
this way initialization with logging.conf is guaranteed.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/209fix: update poetry dependencies2021-10-23T09:30:48ZKevin Morriskevr@0cost.orgfix: update poetry dependenciesThere were some test failures caused by problematic
dependency versioning, most likely to to the seriously
braindead pyproject.toml config for deps that previously
existed.
This commit defines python version >=3.9<3.10 for our working
P...There were some test failures caused by problematic
dependency versioning, most likely to to the seriously
braindead pyproject.toml config for deps that previously
existed.
This commit defines python version >=3.9<3.10 for our working
Python version and provides updated deps (to latest).
I believe the bug was originally caused by the fact that
we had no python dependency defined, allowing poetry to
resolve dependencies incorrectly for what we intended.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/210fix(fastapi): use more credentials in archdev-navbar.html2021-10-25T01:13:34ZKevin Morriskevr@0cost.orgfix(fastapi): use more credentials in archdev-navbar.htmlSigned-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/212fix(fastapi): unify homepage cache expiry time to five minutes2021-10-25T02:16:49ZKevin Morriskevr@0cost.orgfix(fastapi): unify homepage cache expiry time to five minutesSigned-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/214fix(fastapi): support "Account Type:" input for account edit2021-10-26T05:36:44ZKevin Morriskevr@0cost.orgfix(fastapi): support "Account Type:" input for account editSigned-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/215fix(fastapi): limit cookie migration to whitelisted keys2021-10-27T03:10:45ZKevin Morriskevr@0cost.orgfix(fastapi): limit cookie migration to whitelisted keysWhitelisted keys: AURSID, AURTZ, AURLANG
Signed-off-by: Kevin Morris <kevr@0cost.org>
**Note:** This change addresses an issue with fastapi re-emitting the `version` cookie with certain requests through https://aur-dev.archlinux.org.Whitelisted keys: AURSID, AURTZ, AURLANG
Signed-off-by: Kevin Morris <kevr@0cost.org>
**Note:** This change addresses an issue with fastapi re-emitting the `version` cookie with certain requests through https://aur-dev.archlinux.org.Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/216fix(fastapi): rework cookies - do not re-emit generically2021-10-28T15:19:04ZKevin Morriskevr@0cost.orgfix(fastapi): rework cookies - do not re-emit genericallyThis change removes cookie re-emission of AURLANG and AURTZ,
adds the AURREMEMBER cookie (the state of the "Remember Me"
checkbox on login), and re-emits AURSID based on the AURREMEMBER
cookie.
Previously, re-emission of AURSID was forc...This change removes cookie re-emission of AURLANG and AURTZ,
adds the AURREMEMBER cookie (the state of the "Remember Me"
checkbox on login), and re-emits AURSID based on the AURREMEMBER
cookie.
Previously, re-emission of AURSID was forcefully modifying
the expiration of the AURSID cookie. The introduction of
AURREMEMBER allows us to deduct the correct cookie expiration
timing based on configuration variables. With this addition,
we now re-emit the AURSID cookie with an updated expiration
based on the "Remember Me" checkbox on login.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/217fix(fastapi): fix account page title2021-10-28T19:22:08ZKevin Morriskevr@0cost.orgfix(fastapi): fix account page titleSigned-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/218feat(fastapi): add /account/{username}/comments2021-10-30T00:40:59ZKevin Morriskevr@0cost.orgfeat(fastapi): add /account/{username}/commentsCloses #160Closes #160Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/219fix(fastapi): sanitize PP/O parameters2021-10-30T04:12:00ZKevin Morriskevr@0cost.orgfix(fastapi): sanitize PP/O parametersCloses #165Closes #165Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/220feat(fastapi): add /pkgbase/{name}/comments/{id}/edit (get)2021-10-30T05:18:42ZKevin Morriskevr@0cost.orgfeat(fastapi): add /pkgbase/{name}/comments/{id}/edit (get)This is needed so that users can edit comments when they don't have
Javascript being used in their browser.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Closes #164This is needed so that users can edit comments when they don't have
Javascript being used in their browser.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Closes #164Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/222fix(docker): fix COMMIT_HASH variable check2021-10-30T07:15:14ZKevin Morriskevr@0cost.orgfix(docker): fix COMMIT_HASH variable checkThe previous method was super bad. Even if a variable was declared,
if it was empty, we would run into a false-positive. Additionally,
the previous method did not allow us to not specify the COMMIT_HASH
variable; which is problematic for...The previous method was super bad. Even if a variable was declared,
if it was empty, we would run into a false-positive. Additionally,
the previous method did not allow us to not specify the COMMIT_HASH
variable; which is problematic for development environments.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/223fix(fastapi): support `by` maintainer search with no keywords2021-11-01T18:53:18ZKevin Morriskevr@0cost.orgfix(fastapi): support `by` maintainer search with no keywordsIn this case, package search should return orphaned packages.
Signed-off-by: Kevin Morris <kevr@0cost.org>In this case, package search should return orphaned packages.
Signed-off-by: Kevin Morris <kevr@0cost.org>Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.orghttps://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/228feat(rpc): support the If-None-Match request header2021-10-31T08:37:44ZKevin Morriskevr@0cost.orgfeat(rpc): support the If-None-Match request headerIf the If-None-Match header is supplied with a previously
obtained ETag from the same query, a 304 Not Modified is
returned with no content.
This allows clients to completely leverage the ETag header.
Signed-off-by: Kevin Morris <kevr@...If the If-None-Match header is supplied with a previously
obtained ETag from the same query, a 304 Not Modified is
returned with no content.
This allows clients to completely leverage the ETag header.
Signed-off-by: Kevin Morris <kevr@0cost.org>
P.S. snuck in a fix for JSONP callback.Python/FastAPIKevin Morriskevr@0cost.orgKevin Morriskevr@0cost.org