openwrt / asu

An image on demand server for OpenWrt based distributions
https://sysupgrade.openwrt.org
GNU General Public License v2.0
332 stars 84 forks source link

api: add /update/<version>/<target> call #734

Closed aparcar closed 9 months ago

aparcar commented 9 months ago

this call can be called by a remote process to trigger an update of a specific version/target combination, instead of requestion everything all the time. This should be a massive performance improvement and keep things better in sync.

If you enable UPDATE_TOKEN, the janitor process won't run every x minutes anymore.

For openwrt.org, this can be called via buildbots, for other projects this could be called via webhooks from just about any CI.

codecov[bot] commented 9 months ago

Codecov Report

Attention: 61 lines in your changes are missing coverage. Please review.

Comparison is base (2e0d279) 87.46% compared to head (9eb8179) 80.94%.

Files Patch % Lines
asu/common.py 28.57% 45 Missing :warning:
asu/janitor.py 26.66% 11 Missing :warning:
asu/api.py 61.53% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #734 +/- ## ========================================== - Coverage 87.46% 80.94% -6.52% ========================================== Files 15 15 Lines 973 976 +3 ========================================== - Hits 851 790 -61 - Misses 122 186 +64 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.