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>
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>
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>
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>
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>
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>
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>
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>
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>
Provides a convenient way to check for responses on the
mailing list prior to Accepting/Rejecting requests.
We compute the Message-ID hash that can be used to
link back to the article in the mailing list archive.
Signed-off-by: moson-mo <mo-son@mailbox.org>
Improves performance for queries with large result sets.
The "group by" clause can be removed for all search types but the keywords.
Signed-off-by: moson-mo <mo-son@mailbox.org>
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>
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>