Open rake5k opened 1 year ago
Thank you so much @rake5k!
I hope you won't mind me asking you a few questions:
allow-apt-mirrors
that defaults to true
but can be set to false
if needed for some reason?sudo gem install apt-spy2
, fails?sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-spy2 fix --commit --launchpad --country=US
, I notice that you hardcode the country. Presumably this would force the wrong mirrors to be picked for a user in say, East Asia. Maybe instead of using an option allow-apt-mirrors
, there should be a apt-mirror-country
that defaults to US
, that can be changed to other countries — and when it is empty, the apt-spy2
feature is not turned on?Thanks so much for your contribution!
Good questions, @jlumbroso!
Thank you a lot for this GH action, I heavily rely on it 🙏🏻
Hello @rake5k,
Just wanted to follow-up and see why you had closed this PR?
I think the option of picking a different mirror for the packages is still a useful one, but I was looking into adding the configuration we discussed:
Do you not think this feature is useful anymore?
Thank you!
Hi @jlumbroso,
Please excuse my unexpected closing of this PR, I thought it was not relevant anymore after merging #16. If you are still considering this change, I will implement your suggestions, of course. This weekend I am a little busy though, I hope to get on it soon (next week probably).
Apt mirror selection tested with apt-mirror-country: CH
:
Successfully installed thor-1.3.0
Successfully installed nokogiri-1.14.5-x86_64-linux
Successfully installed apt-spy2-0.8.2
Parsing documentation for thor-1.3.0
Installing ri documentation for thor-1.3.0
Parsing documentation for nokogiri-1.14.5-x86_64-linux
Installing ri documentation for nokogiri-1.14.5-x86_64-linux
Parsing documentation for apt-spy2-0.8.2
Installing ri documentation for apt-spy2-0.8.2
Done installing documentation for thor, nokogiri, apt-spy2 after 3 seconds
3 gems installed
The closest mirror is: http://mirror.infomaniak.ch/ubuntu/
Updating /etc/apt/sources.list
Updated '/etc/apt/sources.list' with http://mirror.infomaniak.ch/ubuntu/
Run `apt-get update` to update
This should fix #4.
Since this issue hits me in about every month's time, I ran a quick research on the root cause (e.g. https://github.com/actions/runner-images/issues/7048).
The downside of this solution is clearly that we rely on an extra package (
apt-spy2
). That installation and the repository update take a few additional seconds to complete. But in my very personal case, the gained resiliency is definitely worth it.Log excerpt of an example run:
I hope, this helps others too.