Increase fetch interval for Codeberg #141
No reviewers
Labels
No labels
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: forgejo/runner#141
Loading…
Reference in a new issue
No description provided.
Delete branch "gusted-patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Increase the fetch interval to at least 30 seconds if the runner is configured to be used with Codeberg. This avoids it being rate limited when they do actual work and reduces load on Codeberg.
I'm not sure what the impact will be on existing workflows & scripts that do not expect such a significant delay. People trying to launch runners for the first time will also likely be confused into thinking they do not work because of this delay.
However I think it would be fine to have a new setting that provides different defaults for known public instances such as codeberg. The runners I configured for Codeberg run with a 60sec delay and a 30sec timeout and they work just fine.
5128324f7d
toa18e8cf51c
Increase fetch intervalto Increase fetch interval for CodebergI've now implemented it as such, it will only increase the fetch interval when the runner is configured to work on Codeberg with a info message telling it did so.
@ -70,1 +70,4 @@
// Tune the config settings accordingly to the Forgejo instance that will be used.
func (c *Config) Tune(instanceURL string) {
if instanceURL == "https://codeberg.org" {
I'm willing to add a test that verifies this works as it should in https://code.forgejo.org/forgejo/end-to-end to complement this change.
In order to do that I would need the public instance to be from the config file rather than hardcoded so I can setup the conditions in the test environment and verify the delay is enforced as it should. With that this change can be merged and will be released as soon as I complete the associated test.
Does that work for you?
Do you want to check that it actually fetches every 30 seconds? This also could be a simple unit test right?
Yes, it could be a simple unit test. The runner is vastly untested and I was proposing that to save you the trouble of figuring out how to test that.
The configured workflow doesn't run any unit tests at this moment?
It does, only they do not cover much.
a18e8cf51c..db2213254d
a18e8cf51c
todb2213254d
I'll trigger and verify the cascading pr result.
cascading-pr updated at actions/setup-forgejo#113
✅ runner used with all end-to-end tests at forgejo/end-to-end#73