Merged
Conversation
Add container_network_mode setting (default: pasta) so the network mode used for build containers can be configured via environment. Signed-off-by: Paul Spooren <mail@aparcar.org>
Add repositories_mode field to BuildRequest (append or replace). Extract repository logic into asu/repositories.py with a single merge_repositories() function handling both opkg and apk formats. Detect apk vs opkg from the running container instead of guessing from version strings. Validate repositories against the allow list at the API level with a 400 error before starting any build. Signed-off-by: Paul Spooren <mail@aparcar.org>
Add slow integration tests for external opkg and apk repositories using the LibreMesh feed. Tests verify repository merging, key injection, and builds with external packages for both package managers. Also test wrong-key rejection for apk builds. Signed-off-by: Paul Spooren <mail@aparcar.org>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1602 +/- ##
===========================================
+ Coverage 80.75% 91.50% +10.75%
===========================================
Files 15 20 +5
Lines 977 2120 +1143
===========================================
+ Hits 789 1940 +1151
+ Misses 188 180 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add slow integration tests for external opkg and apk repositories using the Freifunk Weimarnetz feed. Rename existing tests to include the project name (libremesh/freifunk). Signed-off-by: Paul Spooren <mail@aparcar.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to how external repositories are handled in build requests, including support for both opkg and apk repository formats, a new option to control repository merging behavior, and enhanced validation and testing. The changes refactor repository logic into a dedicated module, improve security through stricter validation, and add comprehensive tests for new functionality.
Repository handling improvements:
asu/build.pyinto a newasu/repositories.pymodule, includingis_repo_allowed,merge_repositories, andvalidate_reposfunctions for better modularity and maintainability. [1] [2] [3]repositories.conf) and apk (repositories) repository formats, with automatic detection and correct merging/appending of repositories in the build container. [1] [2]repositories_modeoption inBuildRequest(replaceorappend), allowing users to control whether to merge with or replace the default repositories. [1] [2]Validation and security enhancements:
settings.container_network_mode. [1] [2]Testing improvements:
tests/test_build.pyand for repository injection in the renamedtests/test_build_inject.py. [1] [2] [3] [4] [5]Other changes:
repositories_modefield. [1] [2] [3]These changes collectively make repository management more flexible, secure, and testable in the build system.