Project

General

Profile

action #153427

Updated by okurz 3 months ago

## Motivation 

 In #153145 we saw that the `dist/rpm/update-cache.sh` script does not work in the case when we add new assets or change urls for existing assets. 
 If you make a pull request with a new url, then it will fail in OBS because it has the old cache. 
 But running update-cache.sh will use the upstream openQA git repo which has the old url. 
 So it's a chicken-egg problem. 

 That also is related to when others try to build openQA outside the context of OBS, see recent discussions in https://app.element.io/#/room/#openqa:opensuse.org 

 ## Acceptance criteria 
 * **AC1:** It is not necessary to manually update the cached assets for rpm packaging when a remotly fetched asset is changed (in `assetpack.def`) 


 ## Suggestions 
 * Read and review http://open.qa/docs/#update-asset-cache 
 * Research or ask other users of OBS for best practices of caching external assets as OBS can not directly download external packages 
 * Consider using OBS services to download/update assets 
 * https://github.com/openSUSE/obs-service-download_files ? 
 * The cockpit package requires a ton of npm packages to be bundled, maybe a good example (https://build.opensuse.org/package/show/openSUSE:Factory/cockpit) 
 * Try it out with changing/adding assets like a new javascript module pulled in in a temporary draft PR, e.g. jquery upgrade? 
 * If we'd use webpack we could reuse the approach taken by cockpit packaging. Revisit #71476

Back