Commit Graph

759 Commits

Author SHA1 Message Date
André Roth cff6fc5b56 tests: remove temporary folders 2026-06-20 11:02:43 +02:00
André Roth 44d00ca240 (debian) swagger: remove test 2026-06-20 11:01:55 +02:00
André Roth f2d890c490 (adapted4debian) publish: support MultiDist toggle 2026-06-19 22:20:46 +02:00
André Roth 163803fdd6 repos: fix race conditions
* load data inside background tasks
  Perform collection.LoadComplete inside maybeRunTaskInBackground
  Have tasks use a fresh copy of taskCollectionFactory, taskCollection
* use uuids, since names can be renamed
2026-06-19 22:20:45 +02:00
André Roth 13da613c94 (adapted4debian) publish: fix race conditions
* remove useless resource lock
  Resource locks need to be before the background task. creating same publish endpoint at the same time is unlikely...
* load data inside background tasks
  This fixes a flaw in async apis, which loaded the published repo from the DB and mutated it outside the task closure, before the task lock was acquired.
  Perform collection.LoadComplete inside maybeRunTaskInBackground and have tasks use a fresh copy of taskCollectionFactory, taskCollection
* lock source repos/snapshots for publish operations
  Concurrent tasks were not properly locking their resources, leading to inconsistent published indexes:
  SourceLocalRepo: iterate published.Sources (component -> source UUID), look up each local repo via localRepoCollection.ByUUID and append string(repo.Key()) to resources
  SourceSnapshot: iterate b.Snapshots,look up each snapshot via snapshotCollection.ByName and append string(snapshot.ResourceKey()) to resources.
* lock pool on non MultiDist publish
* revert mutex on LinkFromPool
* use uuids, since names can be renamed
* add test for MultiDist change
2026-06-19 22:20:45 +02:00
André Roth 8789229cc4 system tests: do not depend on launchpad.net 2026-06-19 22:20:45 +02:00
André Roth 61a3d3d130 config: allow setting PPA Base URL 2026-06-19 22:20:45 +02:00
André Roth a76d01bd3b (adapted4debian) document prometheus API
* enable in dev and test env
* fix api/repos doc
2026-06-19 22:20:45 +02:00
Tim Foerster 609b2da840 (adapted4debian) Add SOURCE_DATE_EPOCH support for reproducible builds
Implement support for the SOURCE_DATE_EPOCH environment variable as
specified by reproducible-builds.org. When set, this variable overrides
the current timestamp in the Release file's Date and Valid-Until fields,
enabling reproducible filesystem publishes.

- Read SOURCE_DATE_EPOCH environment variable in Publish()
- Use the epoch timestamp for both Date and Valid-Until fields
- Gracefully fallback to current time if unset or invalid
- Add comprehensive tests for valid and invalid SOURCE_DATE_EPOCH values
2026-06-19 22:20:45 +02:00
André Roth 4d6b83ff82 multi sign: add test 2026-06-19 22:20:45 +02:00
Ales Bregar bdf09992c9 system test configuration fix 2026-06-19 22:20:45 +02:00
Ryan Gonzalez 13273d843e system-test: Allow skipping coverage
Enabling coverage near-doubles the incremental build time and adds
overhead to individual tests on the order of **5-10x** or more. It's not
essential to have this for quick local system-test runs, so add an option
to disable it.
2026-06-19 22:20:45 +02:00
Ryan Gonzalez 72f2ba3b1d docker: Preserve the go build cache
Otherwise, every `make docker-...` invocation will need to rebuild
everything from scratch.
2026-06-19 22:20:45 +02:00
Ryan Gonzalez 1ef694096a system-test: Fix crash when a comparison with a non-string value fails
`orig` isn't necessarily a string, so the string concatenation here can
raise a TypeError.
2026-06-19 22:20:45 +02:00
Itay Porezky f01e4dbe76 Removing non related actions from mirror update 2026-06-19 22:20:45 +02:00
André Roth 5b04d4fbe1 system-tests: abort on failure 2025-06-09 13:17:54 +02:00
André Roth 1566e193f6 system-test: enable faketime optionally per test 2025-06-09 13:17:54 +02:00
André Roth 601c8e9d52 tests: use faketime to prevent expired signing keys 2025-06-08 20:05:49 +02:00
André Roth 27c15680e8 Merge pull request #1445 from silkeh/fix-db-references
Remove corrupt package references in `db recover`
2025-05-01 10:27:42 +02:00
Silke Hofstra d8a4a28259 Remove corrupt package references in db recover
When aptly crashes it is possible to get a corrupt database with a dangling key reference.
This results in an error with 'key not found', eg:

    ERROR: unable to load package Pall example-package 1.2.3 778cf6f877bf6e2d: key not found

This change makes `db recover` fix this situation by removing the dangling references.
2025-04-30 12:21:34 +02:00
André Roth f7057a9517 go1.24: fix lint, unit and system tests
- development env: base on debian trixie with go1.24
- lint: run with default config
- fix lint errors
- fix unit tests
- fix system test
2025-04-26 13:29:50 +02:00
André Roth 22bc2f9d0f system-tests: improve sorted compare
sort both aptly output and gold file. output original output for
debugging on failure.

* Makefile: enable CAPTURE=1 env variable for capturing gold files
* docker-system-test: use AWS env vars for S3 tests
* fix system tests timing issue with order of gpg logs in publish tests
2025-04-25 00:51:59 +02:00
André Roth c07bf2b108 s3: add debug logs for commands
* initialize zerolog for commands
* Change default log format: remote colors and timestamp
2025-04-24 12:13:38 +02:00
André Roth 664a5cd675 go1.23: fix system test 2025-04-20 11:57:42 +02:00
André Roth 8546cf31ce add test: snapshot empty mirror 2025-01-11 20:00:42 +01:00
André Roth 5a18428666 aptly.conf: fix s3 example 2025-01-11 15:25:53 +01:00
Gordian Schoenherr 8830354027 Extend system tests for @file filter syntax 2024-12-20 10:59:29 +09:00
Gordian Schoenherr 2467674fca Update system tests 2024-12-19 16:05:21 +09:00
André Roth 93650efddb Merge pull request #1404 from schoenherrg/fix/with-sources-ignored
Fix `-with-sources` not fetching differently named source packages
2024-12-11 13:01:30 +01:00
André Roth e50a5e175f update documentation and man page 2024-12-11 12:02:52 +01:00
André Roth a7d6782176 add test and improve config error messages 2024-12-11 12:02:52 +01:00
André Roth a15d8a3f7b add test 2024-12-11 12:02:52 +01:00
André Roth 4e566b4692 fix tests and lint 2024-12-11 12:02:52 +01:00
André Roth e92afd8f78 fix unit tests on arm
and fix etcd data dir
2024-12-11 10:40:44 +01:00
André Roth 280563caa8 unit-tests: allow running as user 2024-12-11 10:40:44 +01:00
André Roth 09c56342d2 fix json 2024-12-11 10:40:44 +01:00
André Roth ea80f6d49c write commented json default config 2024-12-11 10:40:44 +01:00
André Roth 1f469e23b5 fix optional params 2024-12-11 10:40:44 +01:00
André Roth 5e91b10c8c improve test to check for source pkgs with different name 2024-12-11 05:33:38 +01:00
Gordian Schoenherr 8c3fe8dabb Fix failing system test
The fix of the -with-filter flag causes the following previously
missing source files to be downloaded, so I updated the test file.

```
rkward_0.7.5-1~bullseyecran.0.debian.tar.xz
rkward_0.7.5-1~bullseyecran.0.dsc
rkward_0.7.5.orig.tar.gz
rpy2_3.5.12-1~bullseyecran.0.debian.tar.xz
rpy2_3.5.12-1~bullseyecran.0.dsc
rpy2_3.5.12.orig.tar.gz
```
2024-12-10 11:52:55 +09:00
André Roth 320307f504 graph: do not remove tempfile when opening in viewer 2024-12-04 17:30:27 +01:00
André Roth d80b905945 run azure tests in docker 2024-11-17 17:44:31 +01:00
André Roth d96ef0f178 Merge pull request #1393 from aptly-dev/improve/debianization
Improve/debianization
2024-11-17 17:38:47 +01:00
André Roth d2b9adf6f2 Add a test to confirm that skel files added with the same path as a repository file do not override the repository file.
Co-authored-by: iofq <cjriddz@protonmail.com>
2024-11-17 14:17:14 +01:00
André Roth 53c2f8b778 debian: add lintian
and fix/improve cross building. build now with PIE and RELRO
2024-11-17 14:10:30 +01:00
Mauro Regli 1357d246d8 rename addon files to skel files 2024-11-17 14:09:37 +01:00
Mauro Regli 03f189b62c add first test of addon files 2024-11-17 14:09:37 +01:00
André Roth c86b888b0a add tests 2024-11-08 19:00:18 +01:00
André Roth 596f59d3c4 fix tests 2024-11-08 17:07:37 +01:00
André Roth 19d213d748 fix tests 2024-11-08 15:55:01 +01:00