Alert users that defaults are used when --config is not provided. #1352

Merged
mfenniak merged 1 commit from gordonmessmer/runner:warn-default into main 2026-02-07 18:21:48 +00:00
Contributor
  • other
    • PR: Alert users that defaults are used when --config is not provided.
<!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - other - [PR](https://code.forgejo.org/forgejo/runner/pulls/1352): <!--number 1352 --><!--line 0 --><!--description QWxlcnQgdXNlcnMgdGhhdCBkZWZhdWx0cyBhcmUgdXNlZCB3aGVuIC0tY29uZmlnIGlzIG5vdCBwcm92aWRlZC4=-->Alert users that defaults are used when --config is not provided.<!--description--> <!--end release-notes-assistant-->
Member

What is your motivation for this change?

Using Forgejo Runner without a configuration file is expected and supported.

What is your motivation for this change? Using Forgejo Runner without a configuration file is expected and supported.
Author
Contributor

What is your motivation for this change?

If a user runs forgejo-runner generate-config, the program will inform them that they can "just run forgejo-runner generate-config > config.yaml to generate a config file."

I think it is not intuitive that forgejo-runner register will create a .runner file, which is used automatically, but forgejo-runner generate-config > config.yaml will create a configuration file that is not used automatically.

Using Forgejo Runner without a configuration file is expected and supported.

Yes, of course. This PR doesn't change that, it merely prints a notice that the runner is using its default configuration.

Would log.Info be better for this purpose?

> What is your motivation for this change? If a user runs `forgejo-runner generate-config`, the program will inform them that they can "just run `forgejo-runner generate-config > config.yaml` to generate a config file." I think it is not intuitive that `forgejo-runner register` will create a .runner file, which is used automatically, but `forgejo-runner generate-config > config.yaml` will create a configuration file that is not used automatically. > Using Forgejo Runner without a configuration file is expected and supported. Yes, of course. This PR doesn't change that, it merely prints a notice that the runner is using its default configuration. Would `log.Info` be better for this purpose?
Member

@gordonmessmer wrote in #1352 (comment):

I think it is not intuitive that forgejo-runner register will create a .runner file, which is used automatically, but forgejo-runner generate-config > config.yaml will create a configuration file that is not used automatically.

For context, .runner is internal state, not configuration.

So far, I don't know what the right course of action is. I agree that the current situation is not ideal. If you're interested, forgejo/forgejo-actions-feature-requests#88 gives you the boring details.

Proposal 1: Turn the warning into an info message. Then, I'm fine with merging it. But don't be surprised if it disappears again, depending on what we're going to do in this area. But feel free to complain again.

Proposal 2: Abandon this PR and wait for the big configuration change.

@gordonmessmer wrote in https://code.forgejo.org/forgejo/runner/pulls/1352#issuecomment-77156: > I think it is not intuitive that `forgejo-runner register` will create a .runner file, which is used automatically, but `forgejo-runner generate-config > config.yaml` will create a configuration file that is not used automatically. For context, `.runner` is internal state, not configuration. So far, I don't know what the right course of action is. I agree that the current situation is not ideal. If you're interested, https://code.forgejo.org/forgejo/forgejo-actions-feature-requests/issues/88 gives you the boring details. Proposal 1: Turn the warning into an info message. Then, I'm fine with merging it. But don't be surprised if it disappears again, depending on what we're going to do in this area. But feel free to complain again. Proposal 2: Abandon this PR and wait for the big configuration change.
Owner

I like the idea of an info message to help highlight the issue for the unsuspecting. It happens frequently, and this could help identify it occasionally. 👍

I like the idea of an info message to help highlight the issue for the unsuspecting. It happens frequently, and this could help identify it occasionally. 👍
gordonmessmer force-pushed warn-default from 3e10eb6d09
Some checks failed
issue-labels / release-notes (pull_request_target) Successful in 5s
checks / Build Forgejo Runner (pull_request) Has been cancelled
checks / Build unsupported platforms (pull_request) Has been cancelled
checks / runner exec tests (pull_request) Has been cancelled
checks / integration tests (docker-latest) (pull_request) Has been cancelled
checks / integration tests (docker-stable) (pull_request) Has been cancelled
checks / validate mocks (pull_request) Has been cancelled
checks / validate pre-commit-hooks file (pull_request) Has been cancelled
to cd57de7a0f
All checks were successful
checks / validate pre-commit-hooks file (pull_request) Successful in 53s
checks / Build Forgejo Runner (pull_request) Successful in 54s
checks / validate mocks (pull_request) Successful in 1m3s
checks / Build unsupported platforms (pull_request) Successful in 34s
checks / runner exec tests (pull_request) Successful in 36s
checks / integration tests (docker-latest) (pull_request) Successful in 13m46s
checks / integration tests (docker-stable) (pull_request) Successful in 16m33s
cascade / debug (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 6s
cascade / end-to-end (pull_request_target) Successful in 6s
cascade / forgejo (pull_request_target) Successful in 26s
2026-02-07 17:20:43 +00:00
Compare
Author
Contributor

log.Warn is now log.Info

log.Warn is now log.Info
aahlenst approved these changes 2026-02-07 17:23:08 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/runner!1352
No description provided.