Fixes:
Keyword-links on the package page pass wrong query-parameter.
Thus a name/description search is performed instead of keywords
Issue report: #397
Signed-off-by: moson-mo <mo-son@mailbox.org>
Fix glitch on the package page:
"Show more..." not displayed for the "Required by" list
Fix test case:
Function name does not start with "test" hence it was never executed during test runs
Issue report: #363
Signed-off-by: moson-mo <mo-son@mailbox.org>
FastAPI 0.87.0 switched to the httpx library for their TestClient
* cookies need to be defined on the request instance instead of method calls
Signed-off-by: moson-mo <mo-son@mailbox.org>
FastAPI 0.87.0 switched to the httpx library for their TestClient
* allow_redirects is deprecated and replaced by follow_redirects
Signed-off-by: moson-mo <mo-son@mailbox.org>
The default page shows the pending requests which were working OK if one
used the Filters button. This fixes the case when someone submits by
using the pager (Next, Last etc).
Closes: #405
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
We can omit the "distinct" from some queries
because constraints in the DB ensure uniqueness:
* Groups sub-query
PackageGroup: Primary key makes "PackageID" + "GroupID" unique
Groups: Unique index on "Name" column
-> Technically we can't have a package with the same group-name twice
* Licenses sub-query:
PackageLicense -> Primary key makes "PackageID" + "LicenseID" unique
Licenses -> Unique index on "Name" column
-> Technically we can't have a package with the same license-name twice
* Keywords sub-query:
PackageKeywords -> Primary key makes "PackageBaseID" + "KeywordID" unique
(And a Package can only have one PackageBase)
Keywords -> Unique index on "Name" column
-> Technically we can't have a package with the same Keyword twice
* Packages main-query:
We join PackageBases and Users on their primary key columns
(which are guaranteed to be unique)
-> There is no way we could end up with more than one record for a Package
Signed-off-by: moson-mo <mo-son@mailbox.org>
With the 3dcbee5a the filenames inside the .gz archives contained .tmp
at the end. This fixes those by using Gzip Class constructor instead of
the gzip.open method.
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
we should be suggesting to make a shallow clone to reduce
the amount of data that is being transferred initially
Signed-off-by: moson-mo <mo-son@mailbox.org>
See doc/git-archive.md for general Git archive specifications
See doc/repos/metadata-repo.md for info and direction related to the new Git metadata archive
In my opinion, this kind of handling of transactions is pretty ugly.
The being said, we have issues with running into deadlocks on aur.al,
so this commit works against that immediate bug.
An ideal solution would be to deal with retrying transactions through
the `db.begin()` scope, so we wouldn't have to explicitly annotate
functions as "retry functions," which is what this commit does.
Closes#376
Signed-off-by: Kevin Morris <kevr@0cost.org>
swagger-ui uses inline javascript to bootstrap itself, so we need to
allow unsafe inline because we can't give swagger-ui a nonce to embed.
Signed-off-by: Kevin Morris <kevr@0cost.org>
With this on a single line, the argument ordering and class/func
execution was a bit too RNG causing exceptions to be thrown when
producing a notification based off of a deleted pkgbase object.
Signed-off-by: Kevin Morris <kevr@0cost.org>