test: verify that configuration is loaded correctly #1312
No reviewers
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
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
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/runner!1312
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "aahlenst/runner:config-tests"
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?
Adds tests that verify that the runner configuration is loaded correctly, with and without a configuration file.
The tests do not cover
compatibleWithOldEnvs()which has been deprecated for almost three years.NetworkModeis only tested lightly for the same reason. I'd prefer removing them instead of adding tests. When would be a good time for that?I thought about converting
LoadDefault()to functional options so that we can writeLoad()(would produce the default configuration) orLoad(FromFile("path/to/runner/configuration")). It would be more flexible and easier to test. However, it doesn't mix well with the lower part ofLoadDefault()that silently converts invalid values into default values which in itself is a problem.It's likely that there's more room for improvement. I'm happy to improve the state of affairs but I need some inspiration.
@aahlenst wrote in #1312 (comment):
My first thought is to create a PR that removes them and we can bundle it with the next time we're forced to do a major release for a breaking change, and we can time-limit it and release it in a few months if nothing else comes up to force it. But if you're going to be active in this area for other changes, the open PR may be conflict prone.
I have the overall feeling that we're annoying users with major releases, even though it's been a couple months since the last. But until this recent 12.x period, they were somewhat aggressive, and I think I'm still trying to avoid them to prevent inflaming that annoyance.
@mfenniak wrote in #1312 (comment):
For the moment, it might be sufficient to collect those in an issue and remove the deprecated code shortly before a major release. We only have to remember to do it.
Less churn is good. Even one minor release per month is a bit much. It also gives us less time to play around with new features. On the other hand, we seem to need more releases to get newer versions of jobparser into Forgejo.