feat(admin): Add resolver cache flush command #1349

Merged
nex merged 2 commits from Omar007/continuwuity:feature/flush-cache into main 2026-02-10 22:55:54 +00:00
Contributor

This command allows an admin to flush a specific server from the resolver caches or flush the whole cache.

Pull request checklist:

  • This pull request targets the main branch, and the branch is named something other than
    main.
  • I have written an appropriate pull request title and my description is clear.
  • I understand I am responsible for the contents of this pull request.
  • I have followed the contributing guidelines:
This command allows an admin to flush a specific server from the resolver caches or flush the whole cache. **Pull request checklist:** - [x] This pull request targets the `main` branch, and the branch is named something other than `main`. - [x] I have written an appropriate pull request title and my description is clear. - [x] I understand I am responsible for the contents of this pull request. - I have followed the [contributing guidelines][c1]: - [x] My contribution follows the [code style][c2], if applicable. - [x] I ran [pre-commit checks][c1pc] before opening/drafting this pull request. - [x] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes) myself, if applicable. This includes ensuring code compiles. - [x] My commit messages follow the [commit message format][c1cm] and are descriptive. - [x] I have written a [news fragment][n1] for this PR, if applicable<!--(can be done after hitting open!)-->. [c1]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md [c2]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/docs/development/code_style.mdx [c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks [c1t]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#running-tests-locally [c1cm]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#commit-messages [n1]: https://towncrier.readthedocs.io/en/stable/tutorial.html#creating-news-fragments
feat(admin): Add resolver cache flush command
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
e9a92f1289
This command allows an admin to flush a specific server
from the resolver caches or flush the whole cache.
Omar007 force-pushed feature/flush-cache from e9a92f1289
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
to 37a66e5f80
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m38s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 18m23s
2026-02-10 15:29:11 +00:00
Compare
nex added this to the 0.5.5 milestone 2026-02-10 19:51:22 +00:00
nex approved these changes 2026-02-10 19:51:33 +00:00
nex left a comment
Owner

Looks good to me

Looks good to me
Jade approved these changes 2026-02-10 19:51:53 +00:00
ginger approved these changes 2026-02-10 19:52:37 +00:00
@ -114,1 +114,4 @@
### `!admin query resolver flush-cache`
Flush a given server from the resolver caches or flush them completely
Owner

can this include an example with all, or a domain, specified

can this include an example with all, or a domain, specified
Author
Contributor

Done.

Done.
Omar007 force-pushed feature/flush-cache from 37a66e5f80
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m38s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 18m23s
to e9c93c12a0
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m46s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 8m3s
2026-02-10 21:08:44 +00:00
Compare
Omar007 force-pushed feature/flush-cache from e9c93c12a0
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m46s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 8m3s
to ae16a45515
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m39s
Release Docker Image / Build linux-amd64 (release) (push) Waiting to run
Release Docker Image / Build linux-arm64 (release) (push) Waiting to run
Release Docker Image / Create Multi-arch Release Manifest (push) Blocked by required conditions
Release Docker Image / Build linux-amd64 (max-perf) (push) Blocked by required conditions
Release Docker Image / Build linux-arm64 (max-perf) (push) Blocked by required conditions
Release Docker Image / Create Max-Perf Manifest (push) Blocked by required conditions
Documentation / Build and Deploy Documentation (push) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (push) Has been cancelled
Checks / Prek / Pre-commit & Formatting (push) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 21m59s
2026-02-10 22:07:44 +00:00
Compare
@ -7,6 +7,7 @@ use crate::{admin_command, admin_command_dispatch};
#[admin_command_dispatch]
#[derive(Debug, Subcommand)]
#[allow(clippy::enum_variant_names)]
Author
Contributor

Ran tests and pre-commit checks locally and those were all good but saw the clippy workflow fail. I assume we don't want to rename all commands to avoid a suffix or prefix so I've added #[allow(clippy::enum_variant_names)] here.
Is this OK?

Ran tests and pre-commit checks locally and those were all good but saw the clippy workflow fail. I assume we don't want to rename all commands to avoid a suffix or prefix so I've added `#[allow(clippy::enum_variant_names)]` here. Is this OK?
Owner

Yeah that's fine. Lots of the admin commands could do with renaming tbh but that would break muscle memory, and this case seems fine to me

Yeah that's fine. Lots of the admin commands could do with renaming tbh but that would break muscle memory, and this case seems fine to me
nex scheduled this pull request to auto merge when all checks succeed 2026-02-10 22:52:04 +00:00
nex merged commit ae16a45515 into main 2026-02-10 22:55:54 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
5 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
continuwuation/continuwuity!1349
No description provided.