Commit Graph

2228 Commits

Author SHA1 Message Date
André Roth d7cc9b89d1 system tests: use repository mirrors on S3 for reproducibility
no direct internet download from apt repositories,
which over time will change or cease to exist.

also migrate to gpg2 on newer ubuntu.
2024-02-05 13:04:45 +01:00
André Roth a69aa7c533 system-tests: add Dockerfile 2024-02-05 13:04:45 +01:00
André Roth a71186bcc3 gitlab: use ubuntu22.04 runners and gpg2 2024-02-05 13:04:45 +01:00
Paul Cacheux aeef41bf70 add support for EdDSA keys in pubkeyAlgorithmName 2023-11-23 11:40:58 +01:00
Paul Cacheux 99dbe31d20 fix t09_repo/IncludeRepo21Test_gold gold error 2023-11-23 11:40:58 +01:00
Paul Cacheux 5ca3a97bd3 add name to authors 2023-11-23 11:40:58 +01:00
Paul Cacheux cfcab13c2a replace golang.org/x/crypto/openpgp with github.com/ProtonMail/go-crypto/openpgp 2023-11-23 11:40:58 +01:00
dependabot[bot] f1649a647b Bump golang.org/x/net from 0.15.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 19:32:49 +00:00
Ryan Gonzalez 11deb9425b Shut down cleanly when 'api serve' is interrupted
This will properly close the db and, more particularly, flush out any
profile files being written. Otherwise, they can end up empty or
truncated.

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
2023-10-24 15:35:41 +02:00
Sylvain Baubeau 3aaf0a8c44 Switch to aws-sdk-go-v2 2023-10-24 15:30:52 +02:00
Ryan Gonzalez 322e5c1587 Add myself to authors
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
2023-10-03 08:31:39 +02:00
Ryan Gonzalez ed45c44931 Fix the test output regex on Go 1.20
1.20 changes the output format of coverage checks slightly to include
a package name on each line, followed by `coverage:`, but the current
regex assumes that the line *starts* with `coverage:`.

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
2023-10-03 08:31:39 +02:00
Ryan Gonzalez 889fcc2158 Improve test output regex for better perf
The current regex runs in exponential time, which massively impacts the
runtime of the test suite, taking several seconds (~4s on my system)
just to perform a single match. By replacing the mix of re.findall + the
initial capture group with re.search + some string slicing, the time
spent matching the regex becomes nearly instant, e.g.:

    $ make system-test TESTS='Config*'

goes from taking ~10s to ~1.5s.

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
2023-10-03 08:31:39 +02:00
Mauro Regli f155ed3ba9 Set Golangci-lint timeout to 5m 2023-09-21 11:25:18 +02:00
Mauro Regli 0d20c59a98 Fix: Change expected output for malformed input that changed in Go 2023-09-21 11:25:18 +02:00
Mauro Regli ae61706a34 Fix: Implement golangci-lint suggestions 2023-09-21 11:25:18 +02:00
Mauro Regli f4a152ab22 Update CI to only use 1.21 and python 3.11 2023-09-21 11:25:18 +02:00
Mauro Regli 972bf6b3cf Update Golang to 1.21 and dependencies 2023-09-21 11:25:18 +02:00
Mauro Regli 18203c614d Fix: Pipeline failing because of outdated Repo
Updated the repo key, repo links in tests (jessie-cran35 -> bullseye-cran40) and the expected test output.

Fixes: #1218
2023-09-14 10:35:00 +02:00
Mauro Regli 40c242f9d1 Fix: Remove Batch from API options, set to true by default, add comments
Fixes: #1106
2023-09-14 10:34:20 +02:00
Mauro Regli ee4c83e323 Fix: Pipeline failing because of nvidia repo change 2023-09-13 09:04:51 +02:00
Crawax 214e9075ad Fix returncode when deleting a mirror with snapshot
When trying to delete a mirror that has snapshot and not providing the
force option, the API should not return a `500
StatusInternalServerError`.
A `403 StatusForbidden` is more appropriate when the condition is
expected by the server.
2023-08-18 14:20:23 +02:00
guoguangwu 847fd90e36 chore: unnecessary use of fmt.Sprintf 2023-07-14 11:35:08 +02:00
Benj Fassbind ecc055180c Fix publishing race condition
A race condition for publishing packages and
mirrors at the same time was introduced in
commit 77d7c38.

The problem is that when opening a leveldb transaction
and performing another 'put' to the db
the system freezes.
2023-05-31 15:48:42 +02:00
Alexander Zubarev 1501a4e531 Add strike to AUTHORS 2023-05-26 17:20:16 +02:00
Alexander Zubarev 8f53e01749 Show storage of publish on graph 2023-05-26 17:20:16 +02:00
Sjoerd Simons 1df8cff842 Update go-xz to 0.1.0
Older versions go-xz didn't wait for child processes meaning for exery
unpack action a defunct xz would stick around. This got fixed in 0.1.0

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2023-05-19 19:49:54 +02:00
Mauro Regli 76744ead86 Fix Release failing 'Cannot find goxc' 2023-05-15 11:15:48 +02:00
Mauro Regli f6a7030654 Try to fix UnixSocketAPITest by upgrading dependencies
Updated urllib, requests and requests_unixsocket
2023-05-15 11:15:48 +02:00
Mauro Regli 7c8dd7362d Fix: Missing newline makes tests fail 2023-05-15 11:15:48 +02:00
Mauro Regli 0ae9884836 Fix: Tests with jenkins repo not finding public key. 2023-05-15 11:15:48 +02:00
Mauro Regli 95ca6fb376 Fix: Replace security.debian.org with archive 2023-05-15 11:15:48 +02:00
Mauro Regli c9b1782d62 Fix CreateMirror9Test by removing Acquire-By-Hash 2023-05-15 11:15:48 +02:00
Mauro Regli d1102e2e9c Fix: Pipeline dependency on deb.debian.org, replace with archive
This should fix some tests, as a lot of them are dependent on
deb.debian.org which no longer supports Debian 9 "Stretch".
Instead we use archive.debian.org which will continue to contain
"Stretch" packages for a long time.
2023-05-15 11:15:48 +02:00
Markus Muellner 9c6f896666 add endpoint for listing repos while serving in api mode and add more metrics 2023-03-22 17:22:54 +01:00
Markus Muellner 0fdba29d51 make serving published repos in api mode configurable 2023-03-22 17:22:54 +01:00
Markus Muellner f74217ed9c implement system tests for serving api and published repos simultaneously 2023-03-22 17:22:54 +01:00
Андрей Лухнов e25ade8af3 Serve api and published repos simultaneously
refs #1017 #975
2023-03-22 17:22:54 +01:00
Markus Muellner bece12ad4d update golangci-lint to v1.51.2 2023-03-22 17:22:54 +01:00
Mauro Regli 77e02bf7a3 Feature: Add Merge Snapshot API
Is part of Issue #176
2023-03-14 08:38:55 +01:00
Mauro Regli 90932cdac5 Improvement: Remove Magic Numbers in Tests with Tasks
Replaced 2 with TASK_SUCCEEDED, 3 with TASK_FAILED.

fixes: #1158
2023-03-13 13:17:17 +01:00
Mauro Regli 5b5307cc15 Fix CodeCov Config has two targets and thresholds
fixes: #1160
2023-03-13 08:20:18 +01:00
Mauro Regli aaa622288c Fix: Make CodeCov Pipeline more lenient
The Pipeline will only fail if the code coverage has fallen more than 2
Percent.

fixes: #1154
2023-03-07 17:05:16 +01:00
Mauro Regli dbf1ac7867 Fix: Drop Publish returned wrong status code if not found
Deleting a publish that does not exist now results in a status code 404
instead of 500.

Fixes: #1006
2023-03-07 13:46:57 +01:00
Mauro Regli c187b0d52c Fix: Switch gin mode depending on aptly.EnableDebug
If aptly.EnableDebug is active, we use Debug, otherwise we use
gin.ReleaseMode to remove the annoying nuding messages when running the
api.

fixes: #1103
2023-03-07 13:04:12 +01:00
Markus Muellner 8e62195eb5 implement structured logging 2023-02-20 13:42:50 +01:00
dependabot[bot] 0c749922c9 Bump github.com/aws/aws-sdk-go from 1.33.0 to 1.34.0
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.33.0 to 1.34.0.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/v1.34.0/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.33.0...v1.34.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-20 13:07:27 +01:00
Markus Muellner ecc41f0c0f replace AbortWithError calls by custom function that sets the content type correctly 2023-01-23 10:42:57 +01:00
dependabot[bot] 81582bffd2 Bump github.com/aws/aws-sdk-go from 1.25.0 to 1.33.0
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.25.0 to 1.33.0.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/v1.33.0/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.25.0...v1.33.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 16:36:03 +01:00
Samuel Bachmann ced5ac7876 return the snapshot in apiSnapshotsCreate
In v1.4.0 it [returned the snapshot](https://github.com/aptly-dev/aptly/blob/v1.4.0/api/snapshot.go#L168), but this was removed (by accident) in v1.5.0. This adds it back.
2022-12-22 15:17:12 +01:00