mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-09 13:46:05 +00:00
Compare commits
488 Commits
1.0.0-rc.5
...
release
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b4b366209 | |||
| 43436ad5a7 | |||
| 0c7b6188b2 | |||
| 3ffc3704af | |||
| de3ac27a6a | |||
| 27d66c159f | |||
| 2d0e82e9f7 | |||
| c92fabea3a | |||
| b3b0d892bb | |||
| d9ae1654b6 | |||
| 15949180c9 | |||
| f65305e97f | |||
| 28ac3ab4e7 | |||
| cf41b1d3cf | |||
| ca876930b3 | |||
| c05b3ee01e | |||
| 1076e2fb4f | |||
| 51e6733a9c | |||
| e546ae9c62 | |||
| ed2b2cdd19 | |||
| 35b5cfcf8d | |||
| 084477e079 | |||
| bb1b5dea16 | |||
| 1c87413788 | |||
| e1fee0569a | |||
| a6e5bdcbd2 | |||
| 923f51cf12 | |||
| d7c2fc7587 | |||
| 7db206466b | |||
| e549252ac6 | |||
| 17807b05fb | |||
| e16274ab14 | |||
| 5eecd657e7 | |||
| 929d906131 | |||
| 6b802a91eb | |||
| 14b3cffe8f | |||
| c62384e58d | |||
| 789f1832a4 | |||
| 3f30f6c139 | |||
| 584a52ce3d | |||
| 76e025a50c | |||
| b40eb193df | |||
| 023c987397 | |||
| a4b265bf77 | |||
| c176220a34 | |||
| 82ac2dff05 | |||
| e24eae9eaa | |||
| 8617f2701b | |||
| 8d5592f83e | |||
| b5c9229e77 | |||
| a974e50b1d | |||
| 081910e825 | |||
| a722fa80d5 | |||
| 9ecb500cbf | |||
| 7f7e4fe40b | |||
| 684e6f313a | |||
| b3a02f305e | |||
| 0ea9c19569 | |||
| ae662da256 | |||
| b5d33a1f4e | |||
| d288496752 | |||
| 40baedba4f | |||
| 0c3fd48c22 | |||
| 3e8b0e7c83 | |||
| dd2af9ff88 | |||
| 5db0e14d04 | |||
| 9429225cf4 | |||
| 857584b3c2 | |||
| cfda9b451c | |||
| 354e49de4c | |||
| 8e987ce0a6 | |||
| 8462b3492b | |||
| 929f836e40 | |||
| c7dec044eb | |||
| ac44f8968e | |||
| 14a59f7770 | |||
| 084e9c4b82 | |||
| 46907c05cf | |||
| 921cc7ad94 | |||
| bfa8df00e7 | |||
| 33a8469e27 | |||
| 128080ceb9 | |||
| ae9fe62fb1 | |||
| 929a9f27c4 | |||
| 15376a7fa6 | |||
| 5d789006dd | |||
| f4bd53a63c | |||
| 21fee7f7ff | |||
| 23ed00fc85 | |||
| f49ffa2fec | |||
| ee5f287324 | |||
| 158c613d0e | |||
| a950f914ca | |||
| 1de9b40a30 | |||
| 831468b2e9 | |||
| 600d037b25 | |||
| 3fa2b334be | |||
| 1b549d5907 | |||
| 11c4ce96eb | |||
| 4508a0985d | |||
| ed1b9f25d6 | |||
| 274c2bf402 | |||
| 9aebcefa9c | |||
| 1748814bbf | |||
| ee5f76c180 | |||
| 73957d0faf | |||
| 4d68c32b75 | |||
| 8c6689ff13 | |||
| 595f9f662d | |||
| 4a2b15cb82 | |||
| 2ba7f95547 | |||
| 7e0c67111b | |||
| 0008cbcb29 | |||
| 7b3dad6bae | |||
| c0754f5b1c | |||
| 0db77be5c6 | |||
| 5dc0e3b402 | |||
| cc5487e7de | |||
| 0b05b6c6ff | |||
| c507da8f75 | |||
| 550dabeffd | |||
| 4d7f0344d3 | |||
| 084338add6 | |||
| 8d339da706 | |||
| 817ad0a682 | |||
| 80321e5bb4 | |||
| e7475cfa4d | |||
| 72e85210f1 | |||
| 8c15025a5a | |||
| 6f2ec66263 | |||
| 62542ddc57 | |||
| a8bb53218d | |||
| 0a9f0f59a7 | |||
| 5355d9f8f8 | |||
| 50d7a049ee | |||
| 3149c87cf2 | |||
| b7fa6a4615 | |||
| 6fe83f87a4 | |||
| df6981d88e | |||
| e65788f2e8 | |||
| 590adad5ae | |||
| be5d14c985 | |||
| 703086d71d | |||
| a159f312f0 | |||
| 2f6f095298 | |||
| efd8ef005f | |||
| 60fa33773a | |||
| ee752b0b03 | |||
| 99c1f4418b | |||
| 7ce0ac72cf | |||
| 944e26d432 | |||
| f0b0a99260 | |||
| 33ddc10ffd | |||
| 3adfe65193 | |||
| 66b2a0f907 | |||
| 585b5e1c52 | |||
| bc468a4986 | |||
| 6610ee58dc | |||
| c1d9a075de | |||
| 807f85cbd7 | |||
| f46e230340 | |||
| d7e88529c9 | |||
| 7dc15b8ca6 | |||
| 6b05fb6b42 | |||
| 5da56288be | |||
| 9ca9b3481b | |||
| 8641043b71 | |||
| d6bb61d420 | |||
| 4d1807c17f | |||
| 10967d0815 | |||
| 7c85c72fd1 | |||
| 27d167f7b6 | |||
| 1a5e2b6256 | |||
| 474fcf78fb | |||
| 752d4a81ab | |||
| 0686277ee4 | |||
| 7373a5902e | |||
| e95a0ed6d9 | |||
| f0e0f5307d | |||
| 6855640192 | |||
| f11697d6e2 | |||
| 736b6a366c | |||
| 7b40b9503b | |||
| e22b879996 | |||
| b0dac1ac24 | |||
| 90e3ed701e | |||
| fd92853ac4 | |||
| bc0f608431 | |||
| f20a575994 | |||
| cc91483fac | |||
| c8fc50ada2 | |||
| 9badf3939c | |||
| c71c686e2a | |||
| 45f57ca57a | |||
| 265f429358 | |||
| 47f640f23e | |||
| 237c96dd3b | |||
| 647fe1a292 | |||
| 0c6314babc | |||
| fc76099280 | |||
| 899f81f3ad | |||
| 37bda24e1c | |||
| 4c2a0cdf9a | |||
| b370e746a0 | |||
| 95e6c89c1c | |||
| aafa7e2b7f | |||
| 5211b56277 | |||
| c9c6bb7a24 | |||
| ad0c44dc63 | |||
| 2d6f9417ff | |||
| 638da7a2e3 | |||
| 7c7b48aaca | |||
| c40988dae7 | |||
| 481c1b7939 | |||
| 26d827f946 | |||
| 376cb037a0 | |||
| 64829c704d | |||
| 17ba30f648 | |||
| 21015cfac8 | |||
| c04cd089e9 | |||
| bffdf0809f | |||
| 19a69ee897 | |||
| 1499295393 | |||
| 4c4dcb6f5e | |||
| 672087ec0d | |||
| 9dbeae1b45 | |||
| 6018dd372f | |||
| d633a635ec | |||
| fbd30a6f43 | |||
| a32360198c | |||
| 05efc584b0 | |||
| a70c96d520 | |||
| b0f68f5d0a | |||
| df554439b0 | |||
| 3b404e56c0 | |||
| ff00872922 | |||
| 4d1ce9618a | |||
| a2bad0953f | |||
| 14c99a994c | |||
| f6c2a9bfe0 | |||
| 640d7e0e3c | |||
| 409ac3de66 | |||
| 2a63fcbea6 | |||
| f4049598e4 | |||
| 1651541d38 | |||
| 85849788af | |||
| 975983abdd | |||
| cf1c45eb91 | |||
| 536c283716 | |||
| a04ddc237e | |||
| 7de6ac82e1 | |||
| 7993e11058 | |||
| 37ead2f69c | |||
| 1b1e590df7 | |||
| 086ee8e48a | |||
| 22bff27aee | |||
| 8a20498705 | |||
| c3e6d90c6f | |||
| d2af8f073e | |||
| 2baba1bda7 | |||
| bf2ca9113f | |||
| f474ea30d4 | |||
| 002ac9544c | |||
| d74d970e24 | |||
| cc15eae479 | |||
| c130d00d4b | |||
| e49d9cdea2 | |||
| f5778d8b97 | |||
| 9da42a899a | |||
| 3d46ed312a | |||
| 3496277e7c | |||
| 0b72f39023 | |||
| 30a0937a7d | |||
| 5b962b6c58 | |||
| 0ee5408b94 | |||
| cb3100a252 | |||
| 3a4afe9b38 | |||
| 71859ff83c | |||
| cb72df269a | |||
| d7b7d1835f | |||
| b92392a04a | |||
| a40ec8a6f3 | |||
| c99efd9477 | |||
| 27d593fa35 | |||
| 0137d14064 | |||
| 1dddf357cd | |||
| 395ba797fc | |||
| 51893abfbf | |||
| 92c17af8e3 | |||
| f17f31a3df | |||
| 1a88870809 | |||
| 760c9d65be | |||
| 08283d1fdc | |||
| 6a323c3e91 | |||
| 1650f3c2a6 | |||
| 38611d2510 | |||
| 1a459d650f | |||
| 5aef1796cc | |||
| a8aaadb886 | |||
| 71f1dcf859 | |||
| d44244f60f | |||
| d3884ed3ea | |||
| 282d6d5efe | |||
| f0d865728c | |||
| 3df39ef4d7 | |||
| b0c73c1224 | |||
| 54c11ef28b | |||
| e99c41a9bf | |||
| fddecf0afe | |||
| 55fd73ed48 | |||
| 1ae80c41ec | |||
| 9fc9b5e69c | |||
| 61e0edce16 | |||
| 2b5c739343 | |||
| 5dca076efe | |||
| 07833379b4 | |||
| 6655272c90 | |||
| 0a5d4cef0e | |||
| 941fae61a0 | |||
| 03fa62cc7d | |||
| b59dea826f | |||
| 081a8b61d8 | |||
| 159dc13548 | |||
| bde4b78a9f | |||
| c861fe3a57 | |||
| e1608fbd9c | |||
| eb1b17802c | |||
| 112f70914d | |||
| ea9aa53fd8 | |||
| dd368f0f5b | |||
| 6d8606412e | |||
| 037354cec0 | |||
| 30ab919bb3 | |||
| 8fc1c9281e | |||
| 14cef91423 | |||
| c9acc33720 | |||
| 955d491174 | |||
| 1c4e9f1b65 | |||
| a9f01dbbdb | |||
| 35aefbb2a5 | |||
| 8fb335cf19 | |||
| 8f763fb1a2 | |||
| a6b5da64f2 | |||
| 1210428b6d | |||
| d5426f59ec | |||
| f54323b062 | |||
| cc5060ac20 | |||
| 188f380b3b | |||
| e2a921bc16 | |||
| 447f3c704b | |||
| d915f9565e | |||
| 55ad7508b9 | |||
| 33fd056000 | |||
| af2e9df821 | |||
| 0a92a7d98c | |||
| c589fd2439 | |||
| 3e5d4ebb09 | |||
| 3677871468 | |||
| cc1ec6b992 | |||
| 9e2545244c | |||
| f053862aad | |||
| e8a7f4bc4a | |||
| 7ba5cd6888 | |||
| acfeef55ab | |||
| 0d1b312673 | |||
| 42c32381b6 | |||
| e6bf2a4646 | |||
| cf9688898d | |||
| 2d159635ed | |||
| 2f02d1d2d8 | |||
| 8ae8fb7eea | |||
| bbd7b9ef17 | |||
| 15e9bc5ed0 | |||
| 882d9ca8a4 | |||
| 19a29a7027 | |||
| 2e4ab045b6 | |||
| cbfd5b92f4 | |||
| 971f9acdf4 | |||
| a6589c19e3 | |||
| 0885c721fe | |||
| eaf5159d0f | |||
| 2477e31059 | |||
| d8c3b1bb26 | |||
| a3b8183be9 | |||
| 4dbc58887a | |||
| 123967e729 | |||
| 4b0d597d4d | |||
| 13e6424e99 | |||
| b33693fc19 | |||
| 9ed1d46090 | |||
| 6eb60f8e72 | |||
| 8dd3cabd41 | |||
| e648f683bf | |||
| 193b1b7d3f | |||
| 3b920c7999 | |||
| 5f8b097172 | |||
| 445114577f | |||
| 923bde6904 | |||
| 10ccf7c31a | |||
| 146003a426 | |||
| 65ed86f76e | |||
| 3da3bcd9ee | |||
| 20e4fd7de6 | |||
| da28f8c843 | |||
| 507447da12 | |||
| 81014fd233 | |||
| ff3c5a4989 | |||
| 4d226998e2 | |||
| f6bed1a73a | |||
| 7ff578ff20 | |||
| f16a30b231 | |||
| 6f717b2752 | |||
| 3654c147e2 | |||
| a9373288f2 | |||
| fdb28e611f | |||
| 5f739944a3 | |||
| 2bc88418f5 | |||
| 9d10d69a6d | |||
| 9863f4848d | |||
| 7dfc2ee5f0 | |||
| 80c88a9031 | |||
| 3005efe845 | |||
| 3a914b429d | |||
| 8a8616b8f7 | |||
| 62e66baf89 | |||
| 53cabe9274 | |||
| 0f272ddb14 | |||
| 0181a583a6 | |||
| 0713a723cd | |||
| a6cb34c7a4 | |||
| 703766677b | |||
| f7c51271ee | |||
| 0e6ee3bf62 | |||
| 3ab7a1921f | |||
| 86ebcb325c | |||
| 8023cf3e26 | |||
| 54a7e9f307 | |||
| 5e58b1d3a2 | |||
| df30dff1a7 | |||
| d011ec9952 | |||
| 1747ed0292 | |||
| 74be040c62 | |||
| df4fdef1d8 | |||
| 759a395fec | |||
| d04611ba38 | |||
| 37344a84da | |||
| c1070f1447 | |||
| 8bf569899a | |||
| 98f7e63396 | |||
| 07dce1cab0 | |||
| b727e669db | |||
| 0fe6cc3641 | |||
| 5be9d255e6 | |||
| 817adb127c | |||
| e3349f5f30 | |||
| a5bde8b0af | |||
| a23d4b05a3 | |||
| 183b5c9ede | |||
| 1ab6405ac9 | |||
| 9e0663cbba | |||
| ba20af77bb | |||
| 2231633ae1 | |||
| 2e2bc814b1 | |||
| 1dd81cf276 | |||
| 01db1f6644 | |||
| 7e1f261e38 | |||
| 99f85ca2b1 | |||
| afc66b7182 | |||
| 922552083f | |||
| 32eb116cbc | |||
| 68f47b9219 | |||
| de7422b508 | |||
| 1bbfa71b11 | |||
| c066faf07a | |||
| ca8bbbf8f3 | |||
| bc789332b6 | |||
| b422d1fea9 | |||
| 87bc9d14ea | |||
| fddaeba247 | |||
| b46a8164f8 | |||
| b1faaafb1f | |||
| 0a975f2fe2 | |||
| ceeff52229 | |||
| e04e15aed1 | |||
| afa84fa988 | |||
| 7aaed4d67b | |||
| 36e07e104a | |||
| b03804566c |
@@ -0,0 +1,33 @@
|
|||||||
|
# Adversarial Review Shape
|
||||||
|
|
||||||
|
Use when root `AGENTS.md` triggers adversarial validation or for a substantial PR
|
||||||
|
review. Paths below are repository-relative. The root finding standard and
|
||||||
|
completion rule apply; selecting a lens does not require finding a defect.
|
||||||
|
|
||||||
|
Risk and review shape:
|
||||||
|
|
||||||
|
- **Exempt:** documentation, comments, formatting, or typos with no runtime,
|
||||||
|
build, test, or agent-execution effect.
|
||||||
|
- **Mechanical:** renames, moves, test/tooling-only changes, and agent-rule
|
||||||
|
changes. Run correctness and simplicity lenses.
|
||||||
|
- **Standard:** localized behavior changes. Run one integrated final-diff pass
|
||||||
|
covering correctness, simplicity, and test coverage; add only domain lenses
|
||||||
|
matched by the diff.
|
||||||
|
- **High risk / substantial PR review:** high risk includes locking,
|
||||||
|
erasure/quorum/heal, replication, multipart, RPC, lifecycle/tiering,
|
||||||
|
persistence/fsync, IAM/KMS/auth, cryptography, on-disk/on-wire formats, and
|
||||||
|
S3-visible semantics. Cover all applicable lenses using exactly two
|
||||||
|
independent reviewers when delegation is explicitly authorized. Split the
|
||||||
|
lenses between them. Otherwise perform two fresh sequential passes.
|
||||||
|
- **Outbound client defaults:** what `TargetClient`, `PutObjectOptions`, or
|
||||||
|
the remote SDK configuration sends to every replication or migration target
|
||||||
|
is high risk for every target class even when the change fixes one. Follow
|
||||||
|
the SOP in `docs/postmortems/2026-09-03-replication-checksum-default-regression.md`:
|
||||||
|
run the outbound target matrix, document each new env knob in the same PR,
|
||||||
|
and list verified and unverified target classes in the PR Impact section.
|
||||||
|
|
||||||
|
Available domain lenses are security, concurrency/durability, compatibility,
|
||||||
|
and performance. Select `.agents/skills/adversarial-validation/SKILL.md` for an
|
||||||
|
explicit adversarial request, a high-risk change, or a substantial PR review;
|
||||||
|
then read only its matching role references. A routine standard pass does not
|
||||||
|
load the playbook unless the reviewer needs a RustFS-specific probe.
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Implementation Rules
|
||||||
|
|
||||||
|
Applies when changing code or running artifact-heavy work. Paths below
|
||||||
|
are repository-relative. Read only the relevant sections during read-only review.
|
||||||
|
|
||||||
|
## Worktree and Disk Hygiene
|
||||||
|
|
||||||
|
- Start implementation from the latest `origin/main` and confirm the requested
|
||||||
|
change is not already present.
|
||||||
|
- An existing clean, isolated task worktree is sufficient. Create another
|
||||||
|
worktree only when the current checkout is shared, dirty with unrelated work,
|
||||||
|
or belongs to another task.
|
||||||
|
- Never commit from a shared checkout.
|
||||||
|
- Use a task-specific branch named `<type>/<topic>`, such as `fix/...`,
|
||||||
|
`feat/...`, `test/...`, or `docs/...`, unless the user specifies a name.
|
||||||
|
- Do not include agent, tool, contributor, account, or organization names in
|
||||||
|
branch names.
|
||||||
|
- Push to the user-requested remote or the repository's configured push remote.
|
||||||
|
Do not hard-code or infer a remote from an account name.
|
||||||
|
- Check free space before artifact-heavy builds, tests, coverage, or downloads.
|
||||||
|
Re-check before a broad gate when space is tight.
|
||||||
|
- Remove only task-owned temporary/build artifacts. Never delete another task's
|
||||||
|
worktree or uncommitted data.
|
||||||
|
- At handoff, mention disk or cleanup details only when they affected execution
|
||||||
|
or artifacts/worktrees remain intentionally.
|
||||||
|
|
||||||
|
## Change Style
|
||||||
|
|
||||||
|
- Preserve existing control flow unless changing it is required for correctness.
|
||||||
|
- Prefer a direct local edit over new files, wrappers, managers, or speculative
|
||||||
|
abstractions.
|
||||||
|
- Add a helper only when it removes current duplication, names a real domain
|
||||||
|
boundary, or isolates a non-trivial invariant.
|
||||||
|
- Remove an in-scope path superseded by the change. If compatibility requires it,
|
||||||
|
adapt at the boundary to one canonical core and use the repository's
|
||||||
|
`RUSTFS_COMPAT_TODO` policy.
|
||||||
|
- Comments explain non-obvious invariants or reasons. Do not narrate code or
|
||||||
|
record change history.
|
||||||
|
- Mention unrelated problems when useful; do not fix them in a narrow task.
|
||||||
|
|
||||||
|
## Reuse and Boundary Rules
|
||||||
|
|
||||||
|
- Before adding helpers, constants, fixtures, or wrappers, search the touched
|
||||||
|
crate, the domain-owning crate, `crates/utils`, `crates/common`, and relevant
|
||||||
|
direct dependencies.
|
||||||
|
- Reuse requires matching semantics: normalization, error types, deadlines,
|
||||||
|
durability, and compatibility must fit the call site. A narrowly named local
|
||||||
|
helper is better than forced reuse with different semantics.
|
||||||
|
- Validate untrusted input at its trust boundary, then trust the validated type.
|
||||||
|
Values crossing disk, RPC, persistence, or version boundaries remain
|
||||||
|
untrusted at every consumer.
|
||||||
|
- Re-check boundary values immediately before destructive actions such as
|
||||||
|
delete, overwrite, or quorum decisions.
|
||||||
|
- Every new branch needs a concrete triggering input/state. For decoded or peer
|
||||||
|
data, corruption and mixed-version input are valid triggers.
|
||||||
|
- Required values must return a typed error when absent or corrupt; do not use a
|
||||||
|
default that converts corruption into a plausible result.
|
||||||
|
- Attach error context once where it is actionable. Do not erase typed errors
|
||||||
|
below aggregation or quorum layers.
|
||||||
|
|
||||||
|
## Naming
|
||||||
|
|
||||||
|
Use Rust API naming: `SCREAMING_SNAKE_CASE` constants/statics, `snake_case`
|
||||||
|
functions/variables, and `PascalCase` types. Do not rename unrelated existing
|
||||||
|
violations.
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
# Git and Pull Request Rules
|
||||||
|
|
||||||
|
Applies to commits, pushes, PRs, and issue/discussion actions. Paths below are
|
||||||
|
repository-relative. User authorization and root `AGENTS.md` still govern scope.
|
||||||
|
|
||||||
|
## Final PR Preflight
|
||||||
|
|
||||||
|
Before creating or updating a PR, reuse completed review and verification:
|
||||||
|
|
||||||
|
- Verify the actual base (normally `origin/main`) and the complete task diff,
|
||||||
|
including file names and whitespace. Exclude secrets, logs, generated
|
||||||
|
artifacts, and unrelated edits. Retain an existing PR's base unless requested.
|
||||||
|
- Confirm the final diff passed the root verification tier; fix task-owned
|
||||||
|
failures and run missing scoped checks. Report unresolved required checks or
|
||||||
|
authority without expanding the task. Do not start another general review.
|
||||||
|
- Keep the English Conventional Commit title at most 72 characters. Use the
|
||||||
|
template headings, actual checks, material risks, and rollback notes.
|
||||||
|
- Immediately before writing to GitHub, confirm the head and task diff are
|
||||||
|
unchanged. Rerun only checks invalidated by edits or relevant state changes.
|
||||||
|
|
||||||
|
## Pull Request Lifecycle
|
||||||
|
|
||||||
|
- Creating or updating a PR includes one immediate snapshot of checks,
|
||||||
|
mergeability, reviews, and unresolved threads.
|
||||||
|
- Unless the user explicitly requests monitoring, a release workflow requires
|
||||||
|
it, or an automation already owns it, hand off after the PR is open with the
|
||||||
|
current state and next event to watch. Do not delay ordinary handoff with
|
||||||
|
fixed quiet-period sleeps.
|
||||||
|
- For requested monitoring, use event-driven or bounded waits. Report only state
|
||||||
|
changes, actionable failures, or a meaningful prolonged delay.
|
||||||
|
- Investigate failures/comments before changing code. Fix task-attributable
|
||||||
|
issues, rerun affected verification, push, reply or resolve the thread, then
|
||||||
|
resume the requested monitor.
|
||||||
|
- Never merge without required reviewer approval or explicit authority.
|
||||||
|
- After an observed merge, verify the commit reached the base, then clean the
|
||||||
|
task worktree/branch when safe. Preserve unmerged work for closed PRs unless
|
||||||
|
deletion was explicitly authorized.
|
||||||
|
|
||||||
|
## Git and PR Baseline
|
||||||
|
|
||||||
|
- Follow Conventional Commits; keep the subject at most 72 characters.
|
||||||
|
- Source comments, commits, PR titles, and PR bodies are in English.
|
||||||
|
- Keep every heading from `.github/pull_request_template.md`; use `N/A` where
|
||||||
|
needed and include commands actually run.
|
||||||
|
- Use `--body-file` for multiline `gh pr create`/`gh pr edit` content.
|
||||||
|
- PR/issue/discussion content must not contain the literal sequence `\n` or
|
||||||
|
hard-wrapped prose paragraphs.
|
||||||
|
- Do not include local absolute paths or tool-specific labels/prefixes in GitHub
|
||||||
|
content.
|
||||||
|
- Resolve review threads after the underlying issue is fixed. If declining a
|
||||||
|
suggestion, reply with a short evidence-based reason.
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
name: adversarial-validation
|
name: adversarial-validation
|
||||||
description: Review a final RustFS diff adversarially when the user requests adversarial review, the root AGENTS.md classifies the change as high risk, or a substantial PR is being reviewed. Do not use for ordinary questions, diagnosis, planning, status, documentation-only work, or routine low-risk implementation.
|
description: Review RustFS diffs or designs for explicit adversarial requests, high-risk changes under the repository review policy, or substantial PR reviews. Skip ordinary questions, diagnosis, planning, status, routine low-risk implementation, and prose with no execution effect.
|
||||||
---
|
---
|
||||||
|
|
||||||
# RustFS Adversarial Validation
|
# RustFS Adversarial Validation
|
||||||
|
|
||||||
Use the risk tier and review shape defined in the root `AGENTS.md`. This skill
|
Use the [repository risk tiers and review shape](../../references/adversarial-validation.md). This skill
|
||||||
routes a review to RustFS-specific probes without loading unrelated domains.
|
routes a review to RustFS-specific probes without loading unrelated domains.
|
||||||
|
|
||||||
## Select Lenses
|
## Select Lenses
|
||||||
@@ -31,15 +31,18 @@ adversarial review.
|
|||||||
|
|
||||||
## Review Protocol
|
## Review Protocol
|
||||||
|
|
||||||
1. Freeze the exact final diff/head and list the selected lenses.
|
1. Freeze the exact final diff/head (or the design under review) and list the
|
||||||
2. Run the review shape required by root `AGENTS.md`.
|
selected lenses.
|
||||||
|
2. Run the review shape required by the repository risk tier.
|
||||||
3. For each selected lens, either report a concrete finding or a null verdict
|
3. For each selected lens, either report a concrete finding or a null verdict
|
||||||
naming the attacks performed.
|
naming the attacks performed.
|
||||||
4. A finding needs `file:line`, a triggering input/state/interleaving, the wrong
|
4. Apply root `AGENTS.md`'s finding standard. Test each candidate against callers,
|
||||||
outcome, and a focused fix or missing regression check.
|
existing coverage, and invariants before accepting it; an adversarial role
|
||||||
5. Fix or rebut every finding with code-path, test, or invariant evidence.
|
does not have to produce a defect.
|
||||||
|
5. Fix or rebut supported findings with code-path, test, or invariant evidence.
|
||||||
6. After a non-trivial edit, rerun only lenses affected by that edit against the
|
6. After a non-trivial edit, rerun only lenses affected by that edit against the
|
||||||
new exact diff.
|
new exact diff.
|
||||||
|
|
||||||
Do not turn a null verdict into a long checklist. Record concise evidence that
|
Do not turn a null verdict into a long checklist. Record concise evidence that
|
||||||
the relevant failure classes were attacked.
|
the relevant failure classes were attacked, then stop under the root completion
|
||||||
|
rule. Keep the required per-lens verdicts for high-risk PRs.
|
||||||
|
|||||||
@@ -22,3 +22,17 @@
|
|||||||
fixtures and encrypted migration data.
|
fixtures and encrypted migration data.
|
||||||
- Compatibility shims use `RUSTFS_COMPAT_TODO(<task-id>)`, have a removal
|
- Compatibility shims use `RUSTFS_COMPAT_TODO(<task-id>)`, have a removal
|
||||||
condition, and default toward reading old data safely.
|
condition, and default toward reading old data safely.
|
||||||
|
|
||||||
|
## Outbound targets
|
||||||
|
|
||||||
|
- A change to what the replication or migration client sends by default
|
||||||
|
(checksum policy, payload framing, headers, version-id addressing) is judged
|
||||||
|
against every target class, not the one it fixes. Name each target-side rule
|
||||||
|
the current default satisfies — checksum required with Object Lock
|
||||||
|
parameters, `aws-chunked` decoding, version-id adoption, ETag equals content
|
||||||
|
MD5 — and show which cell of
|
||||||
|
`crates/e2e_test/src/replication_target_matrix_test.rs` covers each.
|
||||||
|
- A test that asserts the fix ("no trailer header") is not evidence; the
|
||||||
|
matrix cell that asserts the target accepted and stored the object is.
|
||||||
|
- Every new environment escape hatch appears in
|
||||||
|
`docs/operations/replication-outbound-transport.md` in the same diff.
|
||||||
|
|||||||
@@ -3,9 +3,10 @@
|
|||||||
- For every behavior claim, name the focused test/check that fails if the
|
- For every behavior claim, name the focused test/check that fails if the
|
||||||
changed hunk is reverted. If none is practical, require the reason and
|
changed hunk is reverted. If none is practical, require the reason and
|
||||||
residual risk.
|
residual risk.
|
||||||
- Confirm tests exercise the real production path and assert returned values,
|
- Confirm tests exercise the real production path and distinguish the intended
|
||||||
exact bytes, stored state, or the specific error variant—not only success,
|
behavior from the named regression. A success, `is_err()`, or no-panic check
|
||||||
`is_err()`, or no panic.
|
can be sufficient when that is the actual contract; require exact values,
|
||||||
|
bytes, state, or error variants when those distinctions matter to the change.
|
||||||
- For new flags/modes, verify each branch and ask which test fails if the branch
|
- For new flags/modes, verify each branch and ask which test fails if the branch
|
||||||
is inverted.
|
is inverted.
|
||||||
- For new error propagation, inject the failure and assert the caller observes
|
- For new error propagation, inject the failure and assert the caller observes
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
---
|
---
|
||||||
name: arch-checks
|
name: arch-checks
|
||||||
description: Resolve failures from the repository's architecture guard scripts — check_layer_dependencies.sh, check_architecture_migration_rules.sh, check_unsafe_code_allowances.sh, check_logging_guardrails.sh, check_doc_paths.sh. Use when make pre-commit / pre-pr or CI fails on one of these checks.
|
description: Diagnose failures from check_layer_dependencies.sh, check_architecture_migration_rules.sh, check_unsafe_code_allowances.sh, check_logging_guardrails.sh, check_doc_paths.sh, or check_no_planning_docs.sh. Use when one of these guards fails, not for every architecture question or documentation edit.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Architecture Guard Checks
|
# Architecture Guard Checks
|
||||||
|
|
||||||
All five run in `make pre-commit` / `make pre-pr` and in CI. Fix the cause;
|
Read only the section for the failing guard. Use `.config/make/` and the current
|
||||||
never weaken a check to get green.
|
workflow to verify its wiring; not every guard is part of every gate. Fix the
|
||||||
|
cause and rerun the failed guard; never weaken a check to get green.
|
||||||
|
|
||||||
## `check_layer_dependencies.sh` — layer DAG in `rustfs/src`
|
## `check_layer_dependencies.sh` — layer DAG in `rustfs/src`
|
||||||
|
|
||||||
@@ -50,10 +51,12 @@ consider adding it to the script's `checked_files` list.
|
|||||||
|
|
||||||
## `check_doc_paths.sh`
|
## `check_doc_paths.sh`
|
||||||
|
|
||||||
Instruction/architecture docs (`AGENTS.md`, `CLAUDE.md`, `ARCHITECTURE.md`,
|
Instruction docs (`AGENTS.md`, `CLAUDE.md`, `ARCHITECTURE.md`) and every
|
||||||
`docs/architecture/*.md`) must not reference repo file paths that no longer
|
Markdown file under `docs/` (architecture, operations, testing, index) must not
|
||||||
exist. If your refactor moved code, update the docs that point at it — the
|
reference repo file paths that no longer exist. If your refactor moved code,
|
||||||
error message lists `doc -> stale-path` pairs.
|
update the docs that point at it — the error message lists `doc -> stale-path`
|
||||||
|
pairs. In durable docs, cite paths plus symbol names rather than line numbers
|
||||||
|
(see `docs/architecture/README.md`). Review findings still need `file:line`.
|
||||||
|
|
||||||
## `check_no_planning_docs.sh`
|
## `check_no_planning_docs.sh`
|
||||||
|
|
||||||
|
|||||||
@@ -8,19 +8,11 @@ description: Review a commit, PR, or merged patch when the user requests ordinar
|
|||||||
Use this skill for an ordinary requested review. If the root policy or user calls
|
Use this skill for an ordinary requested review. If the root policy or user calls
|
||||||
for adversarial validation, use `adversarial-validation` instead of running both.
|
for adversarial validation, use `adversarial-validation` instead of running both.
|
||||||
|
|
||||||
## Quick Start
|
|
||||||
|
|
||||||
1. Read the scope: commit, PR, patch, or file list.
|
|
||||||
2. Map each changed area by risk and user impact.
|
|
||||||
3. Inspect each risky change in context.
|
|
||||||
4. Report findings first, ordered by severity.
|
|
||||||
5. Close with residual risks and verification recommendations.
|
|
||||||
|
|
||||||
## Core Workflow
|
## Core Workflow
|
||||||
|
|
||||||
### 1) Scope and assumptions
|
### 1) Scope and assumptions
|
||||||
- Confirm change source (diff, commit, PR, files), target branch, language/runtime, and version.
|
- Derive the change source, target branch, and relevant runtime/version from the
|
||||||
- If context is missing, state assumptions before deeper analysis.
|
supplied diff and metadata. Ask only when missing context could change the verdict.
|
||||||
- Focus only on requested scope; avoid reviewing unrelated files.
|
- Focus only on requested scope; avoid reviewing unrelated files.
|
||||||
|
|
||||||
### 2) Risk map
|
### 2) Risk map
|
||||||
@@ -40,43 +32,20 @@ for adversarial validation, use `adversarial-validation` instead of running both
|
|||||||
- unchecked assumptions and null/empty/error-path handling
|
- unchecked assumptions and null/empty/error-path handling
|
||||||
- stale tests, fixtures, and configs
|
- stale tests, fixtures, and configs
|
||||||
- hidden coupling to shared helpers/constants/features
|
- hidden coupling to shared helpers/constants/features
|
||||||
- If a point is uncertain, mark it as an open question instead of guessing.
|
- Apply root `AGENTS.md`'s finding standard: try to disprove a candidate before
|
||||||
|
reporting it. Mention an unresolved question only when it could materially
|
||||||
|
change the verdict; do not fill the report with speculative possibilities.
|
||||||
|
|
||||||
#### Rust-specific checks (apply to all Rust changes)
|
#### Rust-specific checks
|
||||||
|
|
||||||
Run the full checklist in [rust-code-quality](../rust-code-quality/SKILL.md) — the canonical Rust review checklist for the unwrap/casting/cloning/locking/recursion/error-type/serde/test rules and the reuse-and-necessity checks (duplicated helpers, defensive branches without a nameable trigger, redundant error wrapping). Do not restate those rules here; carry its P0–P3 ratings over unchanged and use this skill's output format.
|
For changed Rust behavior, use the matching sections of [rust-code-quality](../rust-code-quality/SKILL.md). Reuse checks already performed by the selected review workflow. Comment-only or formatting-only Rust diffs do not require the full Rust checklist. Carry its P0–P3 ratings over unchanged and use this skill's output format.
|
||||||
|
|
||||||
### 4) Findings-first output
|
### 4) Findings-first output
|
||||||
- Order findings by severity:
|
- Order supported findings by P0–P3 severity; preserve the Rust ratings above.
|
||||||
- P0: critical failure, security breach, or data loss risk
|
Include `path:line`, the failure and impact, a focused fix, and its validation.
|
||||||
- P1: high-impact regression
|
- If no supported issues remain, state `No findings` with the reviewed scope and
|
||||||
- P2: medium risk correctness gap
|
any material verification limitation. Do not append optional improvements to
|
||||||
- P3: low risk/quality debt
|
make a clean review look productive.
|
||||||
- For each finding include:
|
|
||||||
- Severity
|
|
||||||
- `path:line` reference
|
|
||||||
- concise issue statement
|
|
||||||
- impact and likely failure mode
|
|
||||||
- specific fix or mitigation
|
|
||||||
- validation step to confirm
|
|
||||||
- If no issues exist, explicitly state `No findings` and why.
|
|
||||||
|
|
||||||
### 5) Close
|
Close after the required review. Recommend additional verification only for an
|
||||||
- Report assumptions and unknowns.
|
identified unresolved risk or required gate; reuse evidence for unchanged code.
|
||||||
- Suggest targeted checks (tests, canary checks, logs/metrics, migration validation).
|
|
||||||
|
|
||||||
## Output Template
|
|
||||||
|
|
||||||
1. Findings
|
|
||||||
2. No findings (if applicable)
|
|
||||||
3. Assumptions / Unknowns
|
|
||||||
4. Recommended verification steps
|
|
||||||
|
|
||||||
## Finding Template
|
|
||||||
|
|
||||||
- `[P1] Missing timeout for downstream call`
|
|
||||||
- Location: `path/to/file.rs:123`
|
|
||||||
- Issue: ...
|
|
||||||
- Impact: ...
|
|
||||||
- Fix suggestion: ...
|
|
||||||
- Validation: ...
|
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
---
|
||||||
|
name: issue-triage
|
||||||
|
description: Assess whether a GitHub issue is fixed, needs implementation, or can be closed by checking related work and current code. Use for issue completion/triage requests. Status questions are read-only; comment, close, or change labels only when the conversation authorizes that action.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Issue Triage
|
||||||
|
|
||||||
|
Use this skill when the user provides a GitHub issue URL and asks "can this be closed?", "is this already implemented?", "check completion status", or similar triage questions.
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
### 1. Fetch issue context
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gh issue view <N> --repo <owner/repo> --json title,body,state,comments,labels,updatedAt
|
||||||
|
```
|
||||||
|
|
||||||
|
Read the issue body to understand what was requested. Extract:
|
||||||
|
- The specific feature/fix/behavior described.
|
||||||
|
- Any linked PRs or commits mentioned in the body or comments.
|
||||||
|
- Any checklist items or sub-issues.
|
||||||
|
|
||||||
|
Resolve the issue repository and implementation repository separately (for example, `rustfs/backlog` tracks work in `rustfs/rustfs`). Pass the implementation repository explicitly to PR queries; the current checkout may belong to another repository.
|
||||||
|
|
||||||
|
### 2. Search for related work
|
||||||
|
|
||||||
|
Search git history for commits referencing the issue:
|
||||||
|
```bash
|
||||||
|
git log --oneline --all --grep="<N>" | head -30
|
||||||
|
```
|
||||||
|
|
||||||
|
Search for related PRs:
|
||||||
|
```bash
|
||||||
|
gh pr list --repo <implementation-repo> --search "<issue-url>" --state all --json number,title,state,mergedAt
|
||||||
|
```
|
||||||
|
|
||||||
|
Also search qualified issue references and subject keywords; for same-repository
|
||||||
|
issues, include `#<N>`. Follow explicit links even without a text match. A search
|
||||||
|
page with no match does not prove the work is absent.
|
||||||
|
|
||||||
|
If the issue mentions specific PRs, check their status:
|
||||||
|
```bash
|
||||||
|
gh pr view <PR_N> --repo <implementation-repo> --json state,mergedAt,title,mergeCommit,baseRefName
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Verify implementation
|
||||||
|
|
||||||
|
Fetch the implementation repository's current base branch. For each merged candidate, verify its merge commit is present and inspect the current code for the claimed behavior; a commit message match alone is not proof:
|
||||||
|
```bash
|
||||||
|
git fetch <implementation-remote> <base-branch>
|
||||||
|
git merge-base --is-ancestor <merge-commit> <implementation-remote>/<base-branch>
|
||||||
|
```
|
||||||
|
|
||||||
|
If the issue describes a specific defect, inspect the fetched base's code rather than assuming the current checkout contains it:
|
||||||
|
```bash
|
||||||
|
git show <implementation-remote>/<base-branch>:crates/<relevant>/src/<file>.rs
|
||||||
|
```
|
||||||
|
|
||||||
|
For issues with checklists, verify each item individually. If sub-items are tracked as separate issues, check those too:
|
||||||
|
```bash
|
||||||
|
gh issue view <SUB_N> --repo <owner/repo> --json state
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Determine verdict
|
||||||
|
|
||||||
|
- **All items fixed and merged**: Recommend closing; name the verified PRs and behavior.
|
||||||
|
- **Some items fixed, some remaining**: Keep open; report each remaining item.
|
||||||
|
- **Not yet implemented**: Keep open; report what remains.
|
||||||
|
- **Superseded or no longer relevant**: Recommend closing with evidence.
|
||||||
|
|
||||||
|
### 5. Take action
|
||||||
|
|
||||||
|
For a status-only request, return the assessment without GitHub writes. If commenting, closing, or label edits are authorized, perform only those actions; do not ask again for authority already given. Prepare the final assessment before asking for any missing authority. Write `rustfs/backlog` issue content in Chinese.
|
||||||
|
|
||||||
|
Close with comment:
|
||||||
|
```bash
|
||||||
|
gh issue close <N> --repo <owner/repo> --comment "<body>"
|
||||||
|
```
|
||||||
|
|
||||||
|
Comment without closing:
|
||||||
|
```bash
|
||||||
|
gh issue comment <N> --repo <owner/repo> --body-file /tmp/triage.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Update labels only when label changes are authorized, using existing repository labels; never add tool-specific labels:
|
||||||
|
```bash
|
||||||
|
gh issue edit <N> --repo <owner/repo> --add-label "<existing-label>"
|
||||||
|
```
|
||||||
|
|
||||||
|
Always use `--body-file` for multiline content, never inline `--body`.
|
||||||
|
|
||||||
|
### 6. Handle multi-issue batches
|
||||||
|
|
||||||
|
When the user asks to check multiple issues (e.g., "check all issues by user X" or "scan backlog for closable issues"):
|
||||||
|
1. List the full requested scope with pagination (for example `gh api --paginate 'repos/<repo>/issues?state=open&per_page=100'`, excluding entries with `pull_request`). Add an author filter only when the user requested one; the default page/limit is not evidence that all issues were checked.
|
||||||
|
2. For each issue, run steps 1-5 above.
|
||||||
|
3. Report a summary table of all triaged issues with verdicts.
|
||||||
|
|
||||||
|
## Report
|
||||||
|
|
||||||
|
Identify the issue and current state, verified implementation/PR evidence,
|
||||||
|
remaining items, verdict, and action actually taken. Use a table for batches;
|
||||||
|
a single issue does not require a heading for each field. Follow step 4's
|
||||||
|
verdicts without repeating the assessment in another template.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- The user may ask in Chinese ("是否可以关闭", "检查完成情况"); respond in the same language.
|
||||||
|
- When closing, always include a summary of what was fixed and which PRs resolved it — this creates a useful audit trail.
|
||||||
|
- For issues in `rustfs/backlog`, use `--repo rustfs/backlog`.
|
||||||
|
- For issues in `rustfs/rustfs`, use `--repo rustfs/rustfs`.
|
||||||
|
- If the issue has sub-issues (GitHub sub-issues API), check each one's state before declaring the parent complete.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: plugin-contract-guard
|
name: plugin-contract-guard
|
||||||
description: Invariants and change procedure for the target-plugin / extension system — plugin manifests, admin plugin/extension catalog and instance APIs, secret redaction, external-plugin install policy. Use when editing crates/targets (manifest, plugin, control_plane, catalog, runtime), crates/extension-schema, or rustfs/src/admin plugin_contract.rs / plugins_*.rs / extensions.rs / target_descriptor.rs.
|
description: Guard changes to target-plugin manifests, extension schemas, admin catalog/instance contracts, secret redaction, and external-plugin install policy. Use when a diff changes those contracts in crates/targets, crates/extension-schema, or admin plugin/extension handlers; path membership alone, comments, and unrelated runtime internals do not trigger it.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Plugin & Extension Contract Guard
|
# Plugin & Extension Contract Guard
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
---
|
|
||||||
name: pr-creation-checker
|
|
||||||
description: Perform the final RustFS PR preflight and draft compliant English title/body metadata immediately before creating or updating a PR. Do not use during implementation or as a second general code review.
|
|
||||||
---
|
|
||||||
|
|
||||||
# PR Creation Checker
|
|
||||||
|
|
||||||
Use this skill only at the PR boundary. Reuse completed diff review and
|
|
||||||
verification evidence; do not reread the repository or rerun equivalent checks.
|
|
||||||
|
|
||||||
## Preflight
|
|
||||||
|
|
||||||
1. Confirm the branch is based on current `origin/main` and contains only the
|
|
||||||
intended task diff.
|
|
||||||
2. Inspect `git diff --stat`, `git diff --check`, and changed file names for
|
|
||||||
secrets, logs, generated artifacts, or unrelated edits.
|
|
||||||
3. Confirm the checks selected by root `AGENTS.md` passed on the final diff.
|
|
||||||
Do not replace focused behavioral tests with a generic gate or rerun checks
|
|
||||||
already covered by an unchanged umbrella run.
|
|
||||||
4. Read `.github/pull_request_template.md`. Consult `Makefile`, `.config/make/`,
|
|
||||||
or CI only when the required command/current gate is uncertain.
|
|
||||||
5. Return `BLOCKED` for an unclean scope, missing required evidence, failed
|
|
||||||
required checks, or non-compliant metadata.
|
|
||||||
|
|
||||||
## Metadata
|
|
||||||
|
|
||||||
- Title: English Conventional Commit, at most 72 characters, with no tool
|
|
||||||
prefix.
|
|
||||||
- Body: English, exact template headings, `N/A` where needed, concise rationale,
|
|
||||||
actual verification commands, and material risks/rollback notes.
|
|
||||||
- Use repository-relative paths; never include local absolute paths.
|
|
||||||
- Keep prose paragraphs on one logical line and never include the literal
|
|
||||||
sequence `\n`.
|
|
||||||
- Use a temporary body file with `gh pr create --body-file` or
|
|
||||||
`gh pr edit --body-file`; never pass multiline Markdown inline.
|
|
||||||
|
|
||||||
## Output
|
|
||||||
|
|
||||||
- Status: `READY` or `BLOCKED`.
|
|
||||||
- Title.
|
|
||||||
- Complete PR body.
|
|
||||||
- Verification commands and results.
|
|
||||||
- Risks or `N/A`.
|
|
||||||
|
|
||||||
Immediately before the GitHub write, repeat only the five preflight checks above
|
|
||||||
against the final head.
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
interface:
|
|
||||||
display_name: "PR Creation Checker"
|
|
||||||
short_description: "Draft RustFS-ready PRs with checks, template, and blockers."
|
|
||||||
default_prompt: "Use $pr-creation-checker for final PR preflight and compliant English title/body metadata."
|
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
---
|
||||||
|
name: pr-review
|
||||||
|
description: Review a GitHub PR from a URL or number using its actual base/head and risk-appropriate code review. Use when the user asks for a PR review, not a status lookup or PR wording edit. Publish a review only when authorized; delegation and monitoring follow the requested scope and root AGENTS.md.
|
||||||
|
---
|
||||||
|
|
||||||
|
# PR Review
|
||||||
|
|
||||||
|
Use this skill for PR context and review delivery. An ordinary review request is read-only unless the conversation also authorizes posting or fixes. Reuse that authorization without asking again; prepare the review before requesting any missing publication approval.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Follow root `AGENTS.md`; classify risk with the [review policy](../../references/adversarial-validation.md) and consult relevant [change-style and boundary rules](../../references/implementation.md).
|
||||||
|
- Select `code-change-verification` for ordinary review or `adversarial-validation` for explicitly adversarial, substantial, or high-risk review; do not run both on the same diff.
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
### 1. Gather PR context
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gh pr view <N> --repo <owner/repo> --json title,author,state,body,additions,deletions,changedFiles,commits,baseRefName,headRefName,baseRefOid,headRefOid
|
||||||
|
gh pr diff <N> --repo <owner/repo> --name-only
|
||||||
|
```
|
||||||
|
|
||||||
|
Read the PR body and linked issues to understand the change's purpose. If the PR references an issue, fetch that too:
|
||||||
|
```bash
|
||||||
|
gh issue view <ISSUE> --repo <issue-owner/repo> --json title,body,state
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Fetch the diff and classify the change
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git fetch <repo-remote> <baseRefName> refs/pull/<N>/head
|
||||||
|
git diff <baseRefOid>...<headRefOid> --stat
|
||||||
|
```
|
||||||
|
|
||||||
|
Resolve `<repo-remote>` to the PR repository; do not assume the current checkout's `origin` or `main` matches. Record the exact base/head used. If either moved during fetching, refresh the snapshot before reviewing. Classify using the repository review policy; instruction changes that affect agent execution are mechanical, not exempt.
|
||||||
|
|
||||||
|
### 3. Review the changed behavior
|
||||||
|
|
||||||
|
Group files by functional area to trace callers and invariants. Use the root risk tier's review shape and only matching lenses. File count does not authorize delegation. When delegation is explicitly authorized, high-risk/substantial reviews use exactly two independent reviewers with the applicable lenses split between them; otherwise use two fresh sequential passes. Reviewers do not spawn further agents.
|
||||||
|
|
||||||
|
Findings need a concrete failure scenario with `file:line`; a null verdict briefly names the relevant probes. Reuse existing evidence and choose local checks from the final diff under the root verification policy.
|
||||||
|
|
||||||
|
### 4. Check CI status
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gh pr checks <N> --repo <owner/repo>
|
||||||
|
```
|
||||||
|
|
||||||
|
Investigate a failed check when it bears on a finding or the user requested CI diagnosis/merge readiness:
|
||||||
|
```bash
|
||||||
|
gh run view --repo <owner/repo> --log-failed --job=<JOB_ID>
|
||||||
|
```
|
||||||
|
|
||||||
|
Use current evidence to distinguish pre-existing, flaky, and PR-caused failures. Do not classify them by guesswork or turn a code-only review into unrelated CI repair.
|
||||||
|
|
||||||
|
### 5. Synthesize findings
|
||||||
|
|
||||||
|
Report the PR, reviewed base/head, and risk tier, then summarize the assessment.
|
||||||
|
Use the selected review's P0–P3 ratings and root finding standard: supported
|
||||||
|
findings with `file:line`, failure scenario, and fix, or `No findings`.
|
||||||
|
State the observed check status, including pending or unavailable checks, and
|
||||||
|
the verdict (`APPROVE`, `REQUEST_CHANGES`, or `COMMENT`). Do not infer a pass
|
||||||
|
from missing checks or add style nits to populate a clean review.
|
||||||
|
|
||||||
|
### 6. Post the review
|
||||||
|
|
||||||
|
Only when posting is authorized, write the review body to a temp file and post via CLI. Refresh the PR head first; if it changed, review the delta and update the verdict before posting:
|
||||||
|
```bash
|
||||||
|
# Request changes
|
||||||
|
gh pr review <N> --repo <owner/repo> --request-changes --body-file /tmp/pr_review.md
|
||||||
|
|
||||||
|
# Approve
|
||||||
|
gh pr review <N> --repo <owner/repo> --approve --body-file /tmp/pr_review.md
|
||||||
|
|
||||||
|
# Comment only (no verdict)
|
||||||
|
gh pr review <N> --repo <owner/repo> --comment --body-file /tmp/pr_review.md
|
||||||
|
```
|
||||||
|
|
||||||
|
For authorized inline comments, use [the submission example](references/posting.md).
|
||||||
|
|
||||||
|
Always use `--body-file` or `--input`, never inline multiline `--body`.
|
||||||
|
|
||||||
|
### 7. Handle follow-up
|
||||||
|
|
||||||
|
Follow the [PR lifecycle](../../references/pull-requests.md) and any explicit monitoring request. For follow-up, fetch the new head and compare the recorded reviewed SHA with the new SHA; revisit affected callers and findings. Never use an unfetched `origin/pull/<N>/head` ref as evidence. Update the posted review or resolve addressed threads only within existing authorization.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- The user may ask for review in Chinese; respond in the same language but keep the review body in English per AGENTS.md rules.
|
||||||
|
- When the user asks for "多角色对抗 review", run the full adversarial validation protocol — this skill's step 3 covers that.
|
||||||
|
- If the PR is from a fork, check `maintainerCanModify` before attempting to push fixes.
|
||||||
|
- For very large PRs, batch the review by functional area while keeping the same bounded review shape.
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# Inline PR Review Submission
|
||||||
|
|
||||||
|
Read only when an inline review is authorized. Recheck the PR head before posting and bind the review to the reviewed commit.
|
||||||
|
|
||||||
|
For inline comments on specific lines, use the GitHub API:
|
||||||
|
```bash
|
||||||
|
cat > /tmp/pr_review.json <<'EOF'
|
||||||
|
{
|
||||||
|
"commit_id": "<reviewed-head-sha>",
|
||||||
|
"body": "review body",
|
||||||
|
"event": "REQUEST_CHANGES",
|
||||||
|
"comments": [
|
||||||
|
{
|
||||||
|
"path": "crates/foo/src/bar.rs",
|
||||||
|
"line": 42,
|
||||||
|
"body": "finding description"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
gh api --method POST /repos/{owner}/{repo}/pulls/<N>/reviews --input /tmp/pr_review.json
|
||||||
|
```
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: rust-code-quality
|
name: rust-code-quality
|
||||||
description: Run a focused Rust quality review when the user requests one, when reviewing a Rust PR/commit, or when another selected review workflow delegates Rust-specific checks. Do not auto-load for every implementation edit.
|
description: Run a focused Rust quality review when the user requests one or a selected review workflow needs Rust-specific checks for changed behavior. Do not auto-load for every implementation edit, comment-only or formatting-only Rust diff, or repeat an already completed review.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Rust Code Quality Gate
|
# Rust Code Quality Gate
|
||||||
@@ -8,12 +8,18 @@ description: Run a focused Rust quality review when the user requests one, when
|
|||||||
Use this skill for a dedicated Rust review to cover rules that `cargo clippy`
|
Use this skill for a dedicated Rust review to cover rules that `cargo clippy`
|
||||||
does not catch.
|
does not catch.
|
||||||
|
|
||||||
|
Search matches and checklist items are candidates, not findings. Apply the root
|
||||||
|
finding standard; distinguish a demonstrated bug, an explicit rule violation,
|
||||||
|
and an optional preference. P2/P3 suggestions do not need to be invented or
|
||||||
|
included in an otherwise clean correctness review.
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
1. Identify changed `.rs` files.
|
1. Identify changed `.rs` files.
|
||||||
2. Run automated checks on changed files.
|
2. Run the matching candidate searches on changed files.
|
||||||
3. Run manual review checklist on the diff.
|
3. Apply the manual checklist sections whose behavior the diff touches.
|
||||||
4. Resolve or rebut every finding with evidence; P0/P1 findings cannot be deferred.
|
4. Report or rebut every finding with evidence; P0/P1 findings block approval.
|
||||||
|
Fix them when implementation is authorized; a read-only review reports them.
|
||||||
|
|
||||||
## Automated Checks
|
## Automated Checks
|
||||||
|
|
||||||
@@ -35,7 +41,7 @@ rg -n 'Result<.*String>' <changed-files>
|
|||||||
rg -n 'Box<dyn.*Error' <changed-files>
|
rg -n 'Box<dyn.*Error' <changed-files>
|
||||||
|
|
||||||
# 5. println/eprintln in production
|
# 5. println/eprintln in production
|
||||||
rg -n 'println!\|eprintln!' <changed-files>
|
rg -n 'println!|eprintln!' <changed-files>
|
||||||
|
|
||||||
# 6. Ordering::Relaxed usage (verify each is intentional)
|
# 6. Ordering::Relaxed usage (verify each is intentional)
|
||||||
rg -n 'Ordering::Relaxed' <changed-files>
|
rg -n 'Ordering::Relaxed' <changed-files>
|
||||||
@@ -80,7 +86,7 @@ For the Rust diff under review, verify:
|
|||||||
- [ ] Test volume and line count are never treated as production-code growth
|
- [ ] Test volume and line count are never treated as production-code growth
|
||||||
|
|
||||||
### Serde
|
### Serde
|
||||||
- [ ] Structs from untrusted input have `#[serde(deny_unknown_fields)]`
|
- [ ] Structs from untrusted input reject unknown fields where the compatibility contract permits; otherwise validate security-critical fields explicitly and test the supported input shape
|
||||||
- [ ] `#[serde(default)]` not used on security-critical fields without validation
|
- [ ] `#[serde(default)]` not used on security-critical fields without validation
|
||||||
|
|
||||||
### Code Hygiene
|
### Code Hygiene
|
||||||
@@ -104,20 +110,7 @@ For the Rust diff under review, verify:
|
|||||||
|
|
||||||
## Output Template
|
## Output Template
|
||||||
|
|
||||||
```
|
Use the calling review's output format. For a standalone review, report supported
|
||||||
## Rust Code Quality Report
|
findings with severity, location, impact, fix, and validation, or `No findings`.
|
||||||
|
Include only material unverified checks. Candidate counts are not a quality
|
||||||
### Automated Scan
|
metric and do not need a separate scan report.
|
||||||
- unwrap/expect candidates inspected: N
|
|
||||||
- numeric-cast candidates inspected: N
|
|
||||||
- error-type candidates inspected: N
|
|
||||||
- output-macro candidates inspected: N
|
|
||||||
|
|
||||||
### Findings
|
|
||||||
- [P1] `path:line` — description
|
|
||||||
- Fix: ...
|
|
||||||
- Validation: ...
|
|
||||||
|
|
||||||
### Verdict
|
|
||||||
PASS / BLOCKED (list blocking findings)
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -4,9 +4,14 @@ description: "Run the end-to-end RustFS console gate, version bump, preview vali
|
|||||||
---
|
---
|
||||||
# RustFS Release Publish (preview-validated pipeline)
|
# RustFS Release Publish (preview-validated pipeline)
|
||||||
|
|
||||||
This skill orchestrates a full release. It wraps `rustfs-release-version-bump` (which only edits version files and opens the PR) with a mandatory preview-tag validation loop before the final tag is published.
|
This skill orchestrates a full release. It wraps `rustfs-release-version-bump` (invoked here with the authorized commit/push/PR scope) with a mandatory preview-tag validation loop before the final tag is published.
|
||||||
|
|
||||||
Core design: **version files never carry a `-preview.N` suffix**. The preview suffix exists only in tag names. A preview tag creates a visible GitHub Release marked Prerelease and uploads versioned assets, but it never becomes GitHub Latest and never updates `*-latest`, `latest.json`, R2, Docker, or Helm channels. That Release is temporary: `build.yml` deletes it automatically once the final tag's Release is published, so the Releases page ends up carrying deliverables only while the `-preview.N` tags stay behind as the traceability record. This works because the binary self-reports the git tag it was built from (`build::TAG` via shadow_rs, see `rustfs/src/config/cli.rs` `SHORT_VERSION`), and `build.yml` derives artifact names and preview classification from the tag name — Cargo.toml's version is only a no-tag fallback. Therefore the preview tag and the final tag can (and MUST) point at the exact same commit: what you validated is byte-for-byte the source that ships.
|
The binary reports its build tag (`build::TAG` via shadow_rs; `SHORT_VERSION` in
|
||||||
|
`rustfs/src/config/cli.rs`), and `build.yml` derives asset names and preview
|
||||||
|
classification from that tag. Cargo.toml supplies only the no-tag fallback.
|
||||||
|
Preview and final tags must therefore share the validated source commit;
|
||||||
|
their tag-dependent version and asset names differ. The channel and cleanup
|
||||||
|
constraints are defined once under Preview tag naming and Hard rules below.
|
||||||
|
|
||||||
Pipeline shape:
|
Pipeline shape:
|
||||||
|
|
||||||
@@ -29,9 +34,9 @@ On validation failure: fix lands on main via normal PR (version files are alread
|
|||||||
- Final target version, for example `1.0.0-beta.10`.
|
- Final target version, for example `1.0.0-beta.10`.
|
||||||
- Preview iteration `N` (default: next unused preview tag for that target; check with `git tag -l '<target>-preview.*'` after `git fetch --tags`).
|
- Preview iteration `N` (default: next unused preview tag for that target; check with `git tag -l '<target>-preview.*'` after `git fetch --tags`).
|
||||||
|
|
||||||
If the target version is missing or ambiguous, stop and ask before doing anything (see the semver gate below).
|
If the target version is missing or ambiguous, collect the current release/tag baseline and ask before version edits or publication. Continue independent read-only preflight while the answer is pending (see the semver gate below).
|
||||||
|
|
||||||
## Semver gate — confirm the target version before touching anything
|
## Semver gate — resolve the target before version edits or publication
|
||||||
|
|
||||||
Versions follow [SemVer 2.0.0](https://semver.org/). Precedence reminder:
|
Versions follow [SemVer 2.0.0](https://semver.org/). Precedence reminder:
|
||||||
|
|
||||||
@@ -43,7 +48,7 @@ Numeric prerelease identifiers compare numerically (`beta.9 < beta.10`), not lex
|
|||||||
|
|
||||||
Rules:
|
Rules:
|
||||||
|
|
||||||
- A request like "发个版" / "release the next version" without an exact version string is ALWAYS ambiguous. Derive the current latest tag (`git tag --sort=-v:refname | head`), then ask the user to choose via AskUserQuestion with concrete candidates, e.g. from `1.0.0-beta.10`: next prerelease `1.0.0-beta.11`, promote to `1.0.0-rc.1`, promote to stable `1.0.0`. Never guess between these — they have very different meanings (channel promotion vs. iteration) and different CI classification consequences.
|
- A request like "发个版" / "release the next version" without an exact version string is ALWAYS ambiguous. Derive the current latest tag (`git tag --sort=-v:refname | head`), then ask the user to choose with concrete candidates, e.g. from `1.0.0-beta.10`: next prerelease `1.0.0-beta.11`, promote to `1.0.0-rc.1`, promote to stable `1.0.0`. Never guess between these — they have very different meanings (channel promotion vs. iteration) and different CI classification consequences.
|
||||||
- After a stable `X.Y.Z` exists, the next version must state which component bumps: patch `X.Y.(Z+1)` for fixes only, minor `X.(Y+1).0` for backward-compatible features, major `(X+1).0.0` for breaking changes. If the user names a bump type but not a number, compute it from the latest stable tag and echo the exact resulting version back for confirmation.
|
- After a stable `X.Y.Z` exists, the next version must state which component bumps: patch `X.Y.(Z+1)` for fixes only, minor `X.(Y+1).0` for backward-compatible features, major `(X+1).0.0` for breaking changes. If the user names a bump type but not a number, compute it from the latest stable tag and echo the exact resulting version back for confirmation.
|
||||||
- Echo the final confirmed version string verbatim in your first status report; every later phase must use exactly that string. If at any point the user's wording and the confirmed version diverge, stop and re-confirm.
|
- Echo the final confirmed version string verbatim in your first status report; every later phase must use exactly that string. If at any point the user's wording and the confirmed version diverge, stop and re-confirm.
|
||||||
|
|
||||||
@@ -77,58 +82,7 @@ Rules:
|
|||||||
|
|
||||||
### Console release gate
|
### Console release gate
|
||||||
|
|
||||||
Complete this gate before changing any RustFS version file or creating any RustFS tag. RustFS `build.yml` downloads the asset returned by `repos/rustfs/console/releases/latest`, so a successful Console build alone is insufficient.
|
Read and complete [the Console gate](references/console-gate.md) before Phase 1. Verify the latest published Console asset and exact commit; if Console main is ahead, complete its release and asset verification first. A successful build alone does not satisfy this gate.
|
||||||
|
|
||||||
1. Read the latest published Console tag and compare it with Console `main`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
CONSOLE_REPO="rustfs/console"
|
|
||||||
CONSOLE_LATEST=$(gh api "repos/${CONSOLE_REPO}/releases/latest" --jq .tag_name)
|
|
||||||
gh api "repos/${CONSOLE_REPO}/compare/${CONSOLE_LATEST}...main" \
|
|
||||||
--jq '{status, ahead_by, behind_by, commits: [.commits[] | {sha, message: .commit.message}]}'
|
|
||||||
```
|
|
||||||
|
|
||||||
- `ahead_by == 0`: no merged Console change is waiting for release. Still verify the current latest asset using step 4, then continue to Phase 1.
|
|
||||||
- `ahead_by > 0` and `behind_by == 0`: publish Console before continuing. Report the merged commits and select the next unused `vX.Y.Z` tag. Default to the next patch version when the changes are fixes or backward-compatible UI work; stop for confirmation if a minor/major bump is plausible.
|
|
||||||
- Any diverged history or `behind_by > 0`: stop and resolve the Console release baseline explicitly. Do not guess a range or publish RustFS.
|
|
||||||
|
|
||||||
2. Clone/fetch `rustfs/console` into a scratch directory and record its exact `main` commit. Before creating a tag, check for a `v*` tag or Release workflow already associated with that hash. If one is in progress, wait for it instead of creating another version:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
CONSOLE_SCRATCH=$(mktemp -d)
|
|
||||||
gh repo clone "$CONSOLE_REPO" "$CONSOLE_SCRATCH/console"
|
|
||||||
git -C "$CONSOLE_SCRATCH/console" fetch origin main --tags
|
|
||||||
CONSOLE_HASH=$(git -C "$CONSOLE_SCRATCH/console" rev-parse origin/main)
|
|
||||||
git -C "$CONSOLE_SCRATCH/console" tag --points-at "$CONSOLE_HASH" 'v*'
|
|
||||||
gh run list -R "$CONSOLE_REPO" --workflow release.yml --commit "$CONSOLE_HASH" --limit 5
|
|
||||||
```
|
|
||||||
|
|
||||||
If no release exists or is running for `CONSOLE_HASH`, create the selected annotated tag at that exact hash and push it:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git -C "$CONSOLE_SCRATCH/console" tag -a "<console-tag>" -m "Release <console-tag>" "$CONSOLE_HASH"
|
|
||||||
git -C "$CONSOLE_SCRATCH/console" push origin "<console-tag>"
|
|
||||||
```
|
|
||||||
|
|
||||||
Console tags include the `v` prefix. Pushing the tag triggers `.github/workflows/release.yml` (`🚀 Release`). Remove `CONSOLE_SCRATCH` after the gate completes.
|
|
||||||
|
|
||||||
3. Find the exact tag run and wait for completion:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gh run list -R "$CONSOLE_REPO" --workflow release.yml --branch "<console-tag>" --limit 1
|
|
||||||
gh run watch -R "$CONSOLE_REPO" "<console-run-id>" --exit-status
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Block until the published Release is non-draft, the latest endpoint returns the expected tag, and `rustfs-console-<console-tag>.zip` is uploaded, non-empty, and carries a `sha256:` digest:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gh release view -R "$CONSOLE_REPO" "<console-tag>" --json isDraft,isPrerelease,assets,url
|
|
||||||
test "$(gh api "repos/${CONSOLE_REPO}/releases/latest" --jq .tag_name)" = "<console-tag>"
|
|
||||||
test "$(gh api "repos/${CONSOLE_REPO}/releases/tags/<console-tag>" \
|
|
||||||
--jq '[.assets[] | select(.name == "rustfs-console-<console-tag>.zip" and .state == "uploaded" and .size > 0 and (.digest | startswith("sha256:")))] | length')" -eq 1
|
|
||||||
```
|
|
||||||
|
|
||||||
Treat a missing/mismatched asset, digest, latest tag, or failed/cancelled workflow as BLOCKED. Do not start Phase 1 until the Console gate passes. Record `CONSOLE_TAG`, `CONSOLE_HASH`, Console run URL, and Release URL for the final report.
|
|
||||||
|
|
||||||
## Phase 1 — Version bump to the final target (once)
|
## Phase 1 — Version bump to the final target (once)
|
||||||
|
|
||||||
@@ -164,54 +118,9 @@ On a restart (N+1), refresh `PREVIEW_HASH=$(git rev-parse origin/main)` first
|
|||||||
- Record `PREVIOUS_DELIVERABLE`, selected from published Releases by `publishedAt` after excluding the current tag and every `-preview.N` tag. Verify `gh release view "<preview-tag>" --json body --jq .body` contains `## What's Changed` and, when `PREVIOUS_DELIVERABLE` exists, `**Full Changelog**: https://github.com/rustfs/rustfs/compare/<PREVIOUS_DELIVERABLE>...<preview-tag>`. For a repository with no previous deliverable, verify a Full Changelog link exists and record the GitHub baseline fallback.
|
- Record `PREVIOUS_DELIVERABLE`, selected from published Releases by `publishedAt` after excluding the current tag and every `-preview.N` tag. Verify `gh release view "<preview-tag>" --json body --jq .body` contains `## What's Changed` and, when `PREVIOUS_DELIVERABLE` exists, `**Full Changelog**: https://github.com/rustfs/rustfs/compare/<PREVIOUS_DELIVERABLE>...<preview-tag>`. For a repository with no previous deliverable, verify a Full Changelog link exists and record the GitHub baseline fallback.
|
||||||
- Confirm preview-triggered Docker and Helm jobs are skipped. Preview validation covers the built RustFS binaries, embedded console, and rc compatibility; Docker image construction and Helm publication are deferred to the final tag because the Dockerfiles consume GitHub Release assets.
|
- Confirm preview-triggered Docker and Helm jobs are skipped. Preview validation covers the built RustFS binaries, embedded console, and rc compatibility; Docker image construction and Helm publication are deferred to the final tag because the Dockerfiles consume GitHub Release assets.
|
||||||
|
|
||||||
## Phase 4 — Run the artifact locally, verify the console
|
## Phases 4–5 — Local artifact, Console, and rc acceptance
|
||||||
|
|
||||||
Work inside the session scratchpad directory; never leave stray data dirs.
|
Read and complete [preview acceptance](references/preview-acceptance.md): verify the downloaded binary's tag/SHA and readiness, exercise Console CRUD with byte-identical download, and pass the full latest-rc command matrix. Any failure blocks final publication. Retain the results for the confirmation gate below.
|
||||||
|
|
||||||
```bash
|
|
||||||
gh release download "<preview-tag>" -p "rustfs-macos-aarch64-v<preview-tag>.zip" -D "$SCRATCH"
|
|
||||||
cd "$SCRATCH" && unzip -o rustfs-*.zip
|
|
||||||
./rustfs --version # must report the PREVIEW TAG (build::TAG), not the Cargo.toml version, plus expected short SHA
|
|
||||||
mkdir -p data
|
|
||||||
RUSTFS_ACCESS_KEY=rustfsadmin RUSTFS_SECRET_KEY=rustfsadmin ./rustfs ./data
|
|
||||||
```
|
|
||||||
|
|
||||||
Defaults: S3 endpoint `:9000`, embedded console `:9001`.
|
|
||||||
|
|
||||||
Checks (all must pass):
|
|
||||||
|
|
||||||
- `./rustfs --version` reports the preview tag name and the short SHA of `PREVIEW_HASH`. Reporting `<target>` without the `-preview.N` suffix means the build did not embed the tag — treat as FAIL and investigate before proceeding.
|
|
||||||
- `curl -fsS http://localhost:9000/health/ready` returns ready.
|
|
||||||
- Startup log shows the embedded console being served (this was the regression that `fix(release): require embedded console assets` guards).
|
|
||||||
- Open `http://localhost:9001` in the browser: login with `rustfsadmin`/`rustfsadmin`; dashboard renders without JS console errors; create a bucket, upload a file, download it back (byte-identical), delete the object and bucket. Keep the server running for Phase 5.
|
|
||||||
|
|
||||||
## Phase 5 — Validate with the latest rc client
|
|
||||||
|
|
||||||
`rc` is the RustFS CLI client from <https://github.com/rustfs/cli>.
|
|
||||||
|
|
||||||
- Ensure the latest release is installed: compare `rc --version` against `gh api repos/rustfs/cli/releases/latest --jq .tag_name`; update via `brew upgrade rustfs/tap/rc` (or download the release binary).
|
|
||||||
- Point it at the preview server and run the command matrix, recording PASS/FAIL per command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
rc alias set preview http://localhost:9000 rustfsadmin rustfsadmin
|
|
||||||
rc ls preview/
|
|
||||||
rc mb preview/rel-check
|
|
||||||
rc cp <local-file> preview/rel-check/
|
|
||||||
rc stat preview/rel-check/<file>
|
|
||||||
rc cat preview/rel-check/<file> # matches source
|
|
||||||
rc cp preview/rel-check/<file> ./out && cmp <local-file> ./out
|
|
||||||
rc cp -r <local-dir>/ preview/rel-check/dir/
|
|
||||||
rc find preview/rel-check --name "*"
|
|
||||||
rc share download preview/rel-check/<file> --expire 1h # presigned URL fetchable via curl
|
|
||||||
rc rm preview/rel-check/<file> && rc rm -r --force preview/rel-check/dir
|
|
||||||
rc rb preview/rel-check
|
|
||||||
rc admin user list preview/
|
|
||||||
rc admin user add preview/ relcheckuser relchecksecret12
|
|
||||||
rc admin user remove preview/ relcheckuser
|
|
||||||
rc alias remove preview
|
|
||||||
```
|
|
||||||
|
|
||||||
- Any FAIL blocks the release. Afterwards stop the server and delete the scratch data directory.
|
|
||||||
|
|
||||||
### Manual confirmation gate
|
### Manual confirmation gate
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
# Console Release Gate
|
||||||
|
|
||||||
|
Read during Phase 0, before changing RustFS version files or tags. Follow the parent skill's release scope and authorization rules.
|
||||||
|
|
||||||
|
### Console release gate
|
||||||
|
|
||||||
|
Complete this gate before changing any RustFS version file or creating any RustFS tag. RustFS `build.yml` downloads the asset returned by `repos/rustfs/console/releases/latest`, so a successful Console build alone is insufficient.
|
||||||
|
|
||||||
|
1. Read the latest published Console tag and compare it with Console `main`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
CONSOLE_REPO="rustfs/console"
|
||||||
|
CONSOLE_LATEST=$(gh api "repos/${CONSOLE_REPO}/releases/latest" --jq .tag_name)
|
||||||
|
gh api "repos/${CONSOLE_REPO}/compare/${CONSOLE_LATEST}...main" \
|
||||||
|
--jq '{status, ahead_by, behind_by, commits: [.commits[] | {sha, message: .commit.message}]}'
|
||||||
|
```
|
||||||
|
|
||||||
|
- `ahead_by == 0`: no merged Console change is waiting for release. Still verify the current latest asset using step 4, then continue to Phase 1.
|
||||||
|
- `ahead_by > 0` and `behind_by == 0`: publish Console before continuing. Report the merged commits and select the next unused `vX.Y.Z` tag. Default to the next patch version when the changes are fixes or backward-compatible UI work; stop for confirmation if a minor/major bump is plausible.
|
||||||
|
- Any diverged history or `behind_by > 0`: stop and resolve the Console release baseline explicitly. Do not guess a range or publish RustFS.
|
||||||
|
|
||||||
|
2. Clone/fetch `rustfs/console` into a scratch directory and record its exact `main` commit. Before creating a tag, check for a `v*` tag or Release workflow already associated with that hash. If one is in progress, wait for it instead of creating another version:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
CONSOLE_SCRATCH=$(mktemp -d)
|
||||||
|
gh repo clone "$CONSOLE_REPO" "$CONSOLE_SCRATCH/console"
|
||||||
|
git -C "$CONSOLE_SCRATCH/console" fetch origin main --tags
|
||||||
|
CONSOLE_HASH=$(git -C "$CONSOLE_SCRATCH/console" rev-parse origin/main)
|
||||||
|
git -C "$CONSOLE_SCRATCH/console" tag --points-at "$CONSOLE_HASH" 'v*'
|
||||||
|
gh run list -R "$CONSOLE_REPO" --workflow release.yml --commit "$CONSOLE_HASH" --limit 5
|
||||||
|
```
|
||||||
|
|
||||||
|
If no release exists or is running for `CONSOLE_HASH`, create the selected annotated tag at that exact hash and push it:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git -C "$CONSOLE_SCRATCH/console" tag -a "<console-tag>" -m "Release <console-tag>" "$CONSOLE_HASH"
|
||||||
|
git -C "$CONSOLE_SCRATCH/console" push origin "<console-tag>"
|
||||||
|
```
|
||||||
|
|
||||||
|
Console tags include the `v` prefix. Pushing the tag triggers `.github/workflows/release.yml` (`🚀 Release`). Remove `CONSOLE_SCRATCH` after the gate completes.
|
||||||
|
|
||||||
|
3. Find the exact tag run and wait for completion:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gh run list -R "$CONSOLE_REPO" --workflow release.yml --branch "<console-tag>" --limit 1
|
||||||
|
gh run watch -R "$CONSOLE_REPO" "<console-run-id>" --exit-status
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Block until the published Release is non-draft, the latest endpoint returns the expected tag, and `rustfs-console-<console-tag>.zip` is uploaded, non-empty, and carries a `sha256:` digest:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gh release view -R "$CONSOLE_REPO" "<console-tag>" --json isDraft,isPrerelease,assets,url
|
||||||
|
test "$(gh api "repos/${CONSOLE_REPO}/releases/latest" --jq .tag_name)" = "<console-tag>"
|
||||||
|
test "$(gh api "repos/${CONSOLE_REPO}/releases/tags/<console-tag>" \
|
||||||
|
--jq '[.assets[] | select(.name == "rustfs-console-<console-tag>.zip" and .state == "uploaded" and .size > 0 and (.digest | startswith("sha256:")))] | length')" -eq 1
|
||||||
|
```
|
||||||
|
|
||||||
|
Treat a missing/mismatched asset, digest, latest tag, or failed/cancelled workflow as BLOCKED. Do not start Phase 1 until the Console gate passes. Record `CONSOLE_TAG`, `CONSOLE_HASH`, Console run URL, and Release URL for the final report.
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# Preview Artifact Acceptance
|
||||||
|
|
||||||
|
Read after Phase 3 succeeds. Complete every check below before the parent skill's manual confirmation gate. These checks cover the downloaded artifact, embedded Console, and latest rc client.
|
||||||
|
|
||||||
|
## Phase 4 — Run the artifact locally, verify the console
|
||||||
|
|
||||||
|
Work inside the session scratchpad directory; never leave stray data dirs.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gh release download "<preview-tag>" -p "rustfs-macos-aarch64-v<preview-tag>.zip" -D "$SCRATCH"
|
||||||
|
cd "$SCRATCH" && unzip -o rustfs-*.zip
|
||||||
|
./rustfs --version # must report the PREVIEW TAG (build::TAG), not the Cargo.toml version, plus expected short SHA
|
||||||
|
mkdir -p data
|
||||||
|
RUSTFS_ACCESS_KEY=rustfsadmin RUSTFS_SECRET_KEY=rustfsadmin ./rustfs ./data
|
||||||
|
```
|
||||||
|
|
||||||
|
Defaults: S3 endpoint `:9000`, embedded console `:9001`.
|
||||||
|
|
||||||
|
Checks (all must pass):
|
||||||
|
|
||||||
|
- `./rustfs --version` reports the preview tag name and the short SHA of `PREVIEW_HASH`. Reporting `<target>` without the `-preview.N` suffix means the build did not embed the tag — treat as FAIL and investigate before proceeding.
|
||||||
|
- `curl -fsS http://localhost:9000/health/ready` returns ready.
|
||||||
|
- Startup log shows the embedded console being served (this was the regression that `fix(release): require embedded console assets` guards).
|
||||||
|
- Open `http://localhost:9001` in the browser: login with `rustfsadmin`/`rustfsadmin`; dashboard renders without JS console errors; create a bucket, upload a file, download it back (byte-identical), delete the object and bucket. Keep the server running for Phase 5.
|
||||||
|
|
||||||
|
## Phase 5 — Validate with the latest rc client
|
||||||
|
|
||||||
|
`rc` is the RustFS CLI client from <https://github.com/rustfs/cli>.
|
||||||
|
|
||||||
|
- Ensure the latest release is installed: compare `rc --version` against `gh api repos/rustfs/cli/releases/latest --jq .tag_name`; update via `brew upgrade rustfs/tap/rc` (or download the release binary).
|
||||||
|
- Point it at the preview server and run the command matrix, recording PASS/FAIL per command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rc alias set preview http://localhost:9000 rustfsadmin rustfsadmin
|
||||||
|
rc ls preview/
|
||||||
|
rc mb preview/rel-check
|
||||||
|
rc cp <local-file> preview/rel-check/
|
||||||
|
rc stat preview/rel-check/<file>
|
||||||
|
rc cat preview/rel-check/<file> # matches source
|
||||||
|
rc cp preview/rel-check/<file> ./out && cmp <local-file> ./out
|
||||||
|
rc cp -r <local-dir>/ preview/rel-check/dir/
|
||||||
|
rc find preview/rel-check --name "*"
|
||||||
|
rc share download preview/rel-check/<file> --expire 1h # presigned URL fetchable via curl
|
||||||
|
rc rm preview/rel-check/<file> && rc rm -r --force preview/rel-check/dir
|
||||||
|
rc rb preview/rel-check
|
||||||
|
rc admin user list preview/
|
||||||
|
rc admin user add preview/ relcheckuser relchecksecret12
|
||||||
|
rc admin user remove preview/ relcheckuser
|
||||||
|
rc alias remove preview
|
||||||
|
```
|
||||||
|
|
||||||
|
- Any FAIL blocks the release. Afterwards stop the server and delete the scratch data directory.
|
||||||
@@ -4,17 +4,16 @@ description: "Prepare the version-file and release-asset bump for an exact RustF
|
|||||||
---
|
---
|
||||||
# RustFS Release Version Bump
|
# RustFS Release Version Bump
|
||||||
|
|
||||||
Use this skill to publish a RustFS release (alpha, beta, or stable) with a minimal, auditable diff and a complete ship flow (`edit -> verify -> commit -> push -> PR`).
|
Use this skill to prepare and verify release version files. Commit, push, and PR steps apply only when included in the user's delivery scope; publishing release tags belongs to `rustfs-release-publish`.
|
||||||
|
|
||||||
Validated baseline: release pattern used in PR `#2957`.
|
Validated baseline: release pattern used in PR `#2957`.
|
||||||
|
|
||||||
## Required inputs
|
## Required inputs
|
||||||
|
|
||||||
- Exact target version, for example `1.0.0-beta.4`.
|
- Exact target version, for example `1.0.0-beta.4`.
|
||||||
- Delivery scope:
|
- Delivery scope: local (`edit/verify`), git (`commit/push`), or GitHub
|
||||||
- Local only (`edit/verify`).
|
(`commit/push/PR`). Derive it from the conversation; when unspecified, prepare
|
||||||
- Local + git (`commit/push`).
|
and verify locally without blocking on a delivery question.
|
||||||
- Full GitHub flow (`commit/push/PR`).
|
|
||||||
|
|
||||||
If target version is missing or ambiguous, stop and ask before editing.
|
If target version is missing or ambiguous, stop and ask before editing.
|
||||||
|
|
||||||
@@ -23,7 +22,7 @@ Reject any target version containing `-preview`: preview identifiers are tag-onl
|
|||||||
## Read before editing
|
## Read before editing
|
||||||
|
|
||||||
- `AGENTS.md` (root and nearest path-specific files).
|
- `AGENTS.md` (root and nearest path-specific files).
|
||||||
- `.github/pull_request_template.md`.
|
- `.github/pull_request_template.md` only when preparing a PR.
|
||||||
- Current branch status and diff against `origin/main`.
|
- Current branch status and diff against `origin/main`.
|
||||||
|
|
||||||
## Default release file scope
|
## Default release file scope
|
||||||
@@ -50,8 +49,7 @@ Only drop a file when the current repository release process clearly no longer r
|
|||||||
## Step-by-step workflow
|
## Step-by-step workflow
|
||||||
|
|
||||||
1. Confirm intent and isolate scope
|
1. Confirm intent and isolate scope
|
||||||
- Confirm target version string exactly.
|
- Use the exact target and delivery scope already supplied; ask only for a missing or ambiguous target or a material release-policy choice.
|
||||||
- Confirm whether user requested local-only or full GitHub flow.
|
|
||||||
- Inspect current branch and ensure only release-related files are touched for this task.
|
- Inspect current branch and ensure only release-related files are touched for this task.
|
||||||
|
|
||||||
2. Update workspace versions
|
2. Update workspace versions
|
||||||
@@ -82,18 +80,18 @@ Only drop a file when the current repository release process clearly no longer r
|
|||||||
4. Verify before shipping
|
4. Verify before shipping
|
||||||
- Run:
|
- Run:
|
||||||
- `make pre-commit`
|
- `make pre-commit`
|
||||||
- If `make pre-commit` fails, return `BLOCKED` with root cause and do not silently widen scope to fix unrelated issues unless user asks.
|
- If `make pre-commit` fails, fix task-attributable failures and rerun affected checks. Report unresolved required checks as `BLOCKED`; do not silently widen scope to fix unrelated issues.
|
||||||
|
|
||||||
5. Commit strategy
|
5. Commit strategy (only when committing is authorized)
|
||||||
- Preferred split when both parts changed:
|
- Preferred split when both parts changed:
|
||||||
- `chore(release): prepare <version>` for `Cargo.toml` and `Cargo.lock`.
|
- `chore(release): prepare <version>` for `Cargo.toml` and `Cargo.lock`.
|
||||||
- `chore(release): align release assets for <version>` for docs and packaging files.
|
- `chore(release): align release assets for <version>` for docs and packaging files.
|
||||||
- If user asks for one commit, use one commit.
|
- If user asks for one commit, use one commit.
|
||||||
- Stage only intended release files; do not include unrelated working tree changes.
|
- Stage only intended release files; do not include unrelated working tree changes.
|
||||||
|
|
||||||
6. Push and PR
|
6. Push and PR (only for the authorized delivery scope)
|
||||||
- Push branch:
|
- Push branch:
|
||||||
- `git push -u origin <branch>` (first push), or `git push` (tracking already exists).
|
- Use the user-requested or configured push remote: `git push -u <push-remote> <branch>` (first push), or `git push` when tracking is already configured.
|
||||||
- Create PR with template headings unchanged:
|
- Create PR with template headings unchanged:
|
||||||
- `gh pr create --base main --head <branch> --title ... --body-file ...`
|
- `gh pr create --base main --head <branch> --title ... --body-file ...`
|
||||||
- PR title/body must be English.
|
- PR title/body must be English.
|
||||||
|
|||||||
@@ -12,8 +12,9 @@ matched security surface, the concise security reference under
|
|||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
1. Freeze the exact diff/head and identify the changed trust boundaries.
|
1. Freeze the exact diff/head and identify the changed trust boundaries.
|
||||||
2. Read [advisory-patterns.md](references/advisory-patterns.md), then apply only
|
2. Inspect the headings in [advisory-patterns.md](references/advisory-patterns.md),
|
||||||
the matching sections. Useful headings are
|
then read the matching sections. Read the full map only for a broad security
|
||||||
|
audit. Useful headings are
|
||||||
auth/admin, IAM/STS/OIDC, policy/plugins, S3/copy/multipart, protocols, paths,
|
auth/admin, IAM/STS/OIDC, policy/plugins, S3/copy/multipart, protocols, paths,
|
||||||
secrets/logging/RPC, browser/CORS/proxy, SSE, Object Lock, and serde.
|
secrets/logging/RPC, browser/CORS/proxy, SSE, Object Lock, and serde.
|
||||||
3. Trace unauthenticated, low-privilege, wrong-action/owner/bucket, malformed,
|
3. Trace unauthenticated, low-privilege, wrong-action/owner/bucket, malformed,
|
||||||
|
|||||||
@@ -108,9 +108,9 @@ Update this file only when an advisory adds or changes a reusable lesson, affect
|
|||||||
|
|
||||||
### Serde deserialization and input validation
|
### Serde deserialization and input validation
|
||||||
|
|
||||||
- No `#[serde(deny_unknown_fields)]` found across the entire codebase. Lesson: all structs deserialized from untrusted input (S3 API XML/JSON, lifecycle rules, bucket policies, replication configs) should have `#[serde(deny_unknown_fields)]` to reject malformed or adversarial payloads.
|
- Reject unknown fields in untrusted S3 API XML/JSON, lifecycle, policy, and replication input where compatibility permits. Check the current type and supported payload fixtures; do not infer the repository's current coverage from an older audit. Where extra fields are part of the compatibility contract, validate security-critical values explicitly.
|
||||||
- `#[serde(default)]` on security-critical fields silently accepts missing values as zero/empty. Lesson: when a field has security implications (retention days, permissions, limits), validate the deserialized value explicitly rather than relying on defaults.
|
- `#[serde(default)]` on security-critical fields silently accepts missing values as zero/empty. Lesson: when a field has security implications (retention days, permissions, limits), validate the deserialized value explicitly rather than relying on defaults.
|
||||||
- Integer fields deserialized from user input and cast with `as` (e.g., `i32 as u32`) can wrap negative values to large positives. Lesson: validate ranges before casting; use `try_into()` or clamp.
|
- Integer fields deserialized from user input and cast with `as` (e.g., `i32 as u32`) can wrap negative values to large positives. Lesson: validate ranges before casting; use `try_into()` with a typed error, or clamp only when the domain explicitly requires saturation.
|
||||||
- XML config typos (e.g., `"NoncurentDays"` instead of `"NoncurrentDays"`) are silently accepted when `deny_unknown_fields` is absent. Lesson: strict deserialization prevents silent misconfiguration that could cause data loss or unexpected retention behavior.
|
- XML config typos (e.g., `"NoncurentDays"` instead of `"NoncurrentDays"`) are silently accepted when `deny_unknown_fields` is absent. Lesson: strict deserialization prevents silent misconfiguration that could cause data loss or unexpected retention behavior.
|
||||||
|
|
||||||
## Useful Search Seeds
|
## Useful Search Seeds
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: test-coverage-improver
|
name: test-coverage-improver
|
||||||
description: Run project coverage checks, rank high-risk gaps, and propose high-impact tests to improve regression confidence for changed and critical code paths before release.
|
description: Analyze a supplied coverage report or perform an explicitly requested RustFS coverage assessment, rank uncovered risks, and propose focused tests. Do not trigger for ordinary implementation verification, a single regression test, documentation wording, or release preparation without a coverage request.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Test Coverage Improver
|
# Test Coverage Improver
|
||||||
@@ -9,58 +9,49 @@ Use this skill when you need a prioritized, risk-aware plan to improve tests fro
|
|||||||
|
|
||||||
## Usage assumptions
|
## Usage assumptions
|
||||||
- Focus scope is either changed lines/files, a module, or the whole repository.
|
- Focus scope is either changed lines/files, a module, or the whole repository.
|
||||||
- Coverage artifact must be generated or provided in a supported format.
|
- Reuse a supplied coverage artifact when its revision, scope, and format match.
|
||||||
- If required context is missing, call out assumptions explicitly before proposing work.
|
- If required context is missing, call out assumptions explicitly before proposing work.
|
||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
1. Define scope and baseline
|
1. Define scope and baseline
|
||||||
- Confirm target language, framework, and branch.
|
- Derive the revision and scope from the request, diff, or supplied report.
|
||||||
- Confirm whether the scope is changed files only or full-repo.
|
- Default to the affected files/module; whole-workspace coverage requires that
|
||||||
|
scope in the request. Ask only if a wrong scope would change the result.
|
||||||
|
|
||||||
2. Produce coverage snapshot
|
2. Obtain coverage evidence
|
||||||
- Rust: `cargo llvm-cov` (or `cargo tarpaulin`) with existing repo config.
|
- First inspect a matching existing artifact; do not regenerate it merely
|
||||||
- JavaScript/TypeScript: `npm test -- --coverage` and read `coverage/coverage-final.json`.
|
because this skill was selected.
|
||||||
- Python: `pytest --cov=<pkg> --cov-report=json` and read `coverage.json`.
|
- If measurement is needed, read the Coverage section of
|
||||||
- Collect total, per-file, and changed-line coverage.
|
[the testing guide](../../../docs/testing/README.md#coverage), check disk
|
||||||
|
space/tool availability, and select package/test-scoped `cargo llvm-cov`
|
||||||
|
using the repository's nextest configuration. `make coverage` measures the
|
||||||
|
whole workspace (excluding E2E) and is only for that requested scope.
|
||||||
|
- Collect only metrics the report supports. Missing branch/changed-line
|
||||||
|
coverage is unknown, not zero.
|
||||||
|
- If measurement cannot run, continue with code-based test proposals and
|
||||||
|
mark measured coverage unverified; do not invent a coverage percentage.
|
||||||
|
|
||||||
3. Rank highest-risk gaps
|
3. Rank highest-risk gaps
|
||||||
- Prioritize changed code, branch coverage gaps, and low-confidence boundaries.
|
- Prioritize changed code, branch coverage gaps, and low-confidence boundaries.
|
||||||
- Apply the risk rubric in [coverage-prioritization.md](references/coverage-prioritization.md).
|
- Apply the risk rubric in [coverage-prioritization.md](references/coverage-prioritization.md).
|
||||||
- Keep shortlist to 5–8 gaps.
|
- Report up to 5–8 evidenced gaps; do not pad a small scope.
|
||||||
- For each gap, capture: file, lines, uncovered branches, and estimated risk score.
|
- For each gap, capture: file, lines, uncovered branches, and estimated risk score.
|
||||||
|
|
||||||
4. Propose high-impact tests
|
4. Propose high-impact tests
|
||||||
- For each shortlisted gap, output:
|
- For each gap, name the behavior and regression, distinguishing assertions,
|
||||||
- Intent and expected behavior.
|
relevant normal/edge/failure cases, necessary setup, and estimated effort.
|
||||||
- Normal, edge, and failure scenarios.
|
- Include only scenarios and setup that apply; reuse shared fixture details.
|
||||||
- Assertions and side effects to verify.
|
|
||||||
- Setup needs (fixtures, mocks, integration dependencies).
|
|
||||||
- Estimated effort (`S/M/L`).
|
|
||||||
|
|
||||||
5. Close with validation plan
|
5. Close with validation plan
|
||||||
- State which gaps remain after proposals.
|
- State which gaps remain after proposals.
|
||||||
- Provide concrete verification command and acceptance threshold.
|
- Give a scoped verification command and behavior-based acceptance criterion;
|
||||||
|
use a coverage threshold only when the task or repository requires one.
|
||||||
- List assumptions or blockers (environment, fixtures, flaky dependencies).
|
- List assumptions or blockers (environment, fixtures, flaky dependencies).
|
||||||
|
|
||||||
## Output template
|
## Report
|
||||||
|
|
||||||
### Coverage Snapshot
|
Summarize the supported metrics, then combine each ranked gap with its proposed
|
||||||
- total / branch coverage
|
test and validation. Include source lines only when supplied or inspected;
|
||||||
- changed-file coverage
|
mark missing metrics or locations as unknown. Do not duplicate gaps and tests
|
||||||
- top missing regions by size
|
in separate templates or fill empty categories for an otherwise small report.
|
||||||
|
|
||||||
### Top Gaps (ranked)
|
|
||||||
- `path:line-range` | risk score | why critical
|
|
||||||
|
|
||||||
### Test Proposals
|
|
||||||
- `path:line-range`
|
|
||||||
- Test name
|
|
||||||
- scenarios
|
|
||||||
- assertions
|
|
||||||
- effort
|
|
||||||
|
|
||||||
### Validation Plan
|
|
||||||
- command
|
|
||||||
- pass criteria
|
|
||||||
- remaining risk
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
interface:
|
interface:
|
||||||
display_name: "Test Coverage Improver"
|
display_name: "Test Coverage Improver"
|
||||||
short_description: "Find top uncovered risk areas and propose high-impact tests."
|
short_description: "Find top uncovered risk areas and propose high-impact tests."
|
||||||
default_prompt: "Run coverage checks, identify largest gaps, and recommend highest-impact test cases to improve risk coverage."
|
default_prompt: "Use $test-coverage-improver to analyze coverage for the requested scope, reuse matching reports, and propose tests for evidenced risks."
|
||||||
|
|||||||
@@ -5,8 +5,11 @@ description: Debug ILM tiering / lifecycle transition issues — NoSuchVersion o
|
|||||||
|
|
||||||
# Tier / ILM Debugging
|
# Tier / ILM Debugging
|
||||||
|
|
||||||
Full playbook: [docs/operations/tier-ilm-debugging.md](../../../docs/operations/tier-ilm-debugging.md)
|
Playbook: [docs/operations/tier-ilm-debugging.md](../../../docs/operations/tier-ilm-debugging.md).
|
||||||
— read it before changing tier code.
|
Read the section matching the symptom: metadata/`xl.meta`, runtime versionId,
|
||||||
|
manual jobs, or retained-record recovery. Read the local-first expiry invariant
|
||||||
|
before changing cleanup ordering. Before a reconcile/disposition action, read
|
||||||
|
its entire procedure and retain its exact-evidence and confirmation gates.
|
||||||
|
|
||||||
Quick moves:
|
Quick moves:
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Bound individual tool outputs retained in context; retrieve relevant ranges
|
||||||
|
# from task-owned log files when more evidence is needed.
|
||||||
|
# https://learn.chatgpt.com/docs/config-file/config-reference
|
||||||
|
|
||||||
|
tool_output_token_limit = 4000
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sha256-linux=563bff8f1171d6dbe166ff8440310dbe98430e466aa3ecd8dc39e3c872b320f7
|
||||||
|
sha256-darwin=563bff8f1171d6dbe166ff8440310dbe98430e466aa3ecd8dc39e3c872b320f7
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
sha256-darwin=ef914ec0b8daa9c2c5e52f501d339914662f42d6f6ed9d33877d56b97adf16f9
|
sha256-darwin=874c881d7b45f12378a5817c7f42c95c4981960a2ec9ce12dcf4af239ae1f9d5
|
||||||
sha256-linux=a8a816d7bb0e7cb5632b1863b33794bcb9fc7e765f150aa5e1bf16518e28dfb4
|
sha256-linux=9515861be899ceb10e2e0ef93c34208bb7a7a8a7f8067a02db4cfba23270ebd6
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
sha256=51da41c54167602f2bd6c45921b39a44562bf3cfcdf468d992bb992c62cad7fd
|
sha256-darwin=83a7dcaffd5a789517ae9f02a224f66a9713937885cff96fca2ad7e216f197ae
|
||||||
|
sha256-linux=626c10f8c964507ff987b6c86069e9019dc6d2ae7fb02db9be5df5aa8cc5145b
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
sha256=87c05c46d611ea7ed3feb5f7276bda8e5a0f70d72165d305d73a457907e7ba79
|
||||||
@@ -1 +1 @@
|
|||||||
sha256=8d5517f5f2fc32d561782dfccd51b7f746f5e25b2835e37e100c883f7f18777d
|
sha256=0e338d305260229e17ccfb2adc48a6212dbdfea36a9ebfb5a4e0d38658e6cc45
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
sha256=dbebfbab9b9efd4eff31211e69dd32235dc00e207f2ab0dd919a1b2ac9e724c2
|
sha256=6d18f9cce820c51d5589de944e8cc185f73eeca0ea9a9916651943e3759169d0
|
||||||
|
|||||||
@@ -0,0 +1,87 @@
|
|||||||
|
{
|
||||||
|
"lane": "ci/test-and-lint",
|
||||||
|
"tests": [
|
||||||
|
{
|
||||||
|
"invariant": "write-quorum",
|
||||||
|
"suite": "rustfs-ecstore",
|
||||||
|
"name": "set_disk::ops::object::inline_put_commit_path_tests::inline_put_direct_commit_accepts_exact_quorum_and_rejects_quorum_minus_one"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"invariant": "metadata-rollback",
|
||||||
|
"suite": "rustfs-ecstore",
|
||||||
|
"name": "set_disk::core::io_primitives::tests::write_unique_file_info_reverts_metadata_when_write_quorum_fails"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"invariant": "stale-writer",
|
||||||
|
"suite": "rustfs-ecstore",
|
||||||
|
"name": "set_disk::ops::object::put_object_tmp_cleanup_tests::put_object_no_lock_aborts_after_outer_namespace_lock_loss"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"invariant": "range-body",
|
||||||
|
"suite": "rustfs-ecstore",
|
||||||
|
"name": "set_disk::ops::object::transition_upload_integrity_tests::transitioned_compressed_object_range_get_returns_plaintext_slice"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"invariant": "multipart-cancellation",
|
||||||
|
"suite": "rustfs-ecstore",
|
||||||
|
"name": "set_disk::ops::multipart::tests::cancelled_complete_keeps_upload_lock_through_tail_cleanup"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"invariant": "list-uncommitted-version",
|
||||||
|
"suite": "rustfs-filemeta",
|
||||||
|
"name": "metacache::tests::resolve_with_write_quorum_slack_keeps_partial_latest_hidden_during_merge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"invariant": "minio-object-fixture",
|
||||||
|
"suite": "rustfs-filemeta",
|
||||||
|
"name": "filemeta::test::parses_real_minio_object_xlmeta"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"invariant": "corrupt-part-arrays",
|
||||||
|
"suite": "rustfs-filemeta",
|
||||||
|
"name": "filemeta::test::crc_valid_but_part_arrays_corrupt_into_fileinfo_errors_not_panics"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"invariant": "odm-source-contract-s3",
|
||||||
|
"suite": "rustfs",
|
||||||
|
"name": "on_demand_migration::source_client::tests::s3_backend_satisfies_the_shared_backend_contract"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"invariant": "odm-source-contract-azure",
|
||||||
|
"suite": "rustfs",
|
||||||
|
"name": "on_demand_migration::azure::tests::azure_backend_satisfies_the_shared_backend_contract"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"invariant": "odm-source-contract-gcs",
|
||||||
|
"suite": "rustfs",
|
||||||
|
"name": "on_demand_migration::gcs::tests::gcs_native_backend_satisfies_the_shared_backend_contract"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fixtures": [
|
||||||
|
{
|
||||||
|
"path": "crates/filemeta/tests/fixtures/minio/object_large_bin.xlmeta.hex",
|
||||||
|
"sha256": "e8093767806d701e639b48d023190e858fbc4cde69bcfd83c22af8cba8452ce5",
|
||||||
|
"source": "MinIO RELEASE.2025-07-23T15-54-02Z; crates/ecstore/tests/fixtures/minio/README.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "crates/filemeta/tests/fixtures/minio/object_small_txt.xlmeta.hex",
|
||||||
|
"sha256": "2a415ad3a3be5a9440035d4026ff880e0e8c1ec1701be9f4e077734e8dce03da",
|
||||||
|
"source": "MinIO RELEASE.2025-07-23T15-54-02Z; crates/ecstore/tests/fixtures/minio/README.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "crates/filemeta/tests/fixtures/minio/object_versioned_txt.xlmeta.hex",
|
||||||
|
"sha256": "7f21f50c326dd8b0228deb6dbdb7052b3d0a3f8ee6c85d43486f0e6bb7a97261",
|
||||||
|
"source": "MinIO RELEASE.2025-07-23T15-54-02Z; crates/ecstore/tests/fixtures/minio/README.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "crates/ecstore/tests/fixtures/minio/bucket_metadata.blob.hex",
|
||||||
|
"sha256": "f2b6e260aff106adf6039feb1c645686e84e75404ff725491fb18668be5db203",
|
||||||
|
"source": "MinIO RELEASE.2025-07-23T15-54-02Z; crates/ecstore/tests/fixtures/minio/README.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "crates/ecstore/tests/fixtures/minio/bucket_metadata_full.xlmeta.hex",
|
||||||
|
"sha256": "3b6de589519c08a1614c8bd409bb8199c17d42043861b07bce513075e6fbfc12",
|
||||||
|
"source": "MinIO RELEASE.2025-07-23T15-54-02Z; crates/ecstore/tests/fixtures/minio/README.md"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -89,6 +89,7 @@ offline-enrollment-e2e-check: core-deps ## Build and exercise the dedicated offl
|
|||||||
test-wiring-check: ## Check tests stay registered and selected by their intended runners
|
test-wiring-check: ## Check tests stay registered and selected by their intended runners
|
||||||
@echo "🧪 Checking test wiring..."
|
@echo "🧪 Checking test wiring..."
|
||||||
$(RUSTFS_PYTHON_BIN) ./scripts/check_test_wiring.py
|
$(RUSTFS_PYTHON_BIN) ./scripts/check_test_wiring.py
|
||||||
|
$(RUSTFS_PYTHON_BIN) ./scripts/ci_gate.py --check-workflow
|
||||||
|
|
||||||
.PHONY: log-analyzer-rules-check
|
.PHONY: log-analyzer-rules-check
|
||||||
log-analyzer-rules-check: core-deps ## Check log-analyzer rule anchors still exist verbatim in source
|
log-analyzer-rules-check: core-deps ## Check log-analyzer rule anchors still exist verbatim in source
|
||||||
|
|||||||
@@ -3,9 +3,10 @@
|
|||||||
.NOTPARALLEL: pre-commit pre-pr dev-check
|
.NOTPARALLEL: pre-commit pre-pr dev-check
|
||||||
|
|
||||||
.PHONY: setup-hooks
|
.PHONY: setup-hooks
|
||||||
setup-hooks: ## Set up git hooks
|
setup-hooks: ## Install the configured pre-commit hooks
|
||||||
@echo "🔧 Setting up git hooks..."
|
@echo "🔧 Setting up git hooks..."
|
||||||
chmod +x .git/hooks/pre-commit
|
pre-commit validate-config
|
||||||
|
pre-commit install
|
||||||
@echo "✅ Git hooks setup complete!"
|
@echo "✅ Git hooks setup complete!"
|
||||||
|
|
||||||
.PHONY: doc-paths-check
|
.PHONY: doc-paths-check
|
||||||
|
|||||||
@@ -31,6 +31,14 @@ script-tests: ## Run shell script tests
|
|||||||
./scripts/test_object_batch_bench_enhanced.sh
|
./scripts/test_object_batch_bench_enhanced.sh
|
||||||
./scripts/test_hotpath_warp_ab_gate.sh
|
./scripts/test_hotpath_warp_ab_gate.sh
|
||||||
./scripts/test_hotpath_warp_abba.sh
|
./scripts/test_hotpath_warp_abba.sh
|
||||||
|
./scripts/test_scanner_validation_harness.sh
|
||||||
|
./scripts/test_scanner_heal_checkpoint_crash_evidence.sh
|
||||||
|
./scripts/test_scanner_heal_g14_multiset_evidence.sh
|
||||||
|
./scripts/test_scanner_heal_scheduler_pressure_evidence.sh
|
||||||
|
./scripts/test_scanner_heal_status_outcome_evidence.sh
|
||||||
|
./scripts/test_scanner_heal_maintenance_evidence.sh
|
||||||
|
./scripts/test_scanner_heal_w13_mrf_evidence.sh
|
||||||
|
./scripts/test_scanner_heal_w16_recovery_evidence.sh
|
||||||
./scripts/test_exact_1mib_handoff_abba.sh
|
./scripts/test_exact_1mib_handoff_abba.sh
|
||||||
./scripts/test_pinned_paired_abba_bench.sh
|
./scripts/test_pinned_paired_abba_bench.sh
|
||||||
./scripts/test_manual_transition_runbooks.sh
|
./scripts/test_manual_transition_runbooks.sh
|
||||||
@@ -38,12 +46,16 @@ script-tests: ## Run shell script tests
|
|||||||
./scripts/test_python_bin.sh
|
./scripts/test_python_bin.sh
|
||||||
./scripts/check_embedded_secrets.sh --self-test
|
./scripts/check_embedded_secrets.sh --self-test
|
||||||
$(RUSTFS_PYTHON_BIN) ./scripts/check_test_wiring.py --self-test
|
$(RUSTFS_PYTHON_BIN) ./scripts/check_test_wiring.py --self-test
|
||||||
|
$(RUSTFS_PYTHON_BIN) ./scripts/ci_gate.py --self-test
|
||||||
$(RUSTFS_PYTHON_BIN) ./scripts/check_security_coverage.py --self-test
|
$(RUSTFS_PYTHON_BIN) ./scripts/check_security_coverage.py --self-test
|
||||||
$(RUSTFS_PYTHON_BIN) ./scripts/check_scheduled_validation_freshness.py --self-test
|
$(RUSTFS_PYTHON_BIN) ./scripts/check_scheduled_validation_freshness.py --self-test
|
||||||
|
$(RUSTFS_PYTHON_BIN) ./scripts/test_security_workflow.py
|
||||||
|
$(RUSTFS_PYTHON_BIN) ./scripts/test_nightly_candidate.py
|
||||||
$(RUSTFS_PYTHON_BIN) ./scripts/s3-tests/test_report_compat.py
|
$(RUSTFS_PYTHON_BIN) ./scripts/s3-tests/test_report_compat.py
|
||||||
bash -n ./scripts/validate_object_data_cache_cold_stampede.sh
|
bash -n ./scripts/validate_object_data_cache_cold_stampede.sh
|
||||||
$(RUSTFS_PYTHON_BIN) ./scripts/check_object_data_cache_follower_samples.py --self-test
|
$(RUSTFS_PYTHON_BIN) ./scripts/check_object_data_cache_follower_samples.py --self-test
|
||||||
./scripts/validate_object_data_cache_cold_stampede.sh --self-test
|
./scripts/validate_object_data_cache_cold_stampede.sh --self-test
|
||||||
|
./scripts/run_scanner_heal_evidence_case.sh --self-test
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: core-deps script-tests ## Run all tests (needs cargo-nextest; RUSTFS_ALLOW_CARGO_TEST_FALLBACK=1 to override)
|
test: core-deps script-tests ## Run all tests (needs cargo-nextest; RUSTFS_ALLOW_CARGO_TEST_FALLBACK=1 to override)
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
# Committed floor for the number of tests selected by the migration-critical
|
# Committed floor for the number of tests selected by the migration-critical
|
||||||
# CI gate (see scripts/check_migration_gate_count.sh, backlog#1153 infra-12).
|
# CI gate (see scripts/check_migration_gate_count.sh, backlog#1153 infra-12).
|
||||||
#
|
#
|
||||||
# The floor equals the exact count of rustfs-ecstore --lib tests matching the
|
# The floor equals the exact count of rustfs-ecstore --lib tests, with the
|
||||||
# gate filter (name substrings: data_movement, rebalance, decommission,
|
# test-util feature enabled, matching the gate filter (name substrings:
|
||||||
# source_cleanup, delete_marker) at the time this file was last updated.
|
# data_movement, rebalance, decommission, source_cleanup, delete_marker) at
|
||||||
|
# the time this file was last updated.
|
||||||
# CI fails if the selected count drops below this number, so renames or
|
# CI fails if the selected count drops below this number, so renames or
|
||||||
# removals that thin the gate must update this file in the same PR.
|
# removals that thin the gate must update this file in the same PR.
|
||||||
# Adding tests does not require a bump, but bumping keeps the guard tight.
|
# Adding tests does not require a bump, but bumping keeps the guard tight.
|
||||||
571
|
946
|
||||||
|
|||||||
+127
-13
@@ -69,7 +69,7 @@ filter = 'package(rustfs-ecstore) & test(/^(bucket::lifecycle::bucket_lifecycle_
|
|||||||
setup = 'ecstore-large-stack'
|
setup = 'ecstore-large-stack'
|
||||||
|
|
||||||
[[profile.default.scripts]]
|
[[profile.default.scripts]]
|
||||||
filter = 'package(rustfs-ecstore) | package(rustfs-s3select-api) | package(rustfs-scanner) | (package(rustfs) & test(/^(app::multipart_usecase::tests::concurrent_completions_share_durable_bucket_quota_reservations|app::object::delete::tests::compressed_delete_requests_update_observed_usage_without_releasing_quota_floor|storage::access::tests::(delete_object_access_captures_authorized_bucket_incarnation|copy_operations_reject_recreated_source_bucket_after_authorization|request_slot_keeps_bucket_policy_bound_to_its_store))$/))'
|
filter = 'package(rustfs-ecstore) | package(rustfs-s3select-api) | package(rustfs-scanner) | (package(rustfs) & test(/^(app::multipart_usecase::tests::concurrent_completions_share_durable_bucket_quota_reservations|app::object::delete::tests::compressed_delete_requests_update_observed_usage_without_releasing_quota_floor|app::object::internal_put::tests::internal_multipart_roundtrip_completes_and_abort_leaves_nothing|app::object::restore::tests::execute_restore_object_maps_failures_to_typed_s3_errors|storage::access::tests::(delete_object_access_captures_authorized_bucket_incarnation|copy_operations_reject_recreated_source_bucket_after_authorization|request_slot_keeps_bucket_policy_bound_to_its_store))$/))'
|
||||||
setup = 'ecstore-base-stack'
|
setup = 'ecstore-base-stack'
|
||||||
|
|
||||||
[[profile.default.scripts]]
|
[[profile.default.scripts]]
|
||||||
@@ -183,6 +183,13 @@ test-group = 'e2e-reliability'
|
|||||||
filter = 'package(e2e_test) & test(/^inline_fast_path_cluster_test::/)'
|
filter = 'package(e2e_test) & test(/^inline_fast_path_cluster_test::/)'
|
||||||
test-group = 'e2e-inline-boundaries'
|
test-group = 'e2e-inline-boundaries'
|
||||||
|
|
||||||
|
# 4-node 4-drive distributed Actions suite: each case starts four rustfs
|
||||||
|
# processes and up to sixteen data directories. Serialize across nextest's
|
||||||
|
# process boundary so several 4x4 clusters never overlap.
|
||||||
|
[[profile.default.overrides]]
|
||||||
|
filter = 'package(e2e_test) & test(/^distributed::/)'
|
||||||
|
test-group = 'e2e-cluster-nightly'
|
||||||
|
|
||||||
# Vault KMS tests share the fixed dev-server port 8200. serial_test's #[serial]
|
# Vault KMS tests share the fixed dev-server port 8200. serial_test's #[serial]
|
||||||
# does not cross nextest process boundaries, so keep every Vault-backed test in
|
# does not cross nextest process boundaries, so keep every Vault-backed test in
|
||||||
# one group.
|
# one group.
|
||||||
@@ -190,6 +197,12 @@ test-group = 'e2e-inline-boundaries'
|
|||||||
filter = 'package(e2e_test) & (test(/^kms::kms_vault_test::/) | test(/^kms::kms_rekey_sweep_test::/) | test(/^kms::configured_roundtrip_test::test_configured_vault_kms_admin_and_versioned_cleanup$/))'
|
filter = 'package(e2e_test) & (test(/^kms::kms_vault_test::/) | test(/^kms::kms_rekey_sweep_test::/) | test(/^kms::configured_roundtrip_test::test_configured_vault_kms_admin_and_versioned_cleanup$/))'
|
||||||
test-group = 'e2e-vault'
|
test-group = 'e2e-vault'
|
||||||
|
|
||||||
|
# This four-disk, 65-member rollback probe already drives up to 32 concurrent
|
||||||
|
# durable deletions. Reserve this nextest run's capacity for its progress oracle.
|
||||||
|
[[profile.default.overrides]]
|
||||||
|
filter = 'package(rustfs-ecstore) & test(=store::init::tests::dispatch_manifest_rollback_bounded_concurrency_reaches_tail_behind_slow_member)'
|
||||||
|
threads-required = "num-test-threads"
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# ci profile — the strict CI gate (ci.yml `cargo nextest run --profile ci`)
|
# ci profile — the strict CI gate (ci.yml `cargo nextest run --profile ci`)
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@@ -210,7 +223,7 @@ filter = 'package(rustfs-ecstore) & test(/^(bucket::lifecycle::bucket_lifecycle_
|
|||||||
setup = 'ecstore-large-stack'
|
setup = 'ecstore-large-stack'
|
||||||
|
|
||||||
[[profile.ci.scripts]]
|
[[profile.ci.scripts]]
|
||||||
filter = 'package(rustfs-ecstore) | package(rustfs-s3select-api) | package(rustfs-scanner) | (package(rustfs) & test(/^(app::multipart_usecase::tests::concurrent_completions_share_durable_bucket_quota_reservations|app::object::delete::tests::compressed_delete_requests_update_observed_usage_without_releasing_quota_floor|storage::access::tests::(delete_object_access_captures_authorized_bucket_incarnation|copy_operations_reject_recreated_source_bucket_after_authorization|request_slot_keeps_bucket_policy_bound_to_its_store))$/))'
|
filter = 'package(rustfs-ecstore) | package(rustfs-s3select-api) | package(rustfs-scanner) | (package(rustfs) & test(/^(app::multipart_usecase::tests::concurrent_completions_share_durable_bucket_quota_reservations|app::object::delete::tests::compressed_delete_requests_update_observed_usage_without_releasing_quota_floor|app::object::internal_put::tests::internal_multipart_roundtrip_completes_and_abort_leaves_nothing|app::object::restore::tests::execute_restore_object_maps_failures_to_typed_s3_errors|storage::access::tests::(delete_object_access_captures_authorized_bucket_incarnation|copy_operations_reject_recreated_source_bucket_after_authorization|request_slot_keeps_bucket_policy_bound_to_its_store))$/))'
|
||||||
setup = 'ecstore-base-stack'
|
setup = 'ecstore-base-stack'
|
||||||
|
|
||||||
[[profile.ci.scripts]]
|
[[profile.ci.scripts]]
|
||||||
@@ -355,7 +368,8 @@ test-group = 'ecstore-serial-flaky'
|
|||||||
# allowlist", so any new replication test lands in nightly by default (never
|
# allowlist", so any new replication test lands in nightly by default (never
|
||||||
# silently unrun) until it is explicitly blessed as fast here. Keep the two
|
# silently unrun) until it is explicitly blessed as fast here. Keep the two
|
||||||
# regexes byte-identical. The committed profile selection digests make changes
|
# regexes byte-identical. The committed profile selection digests make changes
|
||||||
# visible in CI; current counts live in docs/testing/e2e-suite-inventory.md.
|
# visible in CI; list current membership with `cargo nextest list -p e2e_test
|
||||||
|
# --profile <profile>` (platform-dependent; see docs/testing/README.md).
|
||||||
# HISTORY (2026-07-11): the 20 fast tests were briefly pulled out of this lane
|
# HISTORY (2026-07-11): the 20 fast tests were briefly pulled out of this lane
|
||||||
# (#4724) because they set a loopback (127.0.0.1) replication target that the
|
# (#4724) because they set a loopback (127.0.0.1) replication target that the
|
||||||
# SSRF egress guard rejected on every PR after repl-1 (#4712). That is fixed —
|
# SSRF egress guard rejected on every PR after repl-1 (#4712). That is fixed —
|
||||||
@@ -393,13 +407,32 @@ test-group = 'ecstore-serial-flaky'
|
|||||||
# rustfs/rustfs#5169 disabled them) have PR-lane signal, not just merge-gate.
|
# rustfs/rustfs#5169 disabled them) have PR-lane signal, not just merge-gate.
|
||||||
# Single-node servers on random ports with isolated temp dirs — meets the
|
# Single-node servers on random ports with isolated temp dirs — meets the
|
||||||
# admission criteria unchanged.
|
# admission criteria unchanged.
|
||||||
|
#
|
||||||
|
# On-demand migration GA (backlog#2163 ODM-16): three named cases join the
|
||||||
|
# lane, one per user-visible contract of the feature — a GET miss that pulls
|
||||||
|
# the object and persists it locally, a HEAD miss that answers from the source
|
||||||
|
# and stores nothing, and the admin config/status pair that must redact the
|
||||||
|
# source secret. Each spawns one single-node rustfs server plus the in-process
|
||||||
|
# fake S3 source (`fake_s3_target`, already in the first clause), so they meet
|
||||||
|
# the admission criteria unchanged; measured at 15.8 s / 15.8 s / 15.9 s, which
|
||||||
|
# is entirely the shared server startup and overlaps the lane's other tests.
|
||||||
|
# The rest of `on_demand_migration::{get_basic,interaction,backfill,
|
||||||
|
# harness_self}_test` stays in e2e-full and the fault / concurrency /
|
||||||
|
# real-source modules stay in e2e-nightly; this is an allowlist, not a module
|
||||||
|
# clause, so a new ODM test never lands here silently.
|
||||||
|
#
|
||||||
|
# Scanner authoritative usage publication (backlog#2213): data_usage_test is
|
||||||
|
# the PR-lane e2e coverage for scanner usage snapshots consumed by quota and
|
||||||
|
# admin surfaces. It uses the same single-node, random-port, isolated-temp-dir
|
||||||
|
# fixture as the existing smoke modules.
|
||||||
[profile.e2e-smoke]
|
[profile.e2e-smoke]
|
||||||
default-filter = """
|
default-filter = """
|
||||||
package(e2e_test) & (
|
package(e2e_test) & (
|
||||||
test(/^(delete_marker_migration_semantics|version_id_regression|list_objects_v2_pagination|list_object_versions_regression|list_objects_duplicates|list_buckets_double_slash|list_buckets_auth|list_buckets_iam_filter|leading_slash_key|special_chars|create_bucket_region|delete_objects_versioning|head_object_consistency|head_object_range|copy_object_metadata|copy_object_tagging|copy_source_invalid_date|content_encoding|compression|multipart_storage_class|storage_class_capability|ssec_copy|anonymous_access|bucket_policy_check|presigned_negative|negative_sigv4|admin_auth|notification_webhook|tls_hot_reload|console_smoke|admin_iam_crud|admin_pools|sts_query_compat)_test::|^fake_s3_target::/)
|
test(/^(delete_marker_migration_semantics|version_id_regression|list_objects_v2_pagination|list_object_versions_regression|list_objects_duplicates|list_buckets_double_slash|list_buckets_auth|list_buckets_iam_filter|leading_slash_key|special_chars|create_bucket_region|delete_objects_versioning|head_object_consistency|head_object_range|copy_object_metadata|copy_object_tagging|copy_source_invalid_date|content_encoding|compression|multipart_storage_class|storage_class_capability|ssec_copy|anonymous_access|bucket_policy_check|presigned_negative|negative_sigv4|admin_auth|notification_webhook|tls_hot_reload|console_smoke|admin_iam_crud|admin_pools|sts_query_compat|data_usage)_test::|^fake_s3_target::/)
|
||||||
| test(/^replication_extension_test::(test_replication_check_succeeds_with_remote_target|test_replication_check_rejects_target_without_object_lock|test_set_remote_target_rejects_unversioned_source_bucket|test_replication_check_rejects_unversioned_source_bucket|test_replication_check_rejects_missing_replication_config|test_replication_check_rejects_invalid_bucket|test_set_remote_target_rejects_same_bucket_on_same_deployment|test_set_remote_target_rejects_unversioned_target_bucket|test_set_remote_target_update_requires_arn|test_set_remote_target_update_rejects_missing_target|test_set_remote_target_rejects_invalid_target_url|test_set_remote_target_rejects_self_signed_https_target_without_skip_tls_verify|test_set_remote_target_rejects_private_ca_https_target_without_ca_cert_pem|test_list_remote_targets_rejects_empty_bucket|test_list_remote_targets_rejects_invalid_bucket|test_remove_remote_target_rejects_missing_target|test_remove_remote_target_rejects_missing_arn|test_remove_remote_target_rejects_invalid_bucket|test_remove_remote_target_rejects_target_used_by_replication|test_delete_bucket_replication_removes_remote_target)$/)
|
| test(/^replication_extension_test::(test_replication_check_succeeds_with_remote_target|test_replication_check_rejects_target_without_object_lock|test_set_remote_target_rejects_unversioned_source_bucket|test_replication_check_rejects_unversioned_source_bucket|test_replication_check_rejects_missing_replication_config|test_replication_check_rejects_invalid_bucket|test_set_remote_target_rejects_same_bucket_on_same_deployment|test_set_remote_target_rejects_unversioned_target_bucket|test_set_remote_target_update_requires_arn|test_set_remote_target_update_rejects_missing_target|test_set_remote_target_rejects_invalid_target_url|test_set_remote_target_rejects_self_signed_https_target_without_skip_tls_verify|test_set_remote_target_rejects_private_ca_https_target_without_ca_cert_pem|test_list_remote_targets_rejects_empty_bucket|test_list_remote_targets_rejects_invalid_bucket|test_remove_remote_target_rejects_missing_target|test_remove_remote_target_rejects_missing_arn|test_remove_remote_target_rejects_invalid_bucket|test_remove_remote_target_rejects_target_used_by_replication|test_delete_bucket_replication_removes_remote_target)$/)
|
||||||
| test(/^reliant::lifecycle::/)
|
| test(/^reliant::lifecycle::/)
|
||||||
| test(/^reliant::tiering::/)
|
| test(/^reliant::tiering::/)
|
||||||
|
| test(/^on_demand_migration::(get_basic_test::(get_miss_pulls_inline_and_serves_locally_afterwards|head_miss_answers_from_the_source_without_persisting)|interaction_test::test_odm_admin_config_is_redacted_and_status_counts_match_the_source)$/)
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
fail-fast = false
|
fail-fast = false
|
||||||
@@ -439,6 +472,10 @@ slow-timeout = { period = "60s", terminate-after = 2, grace-period = "10s" }
|
|||||||
# until it is explicitly promoted to the fast PR subset — no replication test
|
# until it is explicitly promoted to the fast PR subset — no replication test
|
||||||
# is ever silently left out of CI.
|
# is ever silently left out of CI.
|
||||||
#
|
#
|
||||||
|
# replication_target_matrix_test (the outbound target matrix: every object
|
||||||
|
# shape against every remote-target failure mode the fake target models) runs
|
||||||
|
# here in full; its expectation table pins known-red cells to open issues.
|
||||||
|
#
|
||||||
# #[serial] does NOT serialize under nextest (process-per-test; see the file
|
# #[serial] does NOT serialize under nextest (process-per-test; see the file
|
||||||
# header). These tests need no cross-test serialization: each spawns its own
|
# header). These tests need no cross-test serialization: each spawns its own
|
||||||
# server(s) on random ports with isolated temp dirs, so they are parallel-safe
|
# server(s) on random ports with isolated temp dirs, so they are parallel-safe
|
||||||
@@ -456,7 +493,7 @@ slow-timeout = { period = "60s", terminate-after = 2, grace-period = "10s" }
|
|||||||
[profile.e2e-repl-nightly]
|
[profile.e2e-repl-nightly]
|
||||||
default-filter = """
|
default-filter = """
|
||||||
package(e2e_test)
|
package(e2e_test)
|
||||||
& test(/^replication_extension_test::/)
|
& (test(/^replication_extension_test::/) | test(/^replication_target_matrix_test::/))
|
||||||
& !test(/^replication_extension_test::(test_replication_check_succeeds_with_remote_target|test_replication_check_rejects_target_without_object_lock|test_set_remote_target_rejects_unversioned_source_bucket|test_replication_check_rejects_unversioned_source_bucket|test_replication_check_rejects_missing_replication_config|test_replication_check_rejects_invalid_bucket|test_set_remote_target_rejects_same_bucket_on_same_deployment|test_set_remote_target_rejects_unversioned_target_bucket|test_set_remote_target_update_requires_arn|test_set_remote_target_update_rejects_missing_target|test_set_remote_target_rejects_invalid_target_url|test_set_remote_target_rejects_self_signed_https_target_without_skip_tls_verify|test_set_remote_target_rejects_private_ca_https_target_without_ca_cert_pem|test_list_remote_targets_rejects_empty_bucket|test_list_remote_targets_rejects_invalid_bucket|test_remove_remote_target_rejects_missing_target|test_remove_remote_target_rejects_missing_arn|test_remove_remote_target_rejects_invalid_bucket|test_remove_remote_target_rejects_target_used_by_replication|test_delete_bucket_replication_removes_remote_target)$/)
|
& !test(/^replication_extension_test::(test_replication_check_succeeds_with_remote_target|test_replication_check_rejects_target_without_object_lock|test_set_remote_target_rejects_unversioned_source_bucket|test_replication_check_rejects_unversioned_source_bucket|test_replication_check_rejects_missing_replication_config|test_replication_check_rejects_invalid_bucket|test_set_remote_target_rejects_same_bucket_on_same_deployment|test_set_remote_target_rejects_unversioned_target_bucket|test_set_remote_target_update_requires_arn|test_set_remote_target_update_rejects_missing_target|test_set_remote_target_rejects_invalid_target_url|test_set_remote_target_rejects_self_signed_https_target_without_skip_tls_verify|test_set_remote_target_rejects_private_ca_https_target_without_ca_cert_pem|test_list_remote_targets_rejects_empty_bucket|test_list_remote_targets_rejects_invalid_bucket|test_remove_remote_target_rejects_missing_target|test_remove_remote_target_rejects_missing_arn|test_remove_remote_target_rejects_invalid_bucket|test_remove_remote_target_rejects_target_used_by_replication|test_delete_bucket_replication_removes_remote_target)$/)
|
||||||
"""
|
"""
|
||||||
fail-fast = false
|
fail-fast = false
|
||||||
@@ -469,15 +506,29 @@ path = "junit.xml"
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# e2e-nightly profile — destructive multi-process cluster fault domains
|
# e2e-nightly profile — destructive multi-process cluster fault domains
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# These seven modules are deliberately outside e2e-full's merge budget. Each
|
# These eight modules are deliberately outside e2e-full's merge budget. Each
|
||||||
# starts a real multi-process or multi-disk topology and exercises node/disk
|
# starts a real multi-process or multi-disk topology and exercises node/disk
|
||||||
# loss, quorum, cleanup, notification fan-in, or admin-timeout behavior. The
|
# loss, quorum, cleanup, notification fan-in, or admin-timeout behavior. The
|
||||||
# consolidated nightly workflow runs them serially to avoid resource
|
# consolidated nightly workflow runs them serially to avoid resource
|
||||||
# starvation; failures are never retried.
|
# starvation; failures are never retried.
|
||||||
|
#
|
||||||
|
# heal_erasure_disk_rebuild_test also runs in e2e-full so core heal rebuild
|
||||||
|
# regressions are caught no later than the merge/main lane. It remains here for
|
||||||
|
# nightly serial coverage with the other cluster fault domains.
|
||||||
|
#
|
||||||
|
# On-demand migration (backlog#2158 ODM-11) joins by the second clause: the
|
||||||
|
# fault matrix waits out the 30 s circuit-breaker window, the concurrency
|
||||||
|
# matrix drives 100-deep bursts, and the real-source cases start a second
|
||||||
|
# (loop guard: a third) RustFS process. They are too slow or too heavy for
|
||||||
|
# the merge budget; `on_demand_migration::{get_basic,interaction}_test` stay
|
||||||
|
# in e2e-full, which excludes exactly these three modules.
|
||||||
[profile.e2e-nightly]
|
[profile.e2e-nightly]
|
||||||
default-filter = """
|
default-filter = """
|
||||||
package(e2e_test)
|
package(e2e_test)
|
||||||
& test(/^(admin_timeout_regression_test|cluster_concurrency_test|cluster_multidrive_pool_test|degraded_listing_availability_test|heal_erasure_disk_rebuild_test|namespace_lock_quorum_test|object_lambda_test|stale_multipart_cleanup_cluster_test)::/)
|
& (
|
||||||
|
test(/^(admin_timeout_regression_test|cluster_concurrency_test|cluster_multidrive_pool_test|degraded_listing_availability_test|heal_erasure_disk_rebuild_test|namespace_lock_quorum_test|object_lambda_test|stale_multipart_cleanup_cluster_test)::/)
|
||||||
|
| test(/^on_demand_migration::(concurrency_test|fault_test|real_source_test)::/)
|
||||||
|
)
|
||||||
"""
|
"""
|
||||||
fail-fast = false
|
fail-fast = false
|
||||||
|
|
||||||
@@ -488,6 +539,55 @@ path = "junit.xml"
|
|||||||
filter = 'package(e2e_test)'
|
filter = 'package(e2e_test)'
|
||||||
test-group = 'e2e-cluster-nightly'
|
test-group = 'e2e-cluster-nightly'
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# e2e-distributed profile — 4-node 4-disk Actions suite
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Storage-sensitive PR / nightly / dispatch lane owned by
|
||||||
|
# .github/workflows/e2e-distributed.yml.
|
||||||
|
# Each case starts four rustfs processes (and for site replication, two
|
||||||
|
# clusters). Upgrade cases also require RUSTFS_UPGRADE_SOURCE_BINARY.
|
||||||
|
# Serialized via e2e-cluster-nightly with no retries.
|
||||||
|
[profile.e2e-distributed]
|
||||||
|
default-filter = 'package(e2e_test) & test(/^distributed::/)'
|
||||||
|
fail-fast = false
|
||||||
|
# Decommission / rebalance cases poll for up to 180s with little stdout.
|
||||||
|
slow-timeout = { period = "120s", terminate-after = 6 }
|
||||||
|
|
||||||
|
[profile.e2e-distributed.junit]
|
||||||
|
path = "junit.xml"
|
||||||
|
|
||||||
|
[[profile.e2e-distributed.overrides]]
|
||||||
|
filter = 'package(e2e_test)'
|
||||||
|
test-group = 'e2e-cluster-nightly'
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# e2e-odm-interop profile — on-demand migration provider interop lane (ODM-20)
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# backlog#2167. Report-only, scheduled, never a required check; wired by
|
||||||
|
# .github/workflows/on-demand-migration-interop.yml.
|
||||||
|
#
|
||||||
|
# The four cases in `on_demand_migration::interop_test` take their source from
|
||||||
|
# the environment (`RUSTFS_ODM_INTEROP_*`, documented on the constants in
|
||||||
|
# `crates/e2e_test/src/on_demand_migration/common.rs`), so the same bodies run
|
||||||
|
# against the in-process fake source locally and against a MinIO container or a
|
||||||
|
# real cloud provider in the lane. The cloud jobs narrow this profile with their
|
||||||
|
# own `-E` filter to the three-case minimum (GET miss, HEAD miss, merged list
|
||||||
|
# pagination) and pass `--no-tests=fail` so a rename cannot silently select
|
||||||
|
# nothing; the MinIO job runs the whole profile, backfill included.
|
||||||
|
#
|
||||||
|
# These cases are deliberately absent from every other lane: without an
|
||||||
|
# interop source they only re-prove what `get_basic_test` and
|
||||||
|
# `list_through_test` already cover in e2e-smoke and e2e-full. The committed
|
||||||
|
# selection digest is the guard against a rename dropping one of them.
|
||||||
|
[profile.e2e-odm-interop]
|
||||||
|
default-filter = 'package(e2e_test) & test(/^on_demand_migration::interop_test::/)'
|
||||||
|
fail-fast = false
|
||||||
|
|
||||||
|
[profile.e2e-odm-interop.junit]
|
||||||
|
# Emitted to target/nextest/e2e-odm-interop/junit.xml; the lane uploads it and
|
||||||
|
# reconciles it against the per-case JSON report entries.
|
||||||
|
path = "junit.xml"
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# e2e-protocols profile — serial protocol lane
|
# e2e-protocols profile — serial protocol lane
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@@ -508,16 +608,27 @@ path = "junit.xml"
|
|||||||
# quota, checksum, encryption,
|
# quota, checksum, encryption,
|
||||||
# security-boundary, ... — that the fast PR `e2e-smoke` subset deliberately
|
# security-boundary, ... — that the fast PR `e2e-smoke` subset deliberately
|
||||||
# skips. Budget <= 45 min; authority for the suite count is `cargo nextest list
|
# skips. Budget <= 45 min; authority for the suite count is `cargo nextest list
|
||||||
# --profile e2e-full` (see docs/testing/e2e-suite-inventory.md).
|
# --profile e2e-full -p e2e_test` (platform-dependent; see docs/testing/README.md).
|
||||||
#
|
#
|
||||||
# The filter is "the whole e2e_test crate MINUS the sets owned by other lanes":
|
# The filter is "the whole e2e_test crate MINUS the sets owned by other lanes":
|
||||||
# * protocols:: — FTPS/SFTP/WebDAV, run from the dedicated protocol profile
|
# * protocols:: — FTPS/SFTP/WebDAV, run from the dedicated protocol profile
|
||||||
# with one worker because the suite owns fixed ports.
|
# with one worker because the suite owns fixed ports.
|
||||||
# * the 7 cluster suites that spin up a RustFSTestClusterEnvironment
|
# * cluster suites that spin up a RustFSTestClusterEnvironment
|
||||||
# (cluster_concurrency, cluster_multidrive_pool, stale_multipart_cleanup_cluster,
|
# (cluster_concurrency, cluster_multidrive_pool, stale_multipart_cleanup_cluster,
|
||||||
# namespace_lock_quorum, heal_erasure_disk_rebuild, admin_timeout_regression,
|
# namespace_lock_quorum, admin_timeout_regression, object_lambda) — too
|
||||||
# object_lambda) — too heavy for the merge budget; they run in the
|
# heavy for the merge budget; they run in the e2e-nightly serial
|
||||||
# e2e-nightly serial cluster-fault lane.
|
# cluster-fault lane. heal_erasure_disk_rebuild is intentionally not
|
||||||
|
# excluded here because backlog#2213 promotes core heal rebuild coverage to
|
||||||
|
# this merge/main lane while retaining nightly coverage.
|
||||||
|
# * distributed:: — 4-node 4-disk Actions suite (S3, lock, versioning,
|
||||||
|
# replication, quota, observability, expand/decommission/rebalance, site
|
||||||
|
# replication, chaos, upgrade history/IAM). Owns [profile.e2e-distributed] and
|
||||||
|
# .github/workflows/e2e-distributed.yml.
|
||||||
|
# * on_demand_migration::interop_test — the ODM-20 provider interoperability
|
||||||
|
# cases, which are meaningless without a source: they run in the dedicated
|
||||||
|
# [profile.e2e-odm-interop] lane below, where the workflow points them at a
|
||||||
|
# MinIO container or a real cloud provider. Excluding them here also keeps
|
||||||
|
# this profile's committed selection digest stable.
|
||||||
# * replication_extension_test — repl-1 already splits it into the PR
|
# * replication_extension_test — repl-1 already splits it into the PR
|
||||||
# `e2e-smoke` (20 fast) and `e2e-repl-nightly` (56 slow) lanes and reserves
|
# `e2e-smoke` (20 fast) and `e2e-repl-nightly` (56 slow) lanes and reserves
|
||||||
# it for those, so e2e-full does not double-run it.
|
# it for those, so e2e-full does not double-run it.
|
||||||
@@ -533,8 +644,11 @@ path = "junit.xml"
|
|||||||
default-filter = """
|
default-filter = """
|
||||||
package(e2e_test)
|
package(e2e_test)
|
||||||
& !test(/^protocols::/)
|
& !test(/^protocols::/)
|
||||||
& !test(/^(admin_timeout_regression_test|cluster_concurrency_test|cluster_multidrive_pool_test|degraded_listing_availability_test|heal_erasure_disk_rebuild_test|namespace_lock_quorum_test|object_lambda_test|stale_multipart_cleanup_cluster_test)::/)
|
& !test(/^(admin_timeout_regression_test|cluster_concurrency_test|cluster_multidrive_pool_test|degraded_listing_availability_test|namespace_lock_quorum_test|object_lambda_test|stale_multipart_cleanup_cluster_test)::/)
|
||||||
|
& !test(/^distributed::/)
|
||||||
& !test(/^replication_extension_test::/)
|
& !test(/^replication_extension_test::/)
|
||||||
|
& !test(/^replication_target_matrix_test::/)
|
||||||
|
& !test(/^on_demand_migration::(concurrency_test|fault_test|interop_test|real_source_test)::/)
|
||||||
"""
|
"""
|
||||||
fail-fast = false
|
fail-fast = false
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,404 @@
|
|||||||
|
{
|
||||||
|
"schema": 2,
|
||||||
|
"cases": {
|
||||||
|
"background-target-restart": {
|
||||||
|
"gate": "G14",
|
||||||
|
"task": "W21",
|
||||||
|
"lane": "e2e-nightly",
|
||||||
|
"suite": "e2e_test",
|
||||||
|
"name": "heal_erasure_disk_rebuild_test::tests::test_cluster_root_heal_recovers_remote_shards_after_background_target_restart",
|
||||||
|
"oracle": "background-target-restart.json",
|
||||||
|
"evidence": "process-restart",
|
||||||
|
"unclean_shutdown_marker": false,
|
||||||
|
"min_objects": 9,
|
||||||
|
"max_objects": 65,
|
||||||
|
"topology": {"nodes": 4, "drives_per_node": 1},
|
||||||
|
"erasure": {"data_blocks": 2, "parity_blocks": 2},
|
||||||
|
"scope": "Target process restart, exact unversioned S3 bodies and replacement-disk shards; not power loss or EC8+4."
|
||||||
|
},
|
||||||
|
"background-target-crash": {
|
||||||
|
"gate": "G14",
|
||||||
|
"task": "W21",
|
||||||
|
"lane": "e2e-nightly",
|
||||||
|
"suite": "e2e_test",
|
||||||
|
"name": "heal_erasure_disk_rebuild_test::tests::test_cluster_root_heal_recovers_remote_shards_after_background_target_crash",
|
||||||
|
"oracle": "background-target-crash.json",
|
||||||
|
"evidence": "process-crash-restart",
|
||||||
|
"unclean_shutdown_marker": true,
|
||||||
|
"min_objects": 9,
|
||||||
|
"max_objects": 65,
|
||||||
|
"topology": {"nodes": 4, "drives_per_node": 1},
|
||||||
|
"erasure": {"data_blocks": 2, "parity_blocks": 2},
|
||||||
|
"scope": "Target process killed during partial background rebuild, real unclean-shutdown marker, exact unversioned S3 bodies and replacement-disk shards; not power loss or EC8+4."
|
||||||
|
},
|
||||||
|
"ec84-target-drive-restart": {
|
||||||
|
"gate": "G14",
|
||||||
|
"task": "W20/W21",
|
||||||
|
"lane": "e2e-distributed",
|
||||||
|
"suite": "e2e_test",
|
||||||
|
"name": "distributed::heal_test::three_node_four_drive_ec8_4_root_heal_rebuilds_replaced_drive_after_restart",
|
||||||
|
"oracle": "ec84-target-drive-restart.json",
|
||||||
|
"evidence": "process-restart",
|
||||||
|
"unclean_shutdown_marker": false,
|
||||||
|
"min_objects": 5,
|
||||||
|
"max_objects": 5,
|
||||||
|
"topology": {"nodes": 3, "drives_per_node": 4},
|
||||||
|
"erasure": {"data_blocks": 8, "parity_blocks": 4},
|
||||||
|
"erasure_set_drive_count": 12,
|
||||||
|
"scope": "3-node x 4-drive single-set EC8+4, graceful target restart, preformatted replacement drive, exact unversioned S3 bodies and physical target shards; not mixed-version, multi-pool or long-window ABBA."
|
||||||
|
},
|
||||||
|
"background-target-restart-ec8-4": {
|
||||||
|
"gate": "G14",
|
||||||
|
"task": "W21",
|
||||||
|
"lane": "e2e-nightly",
|
||||||
|
"suite": "e2e_test",
|
||||||
|
"name": "heal_erasure_disk_rebuild_test::tests::test_cluster_root_heal_recovers_ec84_shards_after_background_target_restart",
|
||||||
|
"oracle": "background-target-restart-ec8-4.json",
|
||||||
|
"evidence": "process-restart",
|
||||||
|
"unclean_shutdown_marker": false,
|
||||||
|
"min_objects": 9,
|
||||||
|
"max_objects": 65,
|
||||||
|
"topology": {"nodes": 3, "drives_per_node": 4},
|
||||||
|
"erasure": {"data_blocks": 8, "parity_blocks": 4},
|
||||||
|
"erasure_set_drive_count": 12,
|
||||||
|
"scope": "Target process restart during partial background rebuild on a single 3x4 EC8+4 set; exact unversioned S3 bodies and replacement-drive shards; not power loss, multi-set, or multi-pool."
|
||||||
|
},
|
||||||
|
"background-target-crash-ec8-4": {
|
||||||
|
"gate": "G14",
|
||||||
|
"task": "W21",
|
||||||
|
"lane": "e2e-nightly",
|
||||||
|
"suite": "e2e_test",
|
||||||
|
"name": "heal_erasure_disk_rebuild_test::tests::test_cluster_root_heal_recovers_ec84_shards_after_background_target_crash",
|
||||||
|
"oracle": "background-target-crash-ec8-4.json",
|
||||||
|
"evidence": "process-crash-restart",
|
||||||
|
"unclean_shutdown_marker": true,
|
||||||
|
"min_objects": 9,
|
||||||
|
"max_objects": 65,
|
||||||
|
"topology": {"nodes": 3, "drives_per_node": 4},
|
||||||
|
"erasure": {"data_blocks": 8, "parity_blocks": 4},
|
||||||
|
"erasure_set_drive_count": 12,
|
||||||
|
"scope": "Target process killed during partial background rebuild on a single 3x4 EC8+4 set; real unclean-shutdown marker, exact unversioned S3 bodies and replacement-drive shards; not power loss, multi-set, or multi-pool."
|
||||||
|
},
|
||||||
|
"background-target-restart-ec8-4-multi-set": {
|
||||||
|
"gate": "G14",
|
||||||
|
"task": "W21",
|
||||||
|
"lane": "e2e-nightly",
|
||||||
|
"suite": "e2e_test",
|
||||||
|
"name": "heal_erasure_disk_rebuild_test::tests::test_cluster_root_heal_recovers_ec84_shards_across_multi_set_after_background_target_restart",
|
||||||
|
"oracle": "background-target-restart-ec8-4-multi-set.json",
|
||||||
|
"evidence": "process-restart",
|
||||||
|
"unclean_shutdown_marker": false,
|
||||||
|
"min_objects": 9,
|
||||||
|
"max_objects": 65,
|
||||||
|
"topology": {"nodes": 3, "drives_per_node": 8},
|
||||||
|
"erasure": {"data_blocks": 8, "parity_blocks": 4},
|
||||||
|
"erasure_set_drive_count": 12,
|
||||||
|
"sets": 2,
|
||||||
|
"pools": 1,
|
||||||
|
"scope": "Target process restart during partial background rebuild on a 3x8 EC8+4 layout with two erasure sets in one pool; exact unversioned S3 bodies and replacement-drive shards; not power loss or multi-pool."
|
||||||
|
},
|
||||||
|
"background-target-crash-ec8-4-multi-pool": {
|
||||||
|
"gate": "G14",
|
||||||
|
"task": "W21",
|
||||||
|
"lane": "e2e-nightly",
|
||||||
|
"suite": "e2e_test",
|
||||||
|
"name": "heal_erasure_disk_rebuild_test::tests::test_cluster_root_heal_recovers_ec84_shards_across_multi_pool_after_background_target_crash",
|
||||||
|
"oracle": "background-target-crash-ec8-4-multi-pool.json",
|
||||||
|
"evidence": "process-crash-restart",
|
||||||
|
"unclean_shutdown_marker": true,
|
||||||
|
"min_objects": 9,
|
||||||
|
"max_objects": 65,
|
||||||
|
"topology": {"nodes": 3, "drives_per_node": 12},
|
||||||
|
"erasure": {"data_blocks": 8, "parity_blocks": 4},
|
||||||
|
"erasure_set_drive_count": 12,
|
||||||
|
"sets": 3,
|
||||||
|
"pools": 3,
|
||||||
|
"outage_target_manifest_required": false,
|
||||||
|
"scope": "Target process crash during partial background rebuild on three single-node EC8+4 pools; exact baseline S3 bodies and replacement-drive shards, with outage object verified through S3 but not forced onto the replaced target drive."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"release_lanes": {
|
||||||
|
"single-set-restart": {
|
||||||
|
"status": "implemented",
|
||||||
|
"cases": ["background-target-restart", "background-target-crash"],
|
||||||
|
"covers": ["four-node one-drive topology", "unversioned objects", "target restart/crash"]
|
||||||
|
},
|
||||||
|
"authority-coverage": {
|
||||||
|
"status": "pending",
|
||||||
|
"gates": ["G01", "G12"],
|
||||||
|
"requires": ["root authority coverage", "quota authority coverage"]
|
||||||
|
},
|
||||||
|
"checkpoint-and-crash": {
|
||||||
|
"status": "pending",
|
||||||
|
"gates": ["G02", "G04", "R-E"],
|
||||||
|
"requires": ["bounded checkpoint progress", "boundary crash matrix", "fixed-budget restart evidence"]
|
||||||
|
},
|
||||||
|
"status-and-outcome": {
|
||||||
|
"status": "pending",
|
||||||
|
"gates": ["G05", "G06", "R-D"],
|
||||||
|
"requires": ["per-object outcomes", "legacy status clients", "manager/event/ledger disposition"]
|
||||||
|
},
|
||||||
|
"mrf-responsibility": {
|
||||||
|
"status": "pending",
|
||||||
|
"gates": ["G07", "G08", "P4"],
|
||||||
|
"requires": ["durable MRF responsibility", "disk-full and replica-loss matrix", "MRF replay cost"]
|
||||||
|
},
|
||||||
|
"mixed-version-rollback": {
|
||||||
|
"status": "pending",
|
||||||
|
"gates": ["G03", "G09", "R-L"],
|
||||||
|
"requires": ["mixed-version peers", "rollback payloads", "crash-safe source retirement"]
|
||||||
|
},
|
||||||
|
"scheduler-pressure": {
|
||||||
|
"status": "pending",
|
||||||
|
"gates": ["G10", "P1", "P2", "P3"],
|
||||||
|
"requires": ["bounded scheduling", "foreground latency and throughput", "two-hour pressure evidence"]
|
||||||
|
},
|
||||||
|
"maintenance-producers": {
|
||||||
|
"status": "pending",
|
||||||
|
"gates": ["G11", "G13"],
|
||||||
|
"requires": ["complete producer coverage", "quorum-minus-one and remount matrix"]
|
||||||
|
},
|
||||||
|
"ec8-4-multiset": {
|
||||||
|
"status": "pending",
|
||||||
|
"gates": ["G14"],
|
||||||
|
"requires": ["3x4 EC8+4 topology", "multi-set coverage", "multi-pool coverage"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"release_requirements": [
|
||||||
|
{
|
||||||
|
"gate": "G01",
|
||||||
|
"task": "W02/W04",
|
||||||
|
"lane": "authority-coverage",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Complete root and quota authority coverage",
|
||||||
|
"requires": ["root authority evidence", "quota authority evidence"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G02",
|
||||||
|
"task": "W03",
|
||||||
|
"lane": "checkpoint-and-crash",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Bounded checkpoint progress and independent version inventory",
|
||||||
|
"requires": ["bounded checkpoint oracle", "independent version inventory"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G03",
|
||||||
|
"task": "W17/W18",
|
||||||
|
"lane": "mixed-version-rollback",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Exact scoped ACK with durable publication and mixed peers",
|
||||||
|
"requires": ["durable scoped ACK publication", "mixed-peer evidence"],
|
||||||
|
"evidence_fields": [
|
||||||
|
"durable_root_publication_proof",
|
||||||
|
"scoped_ack_request_identity",
|
||||||
|
"participating_peer_capability_snapshot",
|
||||||
|
"mixed_peer_ack_fallback_oracle"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G04",
|
||||||
|
"task": "W03/W15/W16",
|
||||||
|
"lane": "checkpoint-and-crash",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Crash at every cache, root, floor and intent boundary",
|
||||||
|
"requires": ["cache boundary crash evidence", "root/floor/intent crash evidence"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G05",
|
||||||
|
"task": "W06/W07",
|
||||||
|
"lane": "status-and-outcome",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Per-object outcomes and bounded terminal retention",
|
||||||
|
"requires": ["per-object outcome oracle", "terminal retention bounds"],
|
||||||
|
"evidence_fields": [
|
||||||
|
"per_object_outcome_oracle",
|
||||||
|
"terminal_retention_bounds"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G06",
|
||||||
|
"task": "W06/W08/W23",
|
||||||
|
"lane": "status-and-outcome",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Concurrent status, legacy clients and truncation",
|
||||||
|
"requires": ["concurrent status evidence", "legacy client compatibility", "truncation behavior"],
|
||||||
|
"evidence_fields": [
|
||||||
|
"concurrent_status_evidence",
|
||||||
|
"legacy_client_compatibility",
|
||||||
|
"truncation_behavior"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G07",
|
||||||
|
"task": "W12/W13/W14",
|
||||||
|
"lane": "mrf-responsibility",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Durable MRF responsibility at every commit boundary",
|
||||||
|
"requires": ["MRF responsibility oracle", "commit-boundary crash matrix"],
|
||||||
|
"evidence_fields": [
|
||||||
|
"mrf_responsibility_oracle",
|
||||||
|
"commit_boundary_crash_matrix"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G08",
|
||||||
|
"task": "W12/W13/W14",
|
||||||
|
"lane": "mrf-responsibility",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "MRF capacity, disk-full and replica-loss matrix",
|
||||||
|
"requires": ["MRF capacity evidence", "disk-full matrix", "replica-loss matrix"],
|
||||||
|
"evidence_fields": [
|
||||||
|
"mrf_capacity_evidence",
|
||||||
|
"disk_full_matrix",
|
||||||
|
"replica_loss_matrix"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G09",
|
||||||
|
"task": "W13/W18/W23",
|
||||||
|
"lane": "mixed-version-rollback",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Actual mixed-version reader/writer and rollback payloads",
|
||||||
|
"requires": ["mixed-version reader evidence", "mixed-version writer evidence", "rollback payload evidence"],
|
||||||
|
"evidence_fields": [
|
||||||
|
"mixed_version_reader_evidence",
|
||||||
|
"mixed_version_writer_evidence",
|
||||||
|
"rollback_payload_evidence"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G10",
|
||||||
|
"task": "W05/W09/W10/W11",
|
||||||
|
"lane": "scheduler-pressure",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Bounded scheduling and pressure recovery",
|
||||||
|
"requires": ["scheduler bound evidence", "pressure recovery evidence"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G11",
|
||||||
|
"task": "W04/W19/W24",
|
||||||
|
"lane": "maintenance-producers",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Maintenance and complete producer coverage",
|
||||||
|
"requires": [
|
||||||
|
"maintenance producer matrix",
|
||||||
|
"complete producer inventory",
|
||||||
|
"segment activation preflight"
|
||||||
|
],
|
||||||
|
"evidence_fields": [
|
||||||
|
"maintenance_producer_matrix",
|
||||||
|
"complete_producer_inventory",
|
||||||
|
"segment_activation_preflight"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G12",
|
||||||
|
"task": "W02/W15/W16",
|
||||||
|
"lane": "authority-coverage",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Both quota paths during reset and settlement",
|
||||||
|
"requires": ["reset quota-path evidence", "settlement quota-path evidence"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G13",
|
||||||
|
"task": "W07/W14",
|
||||||
|
"lane": "maintenance-producers",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Quorum-minus-one, unknown disks, remount, Object Lock, dry-run, grace and commit tail",
|
||||||
|
"requires": ["quorum-minus-one matrix", "unknown-disk/remount matrix", "Object Lock dry-run grace evidence"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "G14",
|
||||||
|
"task": "W20/W21",
|
||||||
|
"lane": "ec8-4-multiset",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Same-window field evidence with 3x4 EC8+4 and multi-set/pool coverage",
|
||||||
|
"requires": [
|
||||||
|
"same-window field evidence",
|
||||||
|
"3x4 EC8+4 evidence",
|
||||||
|
"multi-set evidence",
|
||||||
|
"multi-pool evidence",
|
||||||
|
"distributed segment invalidation evidence"
|
||||||
|
],
|
||||||
|
"evidence_fields": [
|
||||||
|
"same_window_field_evidence",
|
||||||
|
"ec8_4_evidence",
|
||||||
|
"multi_set_evidence",
|
||||||
|
"multi_pool_evidence",
|
||||||
|
"distributed_segment_invalidation_evidence"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "P1",
|
||||||
|
"task": "W20",
|
||||||
|
"lane": "scheduler-pressure",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Measured cold-walk share and foreground latency/throughput",
|
||||||
|
"requires": ["cold-walk share measurement", "foreground latency/throughput measurement"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "P2",
|
||||||
|
"task": "W20/W24",
|
||||||
|
"lane": "scheduler-pressure",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Measured post-stop convergence and cold segment reuse",
|
||||||
|
"requires": ["post-stop convergence measurement", "cold segment reuse measurement"],
|
||||||
|
"evidence_fields": [
|
||||||
|
"post_stop_convergence_measurement",
|
||||||
|
"cold_segment_reuse_measurement"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "P3",
|
||||||
|
"task": "W20",
|
||||||
|
"lane": "scheduler-pressure",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Measured two-hour pressure/heal capacity and recovery window",
|
||||||
|
"requires": ["two-hour pressure measurement", "heal capacity measurement", "recovery-window measurement"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "P4",
|
||||||
|
"task": "W20",
|
||||||
|
"lane": "mrf-responsibility",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Measured MRF scale and replay cost with retained responsibility",
|
||||||
|
"requires": ["MRF scale measurement", "MRF replay-cost measurement", "retained responsibility evidence", "cleanup/GC soak evidence"],
|
||||||
|
"evidence_fields": [
|
||||||
|
"mrf_scale_measurement",
|
||||||
|
"mrf_replay_cost_measurement",
|
||||||
|
"retained_responsibility_evidence",
|
||||||
|
"mrf_cleanup_gc_soak_evidence"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "R-E",
|
||||||
|
"task": "W03/W05",
|
||||||
|
"lane": "checkpoint-and-crash",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Fixed-budget real process restart through enumeration and classification",
|
||||||
|
"requires": ["fixed-budget restart evidence", "enumeration evidence", "classification evidence"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "R-D",
|
||||||
|
"task": "W07/W14",
|
||||||
|
"lane": "status-and-outcome",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Manager-to-event-to-ledger exact disposition, including grace",
|
||||||
|
"requires": ["manager disposition evidence", "event disposition evidence", "ledger disposition evidence", "grace handling"],
|
||||||
|
"evidence_fields": [
|
||||||
|
"manager_disposition_evidence",
|
||||||
|
"event_disposition_evidence",
|
||||||
|
"ledger_disposition_evidence",
|
||||||
|
"grace_handling"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gate": "R-L",
|
||||||
|
"task": "W13/W14",
|
||||||
|
"lane": "mixed-version-rollback",
|
||||||
|
"status": "pending",
|
||||||
|
"description": "Legacy source conflicts, migration gaps and crash-safe source retirement",
|
||||||
|
"requires": ["legacy source-conflict evidence", "migration-gap evidence", "crash-safe source retirement evidence"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -9,4 +9,4 @@
|
|||||||
# if the selected count drops below this number, so a rename or removal that
|
# if the selected count drops below this number, so a rename or removal that
|
||||||
# thins the security smoke gate must update this file in the same PR.
|
# thins the security smoke gate must update this file in the same PR.
|
||||||
# Adding tests does not require a bump, but bumping keeps the guard tight.
|
# Adding tests does not require a bump, but bumping keeps the guard tight.
|
||||||
18
|
26
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ services:
|
|||||||
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfs-cluster-admin}
|
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfs-cluster-admin}
|
||||||
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfs-cluster-secret}
|
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfs-cluster-secret}
|
||||||
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
# `info` is enough for startup logs/metrics. Use `debug` if Tempo/Jaeger
|
# `info` is enough for startup logs/metrics. Use `debug` if Tempo/Jaeger
|
||||||
# should show richer nested spans during request-path verification.
|
# should show richer nested spans during request-path verification.
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
||||||
@@ -89,6 +90,7 @@ services:
|
|||||||
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfs-cluster-admin}
|
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfs-cluster-admin}
|
||||||
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfs-cluster-secret}
|
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfs-cluster-secret}
|
||||||
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
# `info` is enough for startup logs/metrics. Use `debug` if Tempo/Jaeger
|
# `info` is enough for startup logs/metrics. Use `debug` if Tempo/Jaeger
|
||||||
# should show richer nested spans during request-path verification.
|
# should show richer nested spans during request-path verification.
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
||||||
@@ -135,6 +137,7 @@ services:
|
|||||||
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfs-cluster-admin}
|
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfs-cluster-admin}
|
||||||
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfs-cluster-secret}
|
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfs-cluster-secret}
|
||||||
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
# `info` is enough for startup logs/metrics. Use `debug` if Tempo/Jaeger
|
# `info` is enough for startup logs/metrics. Use `debug` if Tempo/Jaeger
|
||||||
# should show richer nested spans during request-path verification.
|
# should show richer nested spans during request-path verification.
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
||||||
@@ -181,6 +184,7 @@ services:
|
|||||||
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfs-cluster-admin}
|
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfs-cluster-admin}
|
||||||
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfs-cluster-secret}
|
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfs-cluster-secret}
|
||||||
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
# `info` is enough for startup logs/metrics. Use `debug` if Tempo/Jaeger
|
# `info` is enough for startup logs/metrics. Use `debug` if Tempo/Jaeger
|
||||||
# should show richer nested spans during request-path verification.
|
# should show richer nested spans during request-path verification.
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ services:
|
|||||||
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfsadmin-local}
|
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfsadmin-local}
|
||||||
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfssecret-local}
|
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfssecret-local}
|
||||||
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
||||||
- RUSTFS_OBS_USE_STDOUT=${RUSTFS_OBS_USE_STDOUT:-false}
|
- RUSTFS_OBS_USE_STDOUT=${RUSTFS_OBS_USE_STDOUT:-false}
|
||||||
- RUSTFS_OBS_LOG_STDOUT_ENABLED=${RUSTFS_OBS_LOG_STDOUT_ENABLED:-false}
|
- RUSTFS_OBS_LOG_STDOUT_ENABLED=${RUSTFS_OBS_LOG_STDOUT_ENABLED:-false}
|
||||||
@@ -72,6 +73,7 @@ services:
|
|||||||
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfsadmin-local}
|
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfsadmin-local}
|
||||||
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfssecret-local}
|
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfssecret-local}
|
||||||
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
||||||
- RUSTFS_OBS_USE_STDOUT=${RUSTFS_OBS_USE_STDOUT:-false}
|
- RUSTFS_OBS_USE_STDOUT=${RUSTFS_OBS_USE_STDOUT:-false}
|
||||||
- RUSTFS_OBS_LOG_STDOUT_ENABLED=${RUSTFS_OBS_LOG_STDOUT_ENABLED:-false}
|
- RUSTFS_OBS_LOG_STDOUT_ENABLED=${RUSTFS_OBS_LOG_STDOUT_ENABLED:-false}
|
||||||
@@ -118,6 +120,7 @@ services:
|
|||||||
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfsadmin-local}
|
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfsadmin-local}
|
||||||
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfssecret-local}
|
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfssecret-local}
|
||||||
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
||||||
- RUSTFS_OBS_USE_STDOUT=${RUSTFS_OBS_USE_STDOUT:-false}
|
- RUSTFS_OBS_USE_STDOUT=${RUSTFS_OBS_USE_STDOUT:-false}
|
||||||
- RUSTFS_OBS_LOG_STDOUT_ENABLED=${RUSTFS_OBS_LOG_STDOUT_ENABLED:-false}
|
- RUSTFS_OBS_LOG_STDOUT_ENABLED=${RUSTFS_OBS_LOG_STDOUT_ENABLED:-false}
|
||||||
@@ -164,6 +167,7 @@ services:
|
|||||||
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfsadmin-local}
|
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY:-rustfsadmin-local}
|
||||||
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfssecret-local}
|
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY:-rustfssecret-local}
|
||||||
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
- RUSTFS_OBS_ENDPOINT=${RUSTFS_OBS_ENDPOINT:-http://host.docker.internal:4318}
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
- RUSTFS_OBS_LOGGER_LEVEL=${RUSTFS_OBS_LOGGER_LEVEL:-info}
|
||||||
- RUSTFS_OBS_USE_STDOUT=${RUSTFS_OBS_USE_STDOUT:-false}
|
- RUSTFS_OBS_USE_STDOUT=${RUSTFS_OBS_USE_STDOUT:-false}
|
||||||
- RUSTFS_OBS_LOG_STDOUT_ENABLED=${RUSTFS_OBS_LOG_STDOUT_ENABLED:-false}
|
- RUSTFS_OBS_LOG_STDOUT_ENABLED=${RUSTFS_OBS_LOG_STDOUT_ENABLED:-false}
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ services:
|
|||||||
- RUSTFS_ADDRESS=:9000
|
- RUSTFS_ADDRESS=:9000
|
||||||
- RUSTFS_CONSOLE_ENABLE=true
|
- RUSTFS_CONSOLE_ENABLE=true
|
||||||
- RUSTFS_OBS_ENDPOINT=http://otel-collector:4318
|
- RUSTFS_OBS_ENDPOINT=http://otel-collector:4318
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=debug
|
- RUSTFS_OBS_LOGGER_LEVEL=debug
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
ports:
|
ports:
|
||||||
@@ -220,6 +221,7 @@ services:
|
|||||||
- RUSTFS_ADDRESS=:9000
|
- RUSTFS_ADDRESS=:9000
|
||||||
- RUSTFS_CONSOLE_ENABLE=true
|
- RUSTFS_CONSOLE_ENABLE=true
|
||||||
- RUSTFS_OBS_ENDPOINT=http://otel-collector:4318
|
- RUSTFS_OBS_ENDPOINT=http://otel-collector:4318
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=debug
|
- RUSTFS_OBS_LOGGER_LEVEL=debug
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
ports:
|
ports:
|
||||||
@@ -239,6 +241,7 @@ services:
|
|||||||
- RUSTFS_ADDRESS=:9000
|
- RUSTFS_ADDRESS=:9000
|
||||||
- RUSTFS_CONSOLE_ENABLE=true
|
- RUSTFS_CONSOLE_ENABLE=true
|
||||||
- RUSTFS_OBS_ENDPOINT=http://otel-collector:4318
|
- RUSTFS_OBS_ENDPOINT=http://otel-collector:4318
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=debug
|
- RUSTFS_OBS_LOGGER_LEVEL=debug
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
ports:
|
ports:
|
||||||
@@ -258,6 +261,7 @@ services:
|
|||||||
- RUSTFS_ADDRESS=:9000
|
- RUSTFS_ADDRESS=:9000
|
||||||
- RUSTFS_CONSOLE_ENABLE=true
|
- RUSTFS_CONSOLE_ENABLE=true
|
||||||
- RUSTFS_OBS_ENDPOINT=http://otel-collector:4318
|
- RUSTFS_OBS_ENDPOINT=http://otel-collector:4318
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=debug
|
- RUSTFS_OBS_LOGGER_LEVEL=debug
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -47,6 +47,10 @@ Three pre-built Grafana dashboards are included for monitoring RustFS GET perfor
|
|||||||
| **GET Resource Impact** | `grafana-get-resource-impact.json` | Monitors resource usage: concurrent requests, IO queue utilization, disk permit wait, RSS trend |
|
| **GET Resource Impact** | `grafana-get-resource-impact.json` | Monitors resource usage: concurrent requests, IO queue utilization, disk permit wait, RSS trend |
|
||||||
| **Object Data Cache** | `grafana-object-data-cache.json` | Monitors the GET body cache (`rustfs_object_data_cache_*`): hit ratio, lookup/plan/fill outcomes, fill duration quantiles, hit vs fill throughput, entries/weighted bytes, inflight fills, memory-pressure skips, invalidations, and size-class breakdowns |
|
| **Object Data Cache** | `grafana-object-data-cache.json` | Monitors the GET body cache (`rustfs_object_data_cache_*`): hit ratio, lookup/plan/fill outcomes, fill duration quantiles, hit vs fill throughput, entries/weighted bytes, inflight fills, memory-pressure skips, invalidations, and size-class breakdowns |
|
||||||
|
|
||||||
|
### Storage Metrics
|
||||||
|
|
||||||
|
Storage panels require `prometheus-rules/rustfs-storage.yml` and the cluster resource attribute. See the [storage metrics guide](../../docs/operations/storage-metrics.md) for ownership, observer selection, freshness, and rolling upgrades.
|
||||||
|
|
||||||
### Prometheus Alert Rules
|
### Prometheus Alert Rules
|
||||||
|
|
||||||
The file `prometheus-rules/rustfs-get-optimization-alerts.yaml` contains pre-configured alerting rules:
|
The file `prometheus-rules/rustfs-get-optimization-alerts.yaml` contains pre-configured alerting rules:
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ services:
|
|||||||
- RUSTFS_SECRET_KEY=rustfsadmin
|
- RUSTFS_SECRET_KEY=rustfsadmin
|
||||||
- RUSTFS_OBS_LOGGER_LEVEL=info
|
- RUSTFS_OBS_LOGGER_LEVEL=info
|
||||||
- RUSTFS_OBS_ENDPOINT=http://otel-collector:4318
|
- RUSTFS_OBS_ENDPOINT=http://otel-collector:4318
|
||||||
|
- OTEL_RESOURCE_ATTRIBUTES=${OTEL_RESOURCE_ATTRIBUTES:-rustfs.cluster.id=rustfs-dev}
|
||||||
- RUSTFS_OBS_PROFILING_ENDPOINT=http://pyroscope:4040
|
- RUSTFS_OBS_PROFILING_ENDPOINT=http://pyroscope:4040
|
||||||
volumes:
|
volumes:
|
||||||
- rustfs-data:/data/rustfs
|
- rustfs-data:/data/rustfs
|
||||||
|
|||||||
@@ -223,14 +223,15 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum(rustfs_cluster_buckets_total{job=~\"$job\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_buckets_total\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"}",
|
||||||
"legendFormat": "__auto",
|
"legendFormat": "__auto",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Total Buckets",
|
"title": "Total Buckets",
|
||||||
"type": "stat"
|
"type": "stat",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@@ -289,14 +290,15 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum(rustfs_cluster_objects_total{job=~\"$job\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_objects_total\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"}",
|
||||||
"legendFormat": "__auto",
|
"legendFormat": "__auto",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Total Objects",
|
"title": "Total Objects",
|
||||||
"type": "stat"
|
"type": "stat",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@@ -427,7 +429,7 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum(rustfs_cluster_capacity_used_bytes{job=~\"$job\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_capacity_used_bytes\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"}",
|
||||||
"legendFormat": "Used",
|
"legendFormat": "Used",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@@ -438,7 +440,7 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum(rustfs_cluster_capacity_raw_total_bytes{job=~\"$job\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_capacity_raw_total_bytes\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"}",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"legendFormat": "Total",
|
"legendFormat": "Total",
|
||||||
"range": true,
|
"range": true,
|
||||||
@@ -450,7 +452,7 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum(rustfs_cluster_capacity_used_bytes{job=~\"$job\"}) / sum(rustfs_cluster_capacity_raw_total_bytes{job=~\"$job\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_capacity_used_bytes\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"} / ignoring(source_metric) rustfs:storage:current{source_metric=\"rustfs_cluster_capacity_raw_total_bytes\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"}",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": false,
|
"instant": false,
|
||||||
"legendFormat": "Percent",
|
"legendFormat": "Percent",
|
||||||
@@ -459,7 +461,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Capacity",
|
"title": "Capacity",
|
||||||
"type": "stat"
|
"type": "stat",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@@ -525,7 +528,7 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum(rustfs_cluster_capacity_stale_drives{job=~\"$job\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_capacity_stale_drives\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"}",
|
||||||
"legendFormat": "Stale Drives",
|
"legendFormat": "Stale Drives",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@@ -536,14 +539,15 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum(rustfs_cluster_capacity_missing_drives{job=~\"$job\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_capacity_missing_drives\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"}",
|
||||||
"legendFormat": "Missing Drives",
|
"legendFormat": "Missing Drives",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "B"
|
"refId": "B"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Capacity Observation",
|
"title": "Capacity Observation",
|
||||||
"type": "stat"
|
"type": "stat",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@@ -1989,8 +1993,8 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum by (drive) (rustfs_system_drive_used_bytes{job=~\"$job\", drive=~\"$drive\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_system_drive_used_bytes\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",server=~\"$server\",drive=~\"$drive\"}",
|
||||||
"legendFormat": "{{drive}} (bytes)",
|
"legendFormat": "{{server}} | {{drive}} (bytes)",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
},
|
},
|
||||||
@@ -2000,16 +2004,17 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum by (drive) (rustfs_system_drive_used_bytes{job=~\"$job\", drive=~\"$drive\"}) / sum by (drive)(rustfs_system_drive_total_bytes{job=~\"$job\", drive=~\"$drive\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_system_drive_used_bytes\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",server=~\"$server\",drive=~\"$drive\"} / ignoring(source_metric) rustfs:storage:current{source_metric=\"rustfs_system_drive_total_bytes\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",server=~\"$server\",drive=~\"$drive\"}",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": false,
|
"instant": false,
|
||||||
"legendFormat": "{{drive}} (percent)",
|
"legendFormat": "{{server}} | {{drive}} (percent)",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "B"
|
"refId": "B"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "System Drive Usage",
|
"title": "System Drive Usage",
|
||||||
"type": "timeseries"
|
"type": "timeseries",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@@ -2097,14 +2102,15 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "max by (drive) (rustfs_system_drive_capacity_observation_age_seconds{job=~\"$job\", drive=~\"$drive\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_system_drive_capacity_observation_age_seconds\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",server=~\"$server\",drive=~\"$drive\"}",
|
||||||
"legendFormat": "{{drive}}",
|
"legendFormat": "{{server}} | {{drive}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Drive Capacity Observation Age",
|
"title": "Drive Capacity Observation Age",
|
||||||
"type": "timeseries"
|
"type": "timeseries",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@@ -2190,8 +2196,8 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "max by (drive) (rustfs_system_drive_capacity_observation_state{job=~\"$job\", drive=~\"$drive\", state=\"stale\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_system_drive_capacity_observation_state\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",server=~\"$server\",drive=~\"$drive\",state=\"stale\"}",
|
||||||
"legendFormat": "{{drive}} stale",
|
"legendFormat": "{{server}} | {{drive}} stale",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
},
|
},
|
||||||
@@ -2201,14 +2207,15 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "max by (drive) (rustfs_system_drive_capacity_observation_state{job=~\"$job\", drive=~\"$drive\", state=\"missing\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_system_drive_capacity_observation_state\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",server=~\"$server\",drive=~\"$drive\",state=\"missing\"}",
|
||||||
"legendFormat": "{{drive}} missing",
|
"legendFormat": "{{server}} | {{drive}} missing",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "B"
|
"refId": "B"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Drive Capacity Observation State",
|
"title": "Drive Capacity Observation State",
|
||||||
"type": "timeseries"
|
"type": "timeseries",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@@ -4551,7 +4558,7 @@
|
|||||||
"index": 0,
|
"index": 0,
|
||||||
"text": "INACTIVE"
|
"text": "INACTIVE"
|
||||||
},
|
},
|
||||||
"to": 1e-9
|
"to": 1e-09
|
||||||
},
|
},
|
||||||
"type": "range"
|
"type": "range"
|
||||||
}
|
}
|
||||||
@@ -6563,7 +6570,7 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "rustfs_cluster_health_drives_online_count{job=~\"$job\"}",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_health_drives_online_count\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"}",
|
||||||
"legendFormat": "online - {{job}}",
|
"legendFormat": "online - {{job}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@@ -6574,7 +6581,7 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "rustfs_cluster_health_drives_offline_count{job=~\"$job\"}",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_health_drives_offline_count\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"}",
|
||||||
"legendFormat": "offline - {{job}}",
|
"legendFormat": "offline - {{job}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "B"
|
"refId": "B"
|
||||||
@@ -6585,14 +6592,15 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "rustfs_cluster_health_drives_count{job=~\"$job\"}",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_health_drives_count\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"}",
|
||||||
"legendFormat": "total - {{job}}",
|
"legendFormat": "total - {{job}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "C"
|
"refId": "C"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Cluster Drive Health Counts",
|
"title": "Cluster Drive Health Counts",
|
||||||
"type": "timeseries"
|
"type": "timeseries",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": false,
|
"collapsed": false,
|
||||||
@@ -8554,14 +8562,15 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "{__name__=~\"rustfs_system_drive_.*\",job=~\"$job\",drive=~\"$drive\"}",
|
"expr": "rustfs:storage:current{source_metric=~\"rustfs_system_drive_.*\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",server=~\"$server\",drive=~\"$drive\"}",
|
||||||
"legendFormat": "{{__name__}} | {{drive}}",
|
"legendFormat": "{{server}} | {{source_metric}} | {{drive}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "System Drive (All)",
|
"title": "System Drive (All)",
|
||||||
"type": "timeseries"
|
"type": "timeseries",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@@ -8942,14 +8951,15 @@
|
|||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "{__name__=~\"rustfs_cluster_erasure_set_.*\",job=~\"$job\"}",
|
"expr": "rustfs:storage:current{source_metric=~\"rustfs_cluster_erasure_set_.*\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\"}",
|
||||||
"legendFormat": "{{__name__}}",
|
"legendFormat": "{{source_metric}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Cluster Erasure Set (All)",
|
"title": "Cluster Erasure Set (All)",
|
||||||
"type": "timeseries"
|
"type": "timeseries",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@@ -11716,7 +11726,7 @@
|
|||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"expr": "max by (server, drive, pool_index, set_index, drive_index, state) (rustfs_system_drive_runtime_state{job=~\"$job\",server=~\"$server\",drive=~\"$drive\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_drive_runtime_state\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\",drive=~\"$drive\"}",
|
||||||
"legendFormat": "{{server}} | {{drive}} | p{{pool_index}}/s{{set_index}}/d{{drive_index}} | {{state}}"
|
"legendFormat": "{{server}} | {{drive}} | p{{pool_index}}/s{{set_index}}/d{{drive_index}} | {{state}}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -11727,12 +11737,13 @@
|
|||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "B",
|
"refId": "B",
|
||||||
"expr": "max by (server, drive, pool_index, set_index, drive_index) (rustfs_system_drive_offline_duration_seconds{job=~\"$job\",server=~\"$server\",drive=~\"$drive\"})",
|
"expr": "rustfs:storage:current{source_metric=\"rustfs_cluster_drive_offline_duration_seconds\",collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",observer=\"$storage_observer\",drive=~\"$drive\"}",
|
||||||
"legendFormat": "{{server}} | {{drive}} | offline seconds"
|
"legendFormat": "{{server}} | {{drive}} | offline seconds"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Drive Runtime State and Offline Duration",
|
"title": "Observed Cluster Drive State and Offline Duration",
|
||||||
"type": "timeseries"
|
"type": "timeseries",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@@ -11825,12 +11836,13 @@
|
|||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"expr": "sum by (server, drive, pool_index, set_index, drive_index, api) (rate(rustfs_system_drive_api_calls_total{job=~\"$job\",server=~\"$server\",drive=~\"$drive\",api=~\"$drive_api\"}[$__rate_interval]))",
|
"expr": "rate(rustfs_system_drive_api_calls_total{collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",server=~\"$server\",drive=~\"$drive\",api=~\"$drive_api\"}[$__rate_interval]) and ignoring(source_metric) rustfs:storage:current{source_metric=\"rustfs_system_drive_api_calls_total\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\",server=~\"$server\",drive=~\"$drive\",api=~\"$drive_api\"}",
|
||||||
"legendFormat": "{{server}} | {{drive}} | p{{pool_index}}/s{{set_index}}/d{{drive_index}} | {{api}}"
|
"legendFormat": "{{server}} | {{drive}} | p{{pool_index}}/s{{set_index}}/d{{drive_index}} | {{api}}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Drive API Calls by Operation",
|
"title": "Drive API Calls by Operation",
|
||||||
"type": "timeseries"
|
"type": "timeseries",
|
||||||
|
"description": "Storage snapshot rules are required. Local details come from each drive owner. Global values use the selected fresh cluster observer. Missing or expired observations show no data; select another observer if needed."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
@@ -12376,6 +12388,50 @@
|
|||||||
"sort": 1,
|
"sort": 1,
|
||||||
"type": "query"
|
"type": "query"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"current": {},
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${datasource}"
|
||||||
|
},
|
||||||
|
"definition": "label_values(rustfs:storage_snapshot:fresh, rustfs_cluster_id)",
|
||||||
|
"includeAll": false,
|
||||||
|
"label": "Storage cluster",
|
||||||
|
"multi": false,
|
||||||
|
"name": "storage_cluster",
|
||||||
|
"options": [],
|
||||||
|
"query": {
|
||||||
|
"qryType": 1,
|
||||||
|
"query": "label_values(rustfs:storage_snapshot:fresh, rustfs_cluster_id)",
|
||||||
|
"refId": "PrometheusVariableQueryEditor-storage_cluster"
|
||||||
|
},
|
||||||
|
"refresh": 2,
|
||||||
|
"regex": "",
|
||||||
|
"sort": 1,
|
||||||
|
"type": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"current": {},
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "${datasource}"
|
||||||
|
},
|
||||||
|
"definition": "query_result(rustfs:storage_snapshot:fresh{collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\"})",
|
||||||
|
"includeAll": false,
|
||||||
|
"label": "Cluster observer",
|
||||||
|
"multi": false,
|
||||||
|
"name": "storage_observer",
|
||||||
|
"options": [],
|
||||||
|
"query": {
|
||||||
|
"qryType": 3,
|
||||||
|
"query": "query_result(rustfs:storage_snapshot:fresh{collection_scope=\"cluster\",rustfs_cluster_id=\"$storage_cluster\",job=~\"$job\"})",
|
||||||
|
"refId": "PrometheusVariableQueryEditor-storage_observer"
|
||||||
|
},
|
||||||
|
"refresh": 2,
|
||||||
|
"regex": "/observer=\"([^\"]+)\"/",
|
||||||
|
"sort": 1,
|
||||||
|
"type": "query"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allValue": ".*",
|
"allValue": ".*",
|
||||||
"current": {
|
"current": {
|
||||||
@@ -12386,7 +12442,7 @@
|
|||||||
"type": "prometheus",
|
"type": "prometheus",
|
||||||
"uid": "${datasource}"
|
"uid": "${datasource}"
|
||||||
},
|
},
|
||||||
"definition": "label_values(rustfs_system_drive_api_calls_total,api)",
|
"definition": "label_values(rustfs:storage:current{source_metric=\"rustfs_system_drive_api_calls_total\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\"}, api)",
|
||||||
"includeAll": true,
|
"includeAll": true,
|
||||||
"label": "Drive API",
|
"label": "Drive API",
|
||||||
"multi": true,
|
"multi": true,
|
||||||
@@ -12394,7 +12450,7 @@
|
|||||||
"options": [],
|
"options": [],
|
||||||
"query": {
|
"query": {
|
||||||
"qryType": 1,
|
"qryType": 1,
|
||||||
"query": "label_values(rustfs_system_drive_api_calls_total,api)",
|
"query": "label_values(rustfs:storage:current{source_metric=\"rustfs_system_drive_api_calls_total\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\"}, api)",
|
||||||
"refId": "PrometheusVariableQueryEditor-drive_api"
|
"refId": "PrometheusVariableQueryEditor-drive_api"
|
||||||
},
|
},
|
||||||
"refresh": 2,
|
"refresh": 2,
|
||||||
@@ -12455,7 +12511,7 @@
|
|||||||
"text": "All",
|
"text": "All",
|
||||||
"value": "$__all"
|
"value": "$__all"
|
||||||
},
|
},
|
||||||
"definition": "label_values(rustfs_system_drive_used_bytes,drive)",
|
"definition": "label_values(rustfs:storage:current{source_metric=\"rustfs_system_drive_used_bytes\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\"}, drive)",
|
||||||
"includeAll": true,
|
"includeAll": true,
|
||||||
"label": "Drive",
|
"label": "Drive",
|
||||||
"multi": true,
|
"multi": true,
|
||||||
@@ -12463,7 +12519,7 @@
|
|||||||
"options": [],
|
"options": [],
|
||||||
"query": {
|
"query": {
|
||||||
"qryType": 1,
|
"qryType": 1,
|
||||||
"query": "label_values(rustfs_system_drive_used_bytes,drive)",
|
"query": "label_values(rustfs:storage:current{source_metric=\"rustfs_system_drive_used_bytes\",collection_scope=\"local\",rustfs_cluster_id=\"$storage_cluster\"}, drive)",
|
||||||
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
||||||
},
|
},
|
||||||
"refresh": 2,
|
"refresh": 2,
|
||||||
|
|||||||
@@ -0,0 +1,575 @@
|
|||||||
|
# Preserve OTLP timestamps in the Collector. Apply timestamp() directly to
|
||||||
|
# each raw selector, before label rewriting; functions such as label_replace()
|
||||||
|
# replace the evaluation timestamp and would make a cached value look new.
|
||||||
|
# Compare publication times at Prometheus millisecond precision so points
|
||||||
|
# published and exported within the same millisecond are not withheld.
|
||||||
|
groups:
|
||||||
|
- name: rustfs-storage-snapshots
|
||||||
|
interval: 15s
|
||||||
|
rules:
|
||||||
|
- record: rustfs:storage_snapshot:fresh
|
||||||
|
expr: |
|
||||||
|
rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id!="",collection_scope=~"local|cluster"}
|
||||||
|
and ((time() - rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id!="",collection_scope=~"local|cluster"}) <= rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id!="",collection_scope=~"local|cluster"})
|
||||||
|
and ((time() - rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id!="",collection_scope=~"local|cluster"}) >= 0)
|
||||||
|
and (rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id!="",collection_scope=~"local|cluster"} > 0)
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_buckets_total
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_buckets_total{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_buckets_total{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_capacity_free_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_capacity_free_bytes{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_capacity_free_bytes{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_capacity_missing_drives
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_capacity_missing_drives{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_capacity_missing_drives{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_capacity_raw_total_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_capacity_raw_total_bytes{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_capacity_raw_total_bytes{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_capacity_stale_drives
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_capacity_stale_drives{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_capacity_stale_drives{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_capacity_usable_total_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_capacity_usable_total_bytes{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_capacity_usable_total_bytes{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_capacity_used_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_capacity_used_bytes{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_capacity_used_bytes{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_drive_capacity_observation_age_seconds
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_drive_capacity_observation_age_seconds{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_drive_capacity_observation_age_seconds{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_drive_capacity_observation_state
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_drive_capacity_observation_state{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_drive_capacity_observation_state{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_drive_free_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_drive_free_bytes{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_drive_free_bytes{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_drive_offline_duration_seconds
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_drive_offline_duration_seconds{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_drive_offline_duration_seconds{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_drive_present
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_drive_present{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_drive_present{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_drive_runtime_state
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_drive_runtime_state{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_drive_runtime_state{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_drive_total_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_drive_total_bytes{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_drive_total_bytes{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_drive_used_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_drive_used_bytes{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_drive_used_bytes{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_data_shards
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_data_shards{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_data_shards{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_healing_drives_count
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_healing_drives_count{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_healing_drives_count{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_health
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_health{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_health{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_online_drives_count
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_online_drives_count{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_online_drives_count{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_overall_health
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_overall_health{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_overall_health{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_overall_write_quorum
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_overall_write_quorum{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_overall_write_quorum{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_parity
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_parity{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_parity{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_read_health
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_read_health{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_read_health{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_read_quorum
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_read_quorum{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_read_quorum{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_read_tolerance
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_read_tolerance{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_read_tolerance{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_size
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_size{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_size{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_write_health
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_write_health{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_write_health{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_write_quorum
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_write_quorum{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_write_quorum{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_erasure_set_write_tolerance
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_erasure_set_write_tolerance{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_erasure_set_write_tolerance{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_health_drives_count
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_health_drives_count{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_health_drives_count{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_health_drives_offline_count
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_health_drives_offline_count{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_health_drives_offline_count{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_health_drives_online_count
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_health_drives_online_count{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_health_drives_online_count{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_cluster_objects_total
|
||||||
|
expr: |
|
||||||
|
rustfs_cluster_objects_total{rustfs_cluster_id!="",collection_scope="cluster"}
|
||||||
|
and (timestamp(rustfs_cluster_objects_total{rustfs_cluster_id!="",collection_scope="cluster"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_node_disk_free_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_node_disk_free_bytes{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_node_disk_free_bytes{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_node_disk_total_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_node_disk_total_bytes{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_node_disk_total_bytes{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_node_disk_used_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_node_disk_used_bytes{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_node_disk_used_bytes{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_api_calls_total
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_api_calls_total{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_api_calls_total{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_api_latency_by_api_micros
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_api_latency_by_api_micros{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_api_latency_by_api_micros{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_api_latency_micros
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_api_latency_micros{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_api_latency_micros{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_availability_errors_total
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_availability_errors_total{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_availability_errors_total{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_capacity_observation_age_seconds
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_capacity_observation_age_seconds{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_capacity_observation_age_seconds{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_capacity_observation_state
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_capacity_observation_state{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_capacity_observation_state{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_count
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_count{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_count{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_deletes_total
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_deletes_total{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_deletes_total{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_free_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_free_bytes{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_free_bytes{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_free_inodes
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_free_inodes{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_free_inodes{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_healing
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_healing{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_healing{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_health
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_health{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_health{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_info
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_info{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_info{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_io_errors_total
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_io_errors_total{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_io_errors_total{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_offline_count
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_offline_count{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_offline_count{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_offline_duration_seconds
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_offline_duration_seconds{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_offline_duration_seconds{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_online_count
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_online_count{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_online_count{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_perc_util
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_perc_util{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_perc_util{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_present
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_present{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_present{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_reads_await
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_reads_await{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_reads_await{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_reads_kb_per_sec
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_reads_kb_per_sec{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_reads_kb_per_sec{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_reads_per_sec
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_reads_per_sec{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_reads_per_sec{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_runtime_state
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_runtime_state{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_runtime_state{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_scanning
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_scanning{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_scanning{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_timeout_errors_total
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_timeout_errors_total{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_timeout_errors_total{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_total_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_total_bytes{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_total_bytes{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_total_inodes
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_total_inodes{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_total_inodes{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_used_bytes
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_used_bytes{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_used_bytes{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_used_inodes
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_used_inodes{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_used_inodes{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_waiting_io
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_waiting_io{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_waiting_io{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_writes_await
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_writes_await{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_writes_await{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_writes_kb_per_sec
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_writes_kb_per_sec{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_writes_kb_per_sec{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_writes_per_sec
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_writes_per_sec{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_writes_per_sec{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
|
- record: rustfs:storage:current
|
||||||
|
labels:
|
||||||
|
source_metric: rustfs_system_drive_writes_total
|
||||||
|
expr: |
|
||||||
|
rustfs_system_drive_writes_total{rustfs_cluster_id!="",collection_scope="local"}
|
||||||
|
and (timestamp(rustfs_system_drive_writes_total{rustfs_cluster_id!="",collection_scope="local"})
|
||||||
|
>= on (rustfs_cluster_id, observer, collection_scope, job, instance) group_left()
|
||||||
|
(floor(rustfs:storage_snapshot:fresh * 1000) / 1000))
|
||||||
@@ -0,0 +1,189 @@
|
|||||||
|
rule_files:
|
||||||
|
- ../prometheus-rules/rustfs-storage.yml
|
||||||
|
evaluation_interval: 15s
|
||||||
|
tests:
|
||||||
|
- name: owners, pools, clusters and observer views remain distinct in mixed versions
|
||||||
|
interval: 1m
|
||||||
|
input_series:
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="n0",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="n0",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_system_drive_total_bytes{rustfs_cluster_id="a",observer="n0",collection_scope="local",job="rustfs",instance="collector",server="n0",drive="/data",pool_index="0",set_index="0",drive_index="0"}
|
||||||
|
values: 100x8
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="n1",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="n1",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_system_drive_total_bytes{rustfs_cluster_id="a",observer="n1",collection_scope="local",job="rustfs",instance="collector",server="n1",drive="/data",pool_index="0",set_index="0",drive_index="1"}
|
||||||
|
values: 100x8
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="n2",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="n2",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_system_drive_total_bytes{rustfs_cluster_id="a",observer="n2",collection_scope="local",job="rustfs",instance="collector",server="n2",drive="/data",pool_index="1",set_index="0",drive_index="0"}
|
||||||
|
values: 100x8
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="n3",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="n3",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_system_drive_total_bytes{rustfs_cluster_id="a",observer="n3",collection_scope="local",job="rustfs",instance="collector",server="n3",drive="/data",pool_index="1",set_index="0",drive_index="1"}
|
||||||
|
values: 100x8
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="b",observer="n0",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="b",observer="n0",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_system_drive_total_bytes{rustfs_cluster_id="b",observer="n0",collection_scope="local",job="rustfs",instance="collector",server="n0",drive="/data",pool_index="0",set_index="0",drive_index="0"}
|
||||||
|
values: 1000x8
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="b",observer="n1",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="b",observer="n1",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_system_drive_total_bytes{rustfs_cluster_id="b",observer="n1",collection_scope="local",job="rustfs",instance="collector",server="n1",drive="/data",pool_index="0",set_index="0",drive_index="1"}
|
||||||
|
values: 1000x8
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="b",observer="n2",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="b",observer="n2",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_system_drive_total_bytes{rustfs_cluster_id="b",observer="n2",collection_scope="local",job="rustfs",instance="collector",server="n2",drive="/data",pool_index="1",set_index="0",drive_index="0"}
|
||||||
|
values: 1000x8
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="b",observer="n3",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="b",observer="n3",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_system_drive_total_bytes{rustfs_cluster_id="b",observer="n3",collection_scope="local",job="rustfs",instance="collector",server="n3",drive="/data",pool_index="1",set_index="0",drive_index="1"}
|
||||||
|
values: 1000x8
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="n0",collection_scope="cluster",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="n0",collection_scope="cluster",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_cluster_capacity_raw_total_bytes{rustfs_cluster_id="a",observer="n0",collection_scope="cluster",job="rustfs",instance="collector"}
|
||||||
|
values: 400x8
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="n1",collection_scope="cluster",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="n1",collection_scope="cluster",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_cluster_capacity_raw_total_bytes{rustfs_cluster_id="a",observer="n1",collection_scope="cluster",job="rustfs",instance="collector"}
|
||||||
|
values: 300x8
|
||||||
|
- series: rustfs_system_drive_total_bytes{rustfs_cluster_id="a",observer="old",server="n0",drive="/data",job="rustfs",instance="collector"}
|
||||||
|
values: 999x8
|
||||||
|
promql_expr_test:
|
||||||
|
- expr: sum by (rustfs_cluster_id) (rustfs:storage:current{source_metric="rustfs_system_drive_total_bytes",collection_scope="local"})
|
||||||
|
eval_time: 2m
|
||||||
|
exp_samples:
|
||||||
|
- labels: '{rustfs_cluster_id="a"}'
|
||||||
|
value: 400
|
||||||
|
- labels: '{rustfs_cluster_id="b"}'
|
||||||
|
value: 4000
|
||||||
|
- expr: count by (rustfs_cluster_id,pool_index) (rustfs:storage:current{source_metric="rustfs_system_drive_total_bytes"})
|
||||||
|
eval_time: 2m
|
||||||
|
exp_samples:
|
||||||
|
- labels: '{rustfs_cluster_id="a",pool_index="0"}'
|
||||||
|
value: 2
|
||||||
|
- labels: '{rustfs_cluster_id="a",pool_index="1"}'
|
||||||
|
value: 2
|
||||||
|
- labels: '{rustfs_cluster_id="b",pool_index="0"}'
|
||||||
|
value: 2
|
||||||
|
- labels: '{rustfs_cluster_id="b",pool_index="1"}'
|
||||||
|
value: 2
|
||||||
|
- expr: sum(rustfs:storage:current{source_metric="rustfs_cluster_capacity_raw_total_bytes",rustfs_cluster_id="a",observer="n0"})
|
||||||
|
eval_time: 2m
|
||||||
|
exp_samples:
|
||||||
|
- labels: '{}'
|
||||||
|
value: 400
|
||||||
|
- expr: sum(rustfs:storage:current{source_metric="rustfs_cluster_capacity_raw_total_bytes",rustfs_cluster_id="a",observer="n1"})
|
||||||
|
eval_time: 2m
|
||||||
|
exp_samples:
|
||||||
|
- labels: '{}'
|
||||||
|
value: 300
|
||||||
|
- name: removed values and identities cannot rejoin new snapshots; stalled sources expire
|
||||||
|
interval: 1m
|
||||||
|
input_series:
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="n0",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="n0",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="n1",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0 60 _ _ _ _ _ _ _
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="n1",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_system_drive_info{rustfs_cluster_id="a",observer="n0",collection_scope="local",job="rustfs",instance="collector",server="n0",drive="/data",disk_id="old"}
|
||||||
|
values: 1 1 _ _ _ _ _ _ _
|
||||||
|
- series: rustfs_system_drive_info{rustfs_cluster_id="a",observer="n0",collection_scope="local",job="rustfs",instance="collector",server="n0",drive="/data",disk_id="new"}
|
||||||
|
values: _ _ 1 1 1 1 1 1 1
|
||||||
|
- series: rustfs_system_drive_waiting_io{rustfs_cluster_id="a",observer="n0",collection_scope="local",job="rustfs",instance="collector",server="n0",drive="/data"}
|
||||||
|
values: 7 7 _ _ _ _ _ _ _
|
||||||
|
- series: rustfs_system_drive_total_bytes{rustfs_cluster_id="a",observer="n1",collection_scope="local",job="rustfs",instance="collector",server="n1",drive="/data"}
|
||||||
|
values: 100 100 _ _ _ _ _ _ _
|
||||||
|
promql_expr_test:
|
||||||
|
- expr: rustfs:storage:current{source_metric="rustfs_system_drive_info",disk_id="old"}
|
||||||
|
eval_time: 2m
|
||||||
|
exp_samples: []
|
||||||
|
- expr: rustfs:storage:current{source_metric="rustfs_system_drive_waiting_io"}
|
||||||
|
eval_time: 2m
|
||||||
|
exp_samples: []
|
||||||
|
- expr: count(rustfs:storage:current{source_metric="rustfs_system_drive_info",disk_id="new"})
|
||||||
|
eval_time: 2m
|
||||||
|
exp_samples:
|
||||||
|
- labels: '{}'
|
||||||
|
value: 1
|
||||||
|
- expr: rustfs:storage:current{source_metric="rustfs_system_drive_total_bytes"}
|
||||||
|
eval_time: 5m
|
||||||
|
exp_samples: []
|
||||||
|
- expr: rustfs:storage_snapshot:fresh{observer="n1"}
|
||||||
|
eval_time: 5m
|
||||||
|
exp_samples: []
|
||||||
|
- name: counters reset independently; filter versions before rate and sum rates across owners
|
||||||
|
interval: 1m
|
||||||
|
input_series:
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="n0",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="n0",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_system_drive_api_calls_total{rustfs_cluster_id="a",observer="n0",collection_scope="local",job="rustfs",instance="collector",server="n0",drive="/data",disk_id="n0-disk",api="read_all"}
|
||||||
|
values: 0 60 120 30 90 150 210
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="n1",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x8
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="n1",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x8
|
||||||
|
- series: rustfs_system_drive_api_calls_total{rustfs_cluster_id="a",observer="n1",collection_scope="local",job="rustfs",instance="collector",server="n1",drive="/data",disk_id="n1-disk",api="read_all"}
|
||||||
|
values: 0+120x6
|
||||||
|
- series: rustfs_system_drive_api_calls_total{rustfs_cluster_id="a",server="n0",drive="/data",observer="old"}
|
||||||
|
values: 0+999x6
|
||||||
|
promql_expr_test:
|
||||||
|
- expr: sum(resets(rustfs_system_drive_api_calls_total{collection_scope="local"}[5m]))
|
||||||
|
eval_time: 5m
|
||||||
|
exp_samples:
|
||||||
|
- labels: '{}'
|
||||||
|
value: 1
|
||||||
|
- expr: sum(rate(rustfs_system_drive_api_calls_total{collection_scope="local"}[2m]) and ignoring(source_metric) rustfs:storage:current{source_metric="rustfs_system_drive_api_calls_total"})
|
||||||
|
eval_time: 5m
|
||||||
|
exp_samples:
|
||||||
|
- labels: '{}'
|
||||||
|
value: 3
|
||||||
|
- name: completed slow collection has no validity budget
|
||||||
|
interval: 1m
|
||||||
|
input_series:
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="slow",collection_scope="cluster",job="rustfs",instance="collector"}
|
||||||
|
values: 0+60x3
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="slow",collection_scope="cluster",job="rustfs",instance="collector"}
|
||||||
|
values: '0x3'
|
||||||
|
promql_expr_test:
|
||||||
|
- expr: rustfs:storage_snapshot:fresh{observer="slow"}
|
||||||
|
eval_time: 2m
|
||||||
|
exp_samples: []
|
||||||
|
- name: submillisecond publication and millisecond OTLP samples share a cutoff
|
||||||
|
interval: 1m
|
||||||
|
input_series:
|
||||||
|
- series: rustfs_storage_snapshot_last_success_timestamp_seconds{rustfs_cluster_id="a",observer="submillisecond",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 0.0009+60x3
|
||||||
|
- series: rustfs_storage_snapshot_max_age_seconds{rustfs_cluster_id="a",observer="submillisecond",collection_scope="local",job="rustfs",instance="collector"}
|
||||||
|
values: 180x3
|
||||||
|
- series: rustfs_system_drive_total_bytes{rustfs_cluster_id="a",observer="submillisecond",collection_scope="local",job="rustfs",instance="collector",server="submillisecond",drive="/data"}
|
||||||
|
values: 100x3
|
||||||
|
promql_expr_test:
|
||||||
|
- expr: count(rustfs:storage:current{source_metric="rustfs_system_drive_total_bytes",observer="submillisecond"})
|
||||||
|
eval_time: 2m15s
|
||||||
|
exp_samples:
|
||||||
|
- labels: '{}'
|
||||||
|
value: 1
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
name: On-demand migration interop report
|
||||||
|
description: >-
|
||||||
|
Merge the per-case JSON entries an on-demand-migration interop run wrote with
|
||||||
|
the nextest JUnit result into one provider report, and summarise it.
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
provider:
|
||||||
|
description: Provider the run addressed (minio, aws, r2, gcs).
|
||||||
|
required: true
|
||||||
|
cases-dir:
|
||||||
|
description: Directory the cases wrote their JSON entries into.
|
||||||
|
required: true
|
||||||
|
junit:
|
||||||
|
description: nextest JUnit XML of the run.
|
||||||
|
required: true
|
||||||
|
output:
|
||||||
|
description: Path of the merged JSON report to write.
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
# The JUnit file is authoritative for which cases ran and how they ended:
|
||||||
|
# a case that fails or panics never reaches its own report entry, so
|
||||||
|
# trusting the entries alone would silently shorten the report exactly when
|
||||||
|
# something went wrong. The entries only add what JUnit cannot know — the
|
||||||
|
# source request accounting and the bucket's migration counters.
|
||||||
|
- name: Merge interop case reports
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
ODM_REPORT_PROVIDER: ${{ inputs.provider }}
|
||||||
|
ODM_REPORT_CASES_DIR: ${{ inputs.cases-dir }}
|
||||||
|
ODM_REPORT_JUNIT: ${{ inputs.junit }}
|
||||||
|
ODM_REPORT_OUTPUT: ${{ inputs.output }}
|
||||||
|
run: |
|
||||||
|
python3 - <<'PY'
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import pathlib
|
||||||
|
import xml.etree.ElementTree as ElementTree
|
||||||
|
|
||||||
|
provider = os.environ["ODM_REPORT_PROVIDER"]
|
||||||
|
cases_dir = pathlib.Path(os.environ["ODM_REPORT_CASES_DIR"])
|
||||||
|
junit = pathlib.Path(os.environ["ODM_REPORT_JUNIT"])
|
||||||
|
output = pathlib.Path(os.environ["ODM_REPORT_OUTPUT"])
|
||||||
|
|
||||||
|
entries = {}
|
||||||
|
if cases_dir.is_dir():
|
||||||
|
for path in sorted(cases_dir.glob("*.json")):
|
||||||
|
entry = json.loads(path.read_text())
|
||||||
|
entries[entry["case"]] = entry
|
||||||
|
|
||||||
|
cases = []
|
||||||
|
for case in ElementTree.parse(junit).getroot().iter("testcase"):
|
||||||
|
name = case.get("name", "")
|
||||||
|
failed = [child for child in case if child.tag in ("failure", "error")]
|
||||||
|
skipped = [child for child in case if child.tag == "skipped"]
|
||||||
|
outcome = "failed" if failed else "skipped" if skipped else "passed"
|
||||||
|
entry = entries.get(name.rsplit("::", 1)[-1], {})
|
||||||
|
cases.append(
|
||||||
|
{
|
||||||
|
"name": name,
|
||||||
|
"outcome": outcome,
|
||||||
|
"junit_duration_ms": round(float(case.get("time", "0")) * 1000),
|
||||||
|
"case_duration_ms": entry.get("duration_ms"),
|
||||||
|
"source_requests": entry.get("source_requests"),
|
||||||
|
"odm_counters": entry.get("odm_counters"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
report = {
|
||||||
|
"provider": provider,
|
||||||
|
"repository": os.environ.get("GITHUB_REPOSITORY", ""),
|
||||||
|
"sha": os.environ.get("GITHUB_SHA", ""),
|
||||||
|
"run_id": os.environ.get("GITHUB_RUN_ID", ""),
|
||||||
|
"cases": cases,
|
||||||
|
"totals": {
|
||||||
|
"cases": len(cases),
|
||||||
|
"passed": sum(1 for case in cases if case["outcome"] == "passed"),
|
||||||
|
"failed": sum(1 for case in cases if case["outcome"] == "failed"),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
output.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
output.write_text(json.dumps(report, indent=2, sort_keys=True) + "\n")
|
||||||
|
|
||||||
|
summary = [f"### On-demand migration interop: `{provider}`", "", "| Case | Outcome | Duration | Source requests |", "|---|---|---|---|"]
|
||||||
|
for case in cases:
|
||||||
|
requests = case["source_requests"]
|
||||||
|
counted = f"{requests['total']} ({requests['counted_by']})" if requests else "not reported"
|
||||||
|
summary.append(f"| `{case['name']}` | {case['outcome']} | {case['junit_duration_ms']} ms | {counted} |")
|
||||||
|
with open(os.environ["GITHUB_STEP_SUMMARY"], "a", encoding="utf-8") as handle:
|
||||||
|
handle.write("\n".join(summary) + "\n\n")
|
||||||
|
|
||||||
|
# A passed case with no entry of its own means the harness stopped
|
||||||
|
# writing one: the report would keep looking complete while silently
|
||||||
|
# losing its request accounting.
|
||||||
|
unreported = [case["name"] for case in cases if case["outcome"] == "passed" and case["source_requests"] is None]
|
||||||
|
if unreported:
|
||||||
|
raise SystemExit(f"passed cases wrote no interop report entry: {', '.join(unreported)}")
|
||||||
|
PY
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
# Copyright 2024 RustFS Team
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
name: Quick Checks
|
||||||
|
description: Run the shared compile-free RustFS quality checks.
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Install quality tools
|
||||||
|
uses: taiki-e/install-action@bffeee26d4db9be238a4ea78d8826604ebcb594d # v2
|
||||||
|
with:
|
||||||
|
tool: |
|
||||||
|
ripgrep@15.2.0
|
||||||
|
shellcheck@0.11.0
|
||||||
|
|
||||||
|
- name: Install actionlint
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
actionlint_dir="$(mktemp -d "${RUNNER_TEMP}/actionlint.XXXXXX")"
|
||||||
|
curl --fail --location --silent --show-error \
|
||||||
|
--output "$actionlint_dir/actionlint.tar.gz" \
|
||||||
|
https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz
|
||||||
|
echo "8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 $actionlint_dir/actionlint.tar.gz" | sha256sum --check --status
|
||||||
|
tar -xzf "$actionlint_dir/actionlint.tar.gz" -C "$actionlint_dir" actionlint
|
||||||
|
rm "$actionlint_dir/actionlint.tar.gz"
|
||||||
|
echo "$actionlint_dir" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
||||||
|
with:
|
||||||
|
components: rustfmt
|
||||||
|
|
||||||
|
- name: Check workflow syntax and shell scripts
|
||||||
|
shell: bash
|
||||||
|
run: shellcheck --version && actionlint
|
||||||
|
|
||||||
|
- name: Check code formatting
|
||||||
|
shell: bash
|
||||||
|
run: cargo fmt --all --check
|
||||||
|
|
||||||
|
- name: Check unsafe code allowances
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_unsafe_code_allowances.sh
|
||||||
|
|
||||||
|
- name: Check layered dependencies
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_layer_dependencies.sh
|
||||||
|
|
||||||
|
- name: Check architecture migration rules
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_architecture_migration_rules.sh
|
||||||
|
|
||||||
|
- name: Check logging guardrails
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_logging_guardrails.sh
|
||||||
|
|
||||||
|
- name: Check error other(format!) ratchet
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_error_other_format_ratchet.sh
|
||||||
|
|
||||||
|
- name: Check tokio io-uring feature guard
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_no_tokio_io_uring.sh
|
||||||
|
|
||||||
|
- name: Check extension schema boundaries
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_extension_schema_boundaries.sh
|
||||||
|
|
||||||
|
- name: Check body-cache whitelist guard
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_body_cache_whitelist.sh
|
||||||
|
|
||||||
|
- name: Check s3s footprint ratchet
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_s3s_footprint.sh
|
||||||
|
|
||||||
|
- name: Check cryptographic capability wording
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_fips_wording.sh
|
||||||
|
|
||||||
|
- name: Check no embedded secret material
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_embedded_secrets.sh
|
||||||
|
|
||||||
|
- name: Run script contract tests
|
||||||
|
shell: bash
|
||||||
|
run: make script-tests
|
||||||
|
|
||||||
|
- name: Check test wiring
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
python3 ./scripts/check_test_wiring.py --self-test
|
||||||
|
python3 ./scripts/check_scheduled_validation_freshness.py --self-test
|
||||||
|
python3 ./scripts/test_security_workflow.py
|
||||||
|
python3 ./scripts/test_nightly_candidate.py
|
||||||
|
python3 ./scripts/check_test_wiring.py
|
||||||
|
|
||||||
|
- name: Check no planning docs committed
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_no_planning_docs.sh
|
||||||
|
|
||||||
|
- name: Check io_uring lane --lib precondition
|
||||||
|
shell: bash
|
||||||
|
run: ./scripts/check_uring_lane_lib_only.sh
|
||||||
@@ -10,16 +10,16 @@ Use N/A when there is no related issue.
|
|||||||
|
|
||||||
## Summary of Changes
|
## Summary of Changes
|
||||||
<!--
|
<!--
|
||||||
Briefly explain what changed and why reviewers should accept it.
|
Describe the concrete problem and resulting behavior. For a behavior change, name the input or state that triggers it and the expected outcome. Explain any new dependency or abstraction that the change needs.
|
||||||
Focus on behavior, compatibility, and review-relevant context.
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
## Verification
|
## Verification
|
||||||
<!--
|
<!--
|
||||||
List the commands or checks you ran, for example:
|
Give 1–3 concrete pieces of evidence for the changed behavior: the test or command, its observed result, and the regression it catches. For a bug fix, record a failing-before/passing-after check or explain why it was unavailable.
|
||||||
- `make pre-commit`
|
|
||||||
|
|
||||||
Use N/A only when verification is not applicable.
|
Identify the tested commit and any local changes. When testing a prebuilt binary or external service, include its source/version and artifact identity; a successful run against a different build is not evidence for this change.
|
||||||
|
|
||||||
|
List relevant checks not run and the remaining risk. Use the validation tier in AGENTS.md; do not run broader checks solely to fill this section. For documentation-only changes, list the applicable documentation checks. Use N/A only when verification is not applicable.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
## Impact
|
## Impact
|
||||||
|
|||||||
@@ -55,6 +55,10 @@ secret_key = ${S3_SECRET_KEY}
|
|||||||
|
|
||||||
## replace with key id obtained when secret is created, or delete if KMS not tested
|
## replace with key id obtained when secret is created, or delete if KMS not tested
|
||||||
#kms_keyid = 01234567-89ab-cdef-0123-456789abcdef
|
#kms_keyid = 01234567-89ab-cdef-0123-456789abcdef
|
||||||
|
#kms_keyid2 = fedcba98-7654-3210-fedc-ba9876543210
|
||||||
|
|
||||||
|
## Expected service default for SSE-KMS requests without a key id; empty means none
|
||||||
|
#kms_default_keyid =
|
||||||
|
|
||||||
## Storage classes
|
## Storage classes
|
||||||
#storage_classes = "LUKEWARM, FROZEN"
|
#storage_classes = "LUKEWARM, FROZEN"
|
||||||
|
|||||||
@@ -4,6 +4,11 @@
|
|||||||
{ "workflow": ".github/workflows/ci.yml", "max_age_hours": 192 },
|
{ "workflow": ".github/workflows/ci.yml", "max_age_hours": 192 },
|
||||||
{ "workflow": ".github/workflows/coverage.yml", "max_age_hours": 192 },
|
{ "workflow": ".github/workflows/coverage.yml", "max_age_hours": 192 },
|
||||||
{ "workflow": ".github/workflows/e2e-replication-nightly.yml", "max_age_hours": 36 },
|
{ "workflow": ".github/workflows/e2e-replication-nightly.yml", "max_age_hours": 36 },
|
||||||
|
{
|
||||||
|
"workflow": ".github/workflows/e2e-distributed.yml",
|
||||||
|
"max_age_hours": 36,
|
||||||
|
"never_ran_grace_until": "2026-09-18T00:00:00Z"
|
||||||
|
},
|
||||||
{ "workflow": ".github/workflows/e2e-s3tests.yml", "max_age_hours": 192 },
|
{ "workflow": ".github/workflows/e2e-s3tests.yml", "max_age_hours": 192 },
|
||||||
{ "workflow": ".github/workflows/fuzz.yml", "max_age_hours": 36 },
|
{ "workflow": ".github/workflows/fuzz.yml", "max_age_hours": 36 },
|
||||||
{ "workflow": ".github/workflows/mint.yml", "max_age_hours": 192 },
|
{ "workflow": ".github/workflows/mint.yml", "max_age_hours": 192 },
|
||||||
|
|||||||
@@ -1065,7 +1065,7 @@ jobs:
|
|||||||
while IFS= read -r preview_tag; do
|
while IFS= read -r preview_tag; do
|
||||||
[[ -n "$preview_tag" ]] || continue
|
[[ -n "$preview_tag" ]] || continue
|
||||||
echo "🧹 Deleting preview release $preview_tag (tag kept)"
|
echo "🧹 Deleting preview release $preview_tag (tag kept)"
|
||||||
gh release delete "$preview_tag" --yes
|
gh release delete "$preview_tag" --repo "${GITHUB_REPOSITORY}" --yes
|
||||||
DELETED=$((DELETED + 1))
|
DELETED=$((DELETED + 1))
|
||||||
done < <(
|
done < <(
|
||||||
jq -r --arg tag "$TAG" '
|
jq -r --arg tag "$TAG" '
|
||||||
|
|||||||
@@ -1,161 +0,0 @@
|
|||||||
# Copyright 2026 RustFS Team
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
# Companion to ci.yml for required status checks.
|
|
||||||
#
|
|
||||||
# ci.yml skips docs-only pull requests via paths-ignore, but the branch ruleset
|
|
||||||
# requires a check named "Test and Lint" — without this workflow a docs-only PR
|
|
||||||
# would wait on it forever. This workflow triggers on exactly the paths ci.yml
|
|
||||||
# ignores and reports success under the same job name. Mixed PRs trigger both
|
|
||||||
# workflows and the real check still gates: a required check with any failing
|
|
||||||
# run blocks the merge.
|
|
||||||
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
|
|
||||||
#
|
|
||||||
# "Quick Checks" is mirrored here ahead of the ruleset change that will make it
|
|
||||||
# required too (rustfs/backlog#1599). Until that change lands this job is
|
|
||||||
# inert; mirroring it first is what lets the ruleset change happen without
|
|
||||||
# stranding docs-only PRs on a check nobody reports.
|
|
||||||
#
|
|
||||||
# Keep the paths list below in sync with the pull_request paths-ignore list
|
|
||||||
# in ci.yml, and keep the quick-checks steps below byte-identical to the
|
|
||||||
# quick-checks job in ci.yml.
|
|
||||||
|
|
||||||
name: Continuous Integration (docs only)
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [ opened, synchronize, reopened ]
|
|
||||||
branches: [ main ]
|
|
||||||
paths:
|
|
||||||
- "**.md"
|
|
||||||
- "docs/**"
|
|
||||||
- "deploy/**"
|
|
||||||
- "scripts/dev_*.sh"
|
|
||||||
- "scripts/probe.sh"
|
|
||||||
- "LICENSE*"
|
|
||||||
- ".gitignore"
|
|
||||||
- ".dockerignore"
|
|
||||||
- "README*"
|
|
||||||
- "**/*.png"
|
|
||||||
- "**/*.jpg"
|
|
||||||
- "**/*.svg"
|
|
||||||
- ".github/workflows/build.yml"
|
|
||||||
- ".github/workflows/docker.yml"
|
|
||||||
- ".github/workflows/audit.yml"
|
|
||||||
- "flake.lock"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Deliberately NOT a bare `echo`. Once "Quick Checks" becomes a required
|
|
||||||
# check, ci.yml gates every expensive job behind it, so a mixed PR reports
|
|
||||||
# two check runs with this name: the real one (45-51s) and this companion.
|
|
||||||
# GitHub has no written contract for how it picks between same-named
|
|
||||||
# required check runs ("latest wins" vs "any failure blocks"), so instead of
|
|
||||||
# relying on ordering we make both runs execute the same commands against
|
|
||||||
# the same merge ref — their conclusions are then necessarily identical and
|
|
||||||
# the choice does not matter. Keep these steps byte-identical to the
|
|
||||||
# quick-checks job in ci.yml (a guard script that asserts this, and the paths
|
|
||||||
# sync below, is tracked in rustfs/backlog#1603).
|
|
||||||
#
|
|
||||||
# For a genuinely docs-only PR this adds no strictness (no code changed, so
|
|
||||||
# fmt and the guards always pass) and costs ~50s of ubuntu-latest.
|
|
||||||
quick-checks:
|
|
||||||
name: Quick Checks
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 10
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Install ripgrep
|
|
||||||
uses: taiki-e/install-action@bffeee26d4db9be238a4ea78d8826604ebcb594d # v2
|
|
||||||
with:
|
|
||||||
tool: ripgrep@15.2.0
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
||||||
with:
|
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- name: Check code formatting
|
|
||||||
run: cargo fmt --all --check
|
|
||||||
|
|
||||||
- name: Check unsafe code allowances
|
|
||||||
run: ./scripts/check_unsafe_code_allowances.sh
|
|
||||||
|
|
||||||
- name: Check layered dependencies
|
|
||||||
run: ./scripts/check_layer_dependencies.sh
|
|
||||||
|
|
||||||
- name: Check architecture migration rules
|
|
||||||
run: ./scripts/check_architecture_migration_rules.sh
|
|
||||||
|
|
||||||
- name: Check logging guardrails
|
|
||||||
run: ./scripts/check_logging_guardrails.sh
|
|
||||||
|
|
||||||
- name: Check tokio io-uring feature guard
|
|
||||||
run: ./scripts/check_no_tokio_io_uring.sh
|
|
||||||
|
|
||||||
- name: Check extension schema boundaries
|
|
||||||
run: ./scripts/check_extension_schema_boundaries.sh
|
|
||||||
|
|
||||||
- name: Check body-cache whitelist guard
|
|
||||||
run: ./scripts/check_body_cache_whitelist.sh
|
|
||||||
|
|
||||||
- name: Check s3s footprint ratchet
|
|
||||||
run: ./scripts/check_s3s_footprint.sh
|
|
||||||
|
|
||||||
- name: Check cryptographic capability wording
|
|
||||||
run: ./scripts/check_fips_wording.sh
|
|
||||||
|
|
||||||
- name: Check no embedded secret material
|
|
||||||
run: ./scripts/check_embedded_secrets.sh
|
|
||||||
|
|
||||||
- name: Check test wiring
|
|
||||||
run: |
|
|
||||||
python3 ./scripts/check_test_wiring.py --self-test
|
|
||||||
python3 ./scripts/check_scheduled_validation_freshness.py --self-test
|
|
||||||
python3 ./scripts/check_test_wiring.py
|
|
||||||
|
|
||||||
- name: Check no planning docs committed
|
|
||||||
run: ./scripts/check_no_planning_docs.sh
|
|
||||||
|
|
||||||
- name: Check CI paths stay in sync
|
|
||||||
run: ./scripts/check_ci_paths_sync.sh
|
|
||||||
|
|
||||||
- name: Check io_uring lane --lib precondition
|
|
||||||
run: ./scripts/check_uring_lane_lib_only.sh
|
|
||||||
|
|
||||||
test-and-lint:
|
|
||||||
name: Test and Lint
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 10
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
# Docs-only PRs skip the full code CI, but they are exactly where a
|
|
||||||
# planning-type document could be slipped in (git add -f bypasses
|
|
||||||
# .gitignore). Run the guard here so the required "Test and Lint" check
|
|
||||||
# stays meaningful for docs-only changes.
|
|
||||||
- name: Check no planning docs committed
|
|
||||||
run: ./scripts/check_no_planning_docs.sh
|
|
||||||
|
|
||||||
- name: Satisfy required check for docs-only changes
|
|
||||||
run: echo "Docs-only change — code CI is skipped by paths-ignore; planning-docs guard passed, reporting success for the required 'Test and Lint' check."
|
|
||||||
+195
-145
@@ -16,7 +16,7 @@ name: Continuous Integration
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main, release ]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "**.md"
|
- "**.md"
|
||||||
- "docs/**"
|
- "docs/**"
|
||||||
@@ -36,26 +36,7 @@ on:
|
|||||||
- "flake.lock"
|
- "flake.lock"
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [ opened, synchronize, reopened, closed ]
|
types: [ opened, synchronize, reopened, closed ]
|
||||||
branches: [ main ]
|
branches: [ main, release ]
|
||||||
# Keep this list in sync with the `paths` list in ci-docs-only.yml, which
|
|
||||||
# reports the required "Test and Lint" check for PRs skipped here.
|
|
||||||
paths-ignore:
|
|
||||||
- "**.md"
|
|
||||||
- "docs/**"
|
|
||||||
- "deploy/**"
|
|
||||||
- "scripts/dev_*.sh"
|
|
||||||
- "scripts/probe.sh"
|
|
||||||
- "LICENSE*"
|
|
||||||
- ".gitignore"
|
|
||||||
- ".dockerignore"
|
|
||||||
- "README*"
|
|
||||||
- "**/*.png"
|
|
||||||
- "**/*.jpg"
|
|
||||||
- "**/*.svg"
|
|
||||||
- ".github/workflows/build.yml"
|
|
||||||
- ".github/workflows/docker.yml"
|
|
||||||
- ".github/workflows/audit.yml"
|
|
||||||
- "flake.lock"
|
|
||||||
merge_group:
|
merge_group:
|
||||||
types: [ checks_requested ]
|
types: [ checks_requested ]
|
||||||
schedule:
|
schedule:
|
||||||
@@ -88,6 +69,32 @@ jobs:
|
|||||||
- name: Explain cancellation run
|
- name: Explain cancellation run
|
||||||
run: echo "PR closed; this run only cancels older runs in the same concurrency group."
|
run: echo "PR closed; this run only cancels older runs in the same concurrency group."
|
||||||
|
|
||||||
|
classify-changes:
|
||||||
|
name: Select CI scope
|
||||||
|
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
outputs:
|
||||||
|
mode: ${{ steps.scope.outputs.mode }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Select scope using the base revision's policy
|
||||||
|
id: scope
|
||||||
|
env:
|
||||||
|
CI_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||||
|
run: |
|
||||||
|
if [[ "$GITHUB_EVENT_NAME" != "pull_request" ]]; then
|
||||||
|
printf '%s\n' 'mode=full' >> "$GITHUB_OUTPUT"
|
||||||
|
elif [[ "$CI_BASE_SHA" =~ ^[0-9a-f]{40}$ ]] && git show "$CI_BASE_SHA:scripts/ci_gate.py" > "$RUNNER_TEMP/ci-gate-base.py"; then
|
||||||
|
python3 -I "$RUNNER_TEMP/ci-gate-base.py" select
|
||||||
|
else
|
||||||
|
printf '%s\n' 'mode=full' >> "$GITHUB_OUTPUT"
|
||||||
|
echo "Base CI policy unavailable; running the full matrix."
|
||||||
|
fi
|
||||||
|
|
||||||
typos:
|
typos:
|
||||||
name: Typos
|
name: Typos
|
||||||
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
||||||
@@ -100,12 +107,7 @@ jobs:
|
|||||||
- name: Typos check with custom config file
|
- name: Typos check with custom config file
|
||||||
uses: crate-ci/typos@37bb98842b0d8c4ffebdb75301a13db0267cef89 # master
|
uses: crate-ci/typos@37bb98842b0d8c4ffebdb75301a13db0267cef89 # master
|
||||||
|
|
||||||
# Fast, compile-free checks that fail early so contributors get feedback in
|
# Fail early with compile-free checks for every pull request.
|
||||||
# ~1 minute instead of waiting for the full test job.
|
|
||||||
#
|
|
||||||
# These steps are mirrored byte-for-byte in ci-docs-only.yml so that a mixed
|
|
||||||
# PR, which reports two check runs named "Quick Checks", cannot get one red
|
|
||||||
# and one green. Edit both jobs together.
|
|
||||||
quick-checks:
|
quick-checks:
|
||||||
name: Quick Checks
|
name: Quick Checks
|
||||||
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
||||||
@@ -117,71 +119,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Install ripgrep
|
- name: Run shared quick checks
|
||||||
uses: taiki-e/install-action@bffeee26d4db9be238a4ea78d8826604ebcb594d # v2
|
uses: ./.github/actions/quick-checks
|
||||||
with:
|
|
||||||
tool: ripgrep@15.2.0
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
||||||
with:
|
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- name: Check code formatting
|
|
||||||
run: cargo fmt --all --check
|
|
||||||
|
|
||||||
- name: Check unsafe code allowances
|
|
||||||
run: ./scripts/check_unsafe_code_allowances.sh
|
|
||||||
|
|
||||||
- name: Check layered dependencies
|
|
||||||
run: ./scripts/check_layer_dependencies.sh
|
|
||||||
|
|
||||||
- name: Check architecture migration rules
|
|
||||||
run: ./scripts/check_architecture_migration_rules.sh
|
|
||||||
|
|
||||||
- name: Check logging guardrails
|
|
||||||
run: ./scripts/check_logging_guardrails.sh
|
|
||||||
|
|
||||||
- name: Check error other(format!) ratchet
|
|
||||||
run: ./scripts/check_error_other_format_ratchet.sh
|
|
||||||
|
|
||||||
- name: Check tokio io-uring feature guard
|
|
||||||
run: ./scripts/check_no_tokio_io_uring.sh
|
|
||||||
|
|
||||||
- name: Check extension schema boundaries
|
|
||||||
run: ./scripts/check_extension_schema_boundaries.sh
|
|
||||||
|
|
||||||
- name: Check body-cache whitelist guard
|
|
||||||
run: ./scripts/check_body_cache_whitelist.sh
|
|
||||||
|
|
||||||
- name: Check s3s footprint ratchet
|
|
||||||
run: ./scripts/check_s3s_footprint.sh
|
|
||||||
|
|
||||||
- name: Check cryptographic capability wording
|
|
||||||
run: ./scripts/check_fips_wording.sh
|
|
||||||
|
|
||||||
- name: Check no embedded secret material
|
|
||||||
run: ./scripts/check_embedded_secrets.sh
|
|
||||||
|
|
||||||
- name: Check test wiring
|
|
||||||
run: |
|
|
||||||
python3 ./scripts/check_test_wiring.py --self-test
|
|
||||||
python3 ./scripts/check_scheduled_validation_freshness.py --self-test
|
|
||||||
python3 ./scripts/check_test_wiring.py
|
|
||||||
|
|
||||||
- name: Check no planning docs committed
|
|
||||||
run: ./scripts/check_no_planning_docs.sh
|
|
||||||
|
|
||||||
- name: Check CI paths stay in sync
|
|
||||||
run: ./scripts/check_ci_paths_sync.sh
|
|
||||||
|
|
||||||
- name: Check io_uring lane --lib precondition
|
|
||||||
run: ./scripts/check_uring_lane_lib_only.sh
|
|
||||||
|
|
||||||
test-and-lint:
|
test-and-lint:
|
||||||
name: Test and Lint
|
name: Workspace Test and Lint
|
||||||
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
if: needs.classify-changes.outputs.mode == 'full' && (github.event_name != 'pull_request' || github.event.action != 'closed')
|
||||||
needs: [ quick-checks ]
|
needs: [ quick-checks, classify-changes ]
|
||||||
runs-on: sm-standard-4
|
runs-on: sm-standard-4
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
env:
|
env:
|
||||||
@@ -269,6 +213,7 @@ jobs:
|
|||||||
CARGO_BUILD_JOBS: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && '3' || '2' }}
|
CARGO_BUILD_JOBS: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && '3' || '2' }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p artifacts/test-and-lint
|
mkdir -p artifacts/test-and-lint
|
||||||
|
rm -f target/nextest/ci/junit.xml
|
||||||
./scripts/ci/resource_sampler.sh start nextest
|
./scripts/ci/resource_sampler.sh start nextest
|
||||||
trap './scripts/ci/resource_sampler.sh stop' EXIT
|
trap './scripts/ci/resource_sampler.sh stop' EXIT
|
||||||
set +e
|
set +e
|
||||||
@@ -277,6 +222,12 @@ jobs:
|
|||||||
--status-level all --final-status-level all \
|
--status-level all --final-status-level all \
|
||||||
2>&1 | tee artifacts/test-and-lint/nextest.log
|
2>&1 | tee artifacts/test-and-lint/nextest.log
|
||||||
status=${PIPESTATUS[0]}
|
status=${PIPESTATUS[0]}
|
||||||
|
if [[ "${status}" -eq 0 ]]; then
|
||||||
|
cargo nextest list --profile ci --all --exclude e2e_test --message-format json \
|
||||||
|
> artifacts/test-and-lint/core-test-listing.json \
|
||||||
|
&& python3 scripts/check_test_wiring.py --check-core artifacts/test-and-lint/core-test-listing.json \
|
||||||
|
&& test -s target/nextest/ci/junit.xml || status=$?
|
||||||
|
fi
|
||||||
{
|
{
|
||||||
echo "command=cargo nextest run --profile ci --all --exclude e2e_test"
|
echo "command=cargo nextest run --profile ci --all --exclude e2e_test"
|
||||||
echo "exit_status=${status}"
|
echo "exit_status=${status}"
|
||||||
@@ -345,45 +296,6 @@ jobs:
|
|||||||
- name: Run rebalance/decommission migration proofs
|
- name: Run rebalance/decommission migration proofs
|
||||||
run: ./scripts/check_migration_gate_count.sh
|
run: ./scripts/check_migration_gate_count.sh
|
||||||
|
|
||||||
# Record the reason before this job completes as FAILURE. A separate
|
|
||||||
# dependent job cancels sibling lanes only after GitHub has preserved this
|
|
||||||
# required check's failure verdict.
|
|
||||||
- name: Annotate early-stop reason
|
|
||||||
if: >-
|
|
||||||
failure() && github.event_name == 'pull_request'
|
|
||||||
&& github.event.pull_request.head.repo.full_name == github.repository
|
|
||||||
run: |
|
|
||||||
{
|
|
||||||
echo "## CI early-stop"
|
|
||||||
echo "Job \`${GITHUB_JOB}\` (Test and Lint) failed; a follow-up job will cancel sibling lanes to free runners."
|
|
||||||
echo "Sibling jobs showing **cancelled** were stopped by the early-stop follow-up, not by their own failure."
|
|
||||||
} >> "$GITHUB_STEP_SUMMARY"
|
|
||||||
|
|
||||||
# Preserve the required Test and Lint FAILURE verdict before stopping sibling
|
|
||||||
# lanes. Cancelling from inside test-and-lint changed its own conclusion to
|
|
||||||
# CANCELLED and hid the actionable failure in the PR checks UI.
|
|
||||||
cancel-after-test-and-lint-failure:
|
|
||||||
name: Cancel siblings after Test and Lint failure
|
|
||||||
if: >-
|
|
||||||
failure() && needs.test-and-lint.result == 'failure'
|
|
||||||
&& github.event_name == 'pull_request'
|
|
||||||
&& github.event.pull_request.head.repo.full_name == github.repository
|
|
||||||
needs: [ test-and-lint ]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 5
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
steps:
|
|
||||||
- name: Cancel remaining jobs
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
curl -fsS -X POST \
|
|
||||||
-H "Authorization: Bearer ${GH_TOKEN}" \
|
|
||||||
-H "Accept: application/vnd.github+json" \
|
|
||||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
||||||
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/cancel"
|
|
||||||
|
|
||||||
# Dedicated serial lane for the ILM / lifecycle integration tests. These tests
|
# Dedicated serial lane for the ILM / lifecycle integration tests. These tests
|
||||||
# drive the object layer through process-global singletons (the GLOBAL_ENV
|
# drive the object layer through process-global singletons (the GLOBAL_ENV
|
||||||
# ECStore, the global tier-config manager, background-expiry workers) and bind
|
# ECStore, the global tier-config manager, background-expiry workers) and bind
|
||||||
@@ -396,8 +308,8 @@ jobs:
|
|||||||
# See rustfs/backlog#1148 (ilm-1) and #1155.
|
# See rustfs/backlog#1148 (ilm-1) and #1155.
|
||||||
test-ilm-integration-serial:
|
test-ilm-integration-serial:
|
||||||
name: ILM Integration (serial)
|
name: ILM Integration (serial)
|
||||||
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
if: needs.classify-changes.outputs.mode == 'full' && (github.event_name != 'pull_request' || github.event.action != 'closed')
|
||||||
needs: [ quick-checks ]
|
needs: [ quick-checks, classify-changes ]
|
||||||
runs-on: sm-standard-4
|
runs-on: sm-standard-4
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
env:
|
env:
|
||||||
@@ -464,8 +376,8 @@ jobs:
|
|||||||
|
|
||||||
test-and-lint-rio-v2:
|
test-and-lint-rio-v2:
|
||||||
name: Test and Lint (rio-v2)
|
name: Test and Lint (rio-v2)
|
||||||
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
if: needs.classify-changes.outputs.mode == 'full' && (github.event_name != 'pull_request' || github.event.action != 'closed')
|
||||||
needs: [ quick-checks ]
|
needs: [ quick-checks, classify-changes ]
|
||||||
runs-on: sm-standard-4
|
runs-on: sm-standard-4
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
env:
|
env:
|
||||||
@@ -505,8 +417,8 @@ jobs:
|
|||||||
|
|
||||||
connect-short-credential-boundary:
|
connect-short-credential-boundary:
|
||||||
name: Connect Short Credential Boundary
|
name: Connect Short Credential Boundary
|
||||||
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
if: needs.classify-changes.outputs.mode == 'full' && (github.event_name != 'pull_request' || github.event.action != 'closed')
|
||||||
needs: [ quick-checks ]
|
needs: [ quick-checks, classify-changes ]
|
||||||
runs-on: sm-standard-4
|
runs-on: sm-standard-4
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
env:
|
env:
|
||||||
@@ -563,8 +475,8 @@ jobs:
|
|||||||
|
|
||||||
test-and-lint-protocols:
|
test-and-lint-protocols:
|
||||||
name: "Test and Lint (${{ matrix.features.name }})"
|
name: "Test and Lint (${{ matrix.features.name }})"
|
||||||
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
if: needs.classify-changes.outputs.mode == 'full' && (github.event_name != 'pull_request' || github.event.action != 'closed')
|
||||||
needs: [ quick-checks ]
|
needs: [ quick-checks, classify-changes ]
|
||||||
runs-on: sm-standard-4
|
runs-on: sm-standard-4
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
strategy:
|
strategy:
|
||||||
@@ -617,8 +529,8 @@ jobs:
|
|||||||
|
|
||||||
build-rustfs-debug-binary:
|
build-rustfs-debug-binary:
|
||||||
name: Build RustFS Debug Binary
|
name: Build RustFS Debug Binary
|
||||||
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
if: needs.classify-changes.outputs.mode == 'full' && (github.event_name != 'pull_request' || github.event.action != 'closed')
|
||||||
needs: [ quick-checks ]
|
needs: [ quick-checks, classify-changes ]
|
||||||
runs-on: sm-standard-4
|
runs-on: sm-standard-4
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
env:
|
env:
|
||||||
@@ -638,13 +550,59 @@ jobs:
|
|||||||
install-build-packaging-tools: 'false'
|
install-build-packaging-tools: 'false'
|
||||||
|
|
||||||
- name: Build debug binary
|
- name: Build debug binary
|
||||||
run: cargo build -p rustfs --bins --features e2e-test-hooks
|
run: |
|
||||||
|
python3 - <<'PYBUILD'
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import pathlib
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
def git(*args):
|
||||||
|
return subprocess.check_output(["git", *args], text=True).strip()
|
||||||
|
|
||||||
|
def sha256(path):
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with pathlib.Path(path).open("rb") as source:
|
||||||
|
for chunk in iter(lambda: source.read(1024 * 1024), b""):
|
||||||
|
digest.update(chunk)
|
||||||
|
return digest.hexdigest()
|
||||||
|
|
||||||
|
argv = ["cargo", "build", "-p", "rustfs", "--bins", "--features", "e2e-test-hooks"]
|
||||||
|
commit, tree = git("rev-parse", "HEAD"), git("rev-parse", "HEAD^{tree}")
|
||||||
|
clean_before = not git("status", "--porcelain", "--untracked-files=normal")
|
||||||
|
if not clean_before:
|
||||||
|
raise SystemExit("hooks binary requires a clean build checkout")
|
||||||
|
lock_sha256 = sha256("Cargo.lock")
|
||||||
|
lock_git_blob = git("hash-object", "Cargo.lock")
|
||||||
|
rustc = subprocess.check_output(["rustc", "-vV"], text=True)
|
||||||
|
host = next(line.removeprefix("host: ") for line in rustc.splitlines() if line.startswith("host: "))
|
||||||
|
if os.environ.get("CARGO_BUILD_TARGET") or pathlib.Path(os.environ.get("CARGO_TARGET_DIR", "target")).resolve() != pathlib.Path("target").resolve():
|
||||||
|
raise SystemExit("this artifact requires the native target/debug output")
|
||||||
|
subprocess.run(argv, check=True)
|
||||||
|
clean_after = not git("status", "--porcelain", "--untracked-files=normal")
|
||||||
|
if not clean_after or commit != git("rev-parse", "HEAD") or tree != git("rev-parse", "HEAD^{tree}") or lock_sha256 != sha256("Cargo.lock"):
|
||||||
|
raise SystemExit("hooks binary source changed while building")
|
||||||
|
manifest = {
|
||||||
|
"schema": 1, "commit": commit, "tree": tree,
|
||||||
|
"clean_before": clean_before, "clean_after": clean_after,
|
||||||
|
"lock_sha256": lock_sha256, "lock_git_blob": lock_git_blob,
|
||||||
|
"argv": argv, "profile": "debug", "target": host,
|
||||||
|
"features": ["e2e-test-hooks"],
|
||||||
|
"rustc_verbose": rustc,
|
||||||
|
"build_flags": {key: os.environ[key] for key in ("RUSTFLAGS", "CARGO_ENCODED_RUSTFLAGS", "CARGO_BUILD_TARGET", "CARGO_TARGET_DIR", "RUSTUP_TOOLCHAIN") if key in os.environ},
|
||||||
|
"binary_sha256": sha256("target/debug/rustfs"),
|
||||||
|
}
|
||||||
|
pathlib.Path("target/debug/rustfs.e2e-startup-cas-build.json").write_text(json.dumps(manifest, indent=2) + "\n")
|
||||||
|
PYBUILD
|
||||||
|
|
||||||
- name: Upload debug binary
|
- name: Upload debug binary
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
with:
|
with:
|
||||||
name: rustfs-debug-binary
|
name: rustfs-debug-binary
|
||||||
path: target/debug/rustfs
|
path: |
|
||||||
|
target/debug/rustfs
|
||||||
|
target/debug/rustfs.e2e-startup-cas-build.json
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
@@ -694,8 +652,8 @@ jobs:
|
|||||||
# job had neither, so each closed/merged PR really ran the whole io_uring
|
# job had neither, so each closed/merged PR really ran the whole io_uring
|
||||||
# suite (measured 4m17s / 7m19s / 7m31s on runs 30678272341 / 30678117601 /
|
# suite (measured 4m17s / 7m19s / 7m31s on runs 30678272341 / 30678117601 /
|
||||||
# 30662728539) and kept the cancellation run in progress for minutes.
|
# 30662728539) and kept the cancellation run in progress for minutes.
|
||||||
if: github.event_name != 'pull_request' || github.event.action != 'closed'
|
if: needs.classify-changes.outputs.mode == 'full' && (github.event_name != 'pull_request' || github.event.action != 'closed')
|
||||||
needs: [ quick-checks ]
|
needs: [ quick-checks, classify-changes ]
|
||||||
# GitHub-hosted ubuntu-latest runs a recent kernel with io_uring and, unlike
|
# GitHub-hosted ubuntu-latest runs a recent kernel with io_uring and, unlike
|
||||||
# a container, applies no seccomp filter that would block io_uring_setup — so
|
# a container, applies no seccomp filter that would block io_uring_setup — so
|
||||||
# the probe succeeds and the tests exercise the real UringBackend/FdCache/
|
# the probe succeeds and the tests exercise the real UringBackend/FdCache/
|
||||||
@@ -882,13 +840,14 @@ jobs:
|
|||||||
# Merge gate only (backlog#1149 ci-5): the never-automated user-visible
|
# Merge gate only (backlog#1149 ci-5): the never-automated user-visible
|
||||||
# suites — KMS, object_lock, multipart_auth, quota, checksum, encryption,
|
# suites — KMS, object_lock, multipart_auth, quota, checksum, encryption,
|
||||||
# security-boundary, ... — via the e2e-full nextest profile. Too heavy for
|
# security-boundary, ... — via the e2e-full nextest profile. Too heavy for
|
||||||
# every PR, so it is gated to main pushes, the merge queue, and manual
|
# every PR, so it is gated to main/release pushes, the merge queue, and manual
|
||||||
# dispatch. protocols / the 7 cluster suites / replication / #[ignore] are
|
# dispatch. protocols / the 7 cluster suites / replication / #[ignore] are
|
||||||
# owned by other lanes (see .config/nextest.toml profile.e2e-full).
|
# owned by other lanes (see .config/nextest.toml profile.e2e-full).
|
||||||
if: >-
|
if: >-
|
||||||
github.event_name == 'workflow_dispatch' ||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
github.event_name == 'merge_group' ||
|
github.event_name == 'merge_group' ||
|
||||||
(github.event_name == 'push' && github.ref == 'refs/heads/main')
|
(github.event_name == 'push' &&
|
||||||
|
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release'))
|
||||||
needs: [ build-rustfs-debug-binary ]
|
needs: [ build-rustfs-debug-binary ]
|
||||||
runs-on: sm-standard-2
|
runs-on: sm-standard-2
|
||||||
timeout-minutes: 55
|
timeout-minutes: 55
|
||||||
@@ -906,6 +865,17 @@ jobs:
|
|||||||
cache-save-if: 'false'
|
cache-save-if: 'false'
|
||||||
install-build-packaging-tools: 'false'
|
install-build-packaging-tools: 'false'
|
||||||
|
|
||||||
|
- name: Install network fault-injection tools
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y iptables
|
||||||
|
sudo -n iptables --version
|
||||||
|
# The endpoint-blackhole heal scenario needs CAP_NET_ADMIN. Containerised
|
||||||
|
# runners can run iptables but not touch the rule set; the test then logs
|
||||||
|
# a skip instead of failing, so surface that here where it is visible.
|
||||||
|
if ! sudo -n iptables -w 5 -S OUTPUT >/dev/null 2>&1; then
|
||||||
|
echo "::warning::iptables cannot read the OUTPUT chain on this runner (no CAP_NET_ADMIN); the endpoint-blackhole heal scenario will be skipped"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
||||||
with:
|
with:
|
||||||
@@ -957,6 +927,36 @@ jobs:
|
|||||||
- name: Make binary executable
|
- name: Make binary executable
|
||||||
run: chmod +x ./target/debug/rustfs
|
run: chmod +x ./target/debug/rustfs
|
||||||
|
|
||||||
|
- name: Preserve startup CAS binary input
|
||||||
|
env:
|
||||||
|
STARTUP_CAS_INPUT: ${{ runner.temp }}/rustfs-startup-cas-input
|
||||||
|
run: |
|
||||||
|
python3 - <<'PYINPUT'
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import pathlib
|
||||||
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
source = pathlib.Path("target/debug/rustfs")
|
||||||
|
manifest_path = source.with_name("rustfs.e2e-startup-cas-build.json")
|
||||||
|
manifest = json.loads(manifest_path.read_text())
|
||||||
|
target = pathlib.Path(os.environ["STARTUP_CAS_INPUT"])
|
||||||
|
target.mkdir(parents=True, exist_ok=True)
|
||||||
|
binary = target / "rustfs"
|
||||||
|
shutil.copy2(source, binary)
|
||||||
|
digest = hashlib.sha256()
|
||||||
|
with binary.open("rb") as stream:
|
||||||
|
for chunk in iter(lambda: stream.read(1024 * 1024), b""):
|
||||||
|
digest.update(chunk)
|
||||||
|
commit = subprocess.check_output(["git", "rev-parse", "HEAD"], text=True).strip()
|
||||||
|
if manifest["binary_sha256"] != digest.hexdigest() or manifest["commit"] != commit:
|
||||||
|
raise SystemExit("downloaded hooks binary identity mismatch")
|
||||||
|
shutil.copy2(manifest_path, target / manifest_path.name)
|
||||||
|
binary.chmod(0o755)
|
||||||
|
PYINPUT
|
||||||
|
|
||||||
- name: Verify e2e full membership
|
- name: Verify e2e full membership
|
||||||
env:
|
env:
|
||||||
NEXTEST_LISTING: ${{ runner.temp }}/rustfs-e2e-full-list.json
|
NEXTEST_LISTING: ${{ runner.temp }}/rustfs-e2e-full-list.json
|
||||||
@@ -969,6 +969,10 @@ jobs:
|
|||||||
# extend that filter, never add ad-hoc e2e jobs here. Reuses the downloaded
|
# extend that filter, never add ad-hoc e2e jobs here. Reuses the downloaded
|
||||||
# debug binary; each test spawns its own rustfs server on a random port.
|
# debug binary; each test spawns its own rustfs server on a random port.
|
||||||
- name: Run e2e full suite
|
- name: Run e2e full suite
|
||||||
|
env:
|
||||||
|
RUSTFS_E2E_STARTUP_CAS_BINARY: ${{ runner.temp }}/rustfs-startup-cas-input/rustfs
|
||||||
|
RUSTFS_E2E_STARTUP_CAS_BUILD_MANIFEST: ${{ runner.temp }}/rustfs-startup-cas-input/rustfs.e2e-startup-cas-build.json
|
||||||
|
RUSTFS_E2E_STARTUP_CAS_ARTIFACT_DIR: ${{ runner.temp }}/rustfs-startup-cas-evidence
|
||||||
run: cargo nextest run --profile e2e-full -p e2e_test
|
run: cargo nextest run --profile e2e-full -p e2e_test
|
||||||
|
|
||||||
- name: Upload junit
|
- name: Upload junit
|
||||||
@@ -981,6 +985,17 @@ jobs:
|
|||||||
${{ runner.temp }}/rustfs-e2e-full-list.json
|
${{ runner.temp }}/rustfs-e2e-full-list.json
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
|
- name: Upload startup CAS evidence
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
|
with:
|
||||||
|
name: fresh-startup-cas-evidence-${{ github.run_number }}
|
||||||
|
path: |
|
||||||
|
${{ runner.temp }}/rustfs-startup-cas-evidence
|
||||||
|
${{ runner.temp }}/rustfs-startup-cas-input/rustfs.e2e-startup-cas-build.json
|
||||||
|
if-no-files-found: warn
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
e2e-tests-rio-v2:
|
e2e-tests-rio-v2:
|
||||||
name: End-to-End Tests (rio-v2)
|
name: End-to-End Tests (rio-v2)
|
||||||
# Inherits the schedule/dispatch-only gate through needs: on every other
|
# Inherits the schedule/dispatch-only gate through needs: on every other
|
||||||
@@ -1166,9 +1181,44 @@ jobs:
|
|||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
retention-days: 3
|
retention-days: 3
|
||||||
|
|
||||||
|
required-checks:
|
||||||
|
name: Test and Lint
|
||||||
|
if: always() && (github.event_name != 'pull_request' || github.event.action != 'closed')
|
||||||
|
needs:
|
||||||
|
- classify-changes
|
||||||
|
- typos
|
||||||
|
- quick-checks
|
||||||
|
- test-and-lint
|
||||||
|
- test-ilm-integration-serial
|
||||||
|
- test-and-lint-rio-v2
|
||||||
|
- connect-short-credential-boundary
|
||||||
|
- test-and-lint-protocols
|
||||||
|
- build-rustfs-debug-binary
|
||||||
|
- uring-integration
|
||||||
|
- e2e-tests
|
||||||
|
- s3-implemented-tests
|
||||||
|
- s3-lifecycle-behavior-tests
|
||||||
|
- build-rustfs-debug-binary-rio-v2
|
||||||
|
- e2e-tests-rio-v2
|
||||||
|
- e2e-full
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Require the expected result of every CI lane
|
||||||
|
env:
|
||||||
|
CI_NEEDS: ${{ toJSON(needs) }}
|
||||||
|
shell: bash
|
||||||
|
run: python3 scripts/ci_gate.py verify
|
||||||
|
|
||||||
alert-on-failure:
|
alert-on-failure:
|
||||||
name: Alert on scheduled failure
|
name: Alert on scheduled failure
|
||||||
needs:
|
needs:
|
||||||
|
- classify-changes
|
||||||
|
- connect-short-credential-boundary
|
||||||
|
- required-checks
|
||||||
- typos
|
- typos
|
||||||
- quick-checks
|
- quick-checks
|
||||||
- test-and-lint
|
- test-and-lint
|
||||||
|
|||||||
@@ -121,6 +121,22 @@ jobs:
|
|||||||
create_latest=false
|
create_latest=false
|
||||||
source_ref="$GITHUB_SHA"
|
source_ref="$GITHUB_SHA"
|
||||||
|
|
||||||
|
# Pre-GA policy: until the first stable (vX.Y.Z) tag exists, every
|
||||||
|
# prerelease (alpha/beta/rc) also moves `latest`, so users pulling
|
||||||
|
# `latest` get the newest test build. Once a stable tag is published
|
||||||
|
# this returns false and `latest` follows stable releases only.
|
||||||
|
prerelease_moves_latest() {
|
||||||
|
local stable_tags
|
||||||
|
stable_tags=$(git ls-remote --tags --refs origin 2>/dev/null \
|
||||||
|
| awk '{print $2}' \
|
||||||
|
| grep -E '^refs/tags/v?[0-9]+\.[0-9]+\.[0-9]+$' || true)
|
||||||
|
if [[ -z "$stable_tags" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
echo "ℹ️ Stable release tag(s) already exist; prereleases no longer update latest"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
|
if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
|
||||||
# Triggered by build workflow completion
|
# Triggered by build workflow completion
|
||||||
echo "🔗 Triggered by build workflow completion"
|
echo "🔗 Triggered by build workflow completion"
|
||||||
@@ -184,8 +200,8 @@ jobs:
|
|||||||
if [[ "$version" == *"alpha"* ]] || [[ "$version" == *"beta"* ]] || [[ "$version" == *"rc"* ]]; then
|
if [[ "$version" == *"alpha"* ]] || [[ "$version" == *"beta"* ]] || [[ "$version" == *"rc"* ]]; then
|
||||||
build_type="prerelease"
|
build_type="prerelease"
|
||||||
is_prerelease=true
|
is_prerelease=true
|
||||||
# Current policy: create latest tags for stable releases and selected prereleases (alpha/beta).
|
# Pre-GA policy: prereleases update latest until the first stable tag exists.
|
||||||
if [[ "$version" == *"alpha"* ]] || [[ "$version" == *"beta"* ]]; then
|
if prerelease_moves_latest; then
|
||||||
create_latest=true
|
create_latest=true
|
||||||
echo "🧪 Building Docker image for prerelease: $version (creating latest tag)"
|
echo "🧪 Building Docker image for prerelease: $version (creating latest tag)"
|
||||||
else
|
else
|
||||||
@@ -243,8 +259,8 @@ jobs:
|
|||||||
v*alpha*|v*beta*|v*rc*|*alpha*|*beta*|*rc*)
|
v*alpha*|v*beta*|v*rc*|*alpha*|*beta*|*rc*)
|
||||||
build_type="prerelease"
|
build_type="prerelease"
|
||||||
is_prerelease=true
|
is_prerelease=true
|
||||||
# Current policy: create latest tags for stable releases and selected prereleases (alpha/beta).
|
# Pre-GA policy: prereleases update latest until the first stable tag exists.
|
||||||
if [[ "$version" == *"alpha"* ]] || [[ "$version" == *"beta"* ]]; then
|
if prerelease_moves_latest; then
|
||||||
create_latest=true
|
create_latest=true
|
||||||
echo "🧪 Building with prerelease version: $input_version (creating latest tag)"
|
echo "🧪 Building with prerelease version: $input_version (creating latest tag)"
|
||||||
else
|
else
|
||||||
@@ -394,11 +410,13 @@ jobs:
|
|||||||
TAG_BASE="${VERSION}${VARIANT_SUFFIX}"
|
TAG_BASE="${VERSION}${VARIANT_SUFFIX}"
|
||||||
TAGS="${{ env.REGISTRY_DOCKERHUB }}:$TAG_BASE,${{ env.REGISTRY_GHCR }}:$TAG_BASE,${{ env.REGISTRY_QUAY }}:$TAG_BASE"
|
TAGS="${{ env.REGISTRY_DOCKERHUB }}:$TAG_BASE,${{ env.REGISTRY_GHCR }}:$TAG_BASE,${{ env.REGISTRY_QUAY }}:$TAG_BASE"
|
||||||
|
|
||||||
# Add channel tags for prereleases and latest for stable
|
# Add latest when requested (stable releases, and prereleases before GA)
|
||||||
if [[ "$CREATE_LATEST" == "true" ]]; then
|
if [[ "$CREATE_LATEST" == "true" ]]; then
|
||||||
# Create latest tags for stable releases and selected prereleases when CREATE_LATEST=true.
|
|
||||||
TAGS="$TAGS,${{ env.REGISTRY_DOCKERHUB }}:latest${VARIANT_SUFFIX},${{ env.REGISTRY_GHCR }}:latest${VARIANT_SUFFIX},${{ env.REGISTRY_QUAY }}:latest${VARIANT_SUFFIX}"
|
TAGS="$TAGS,${{ env.REGISTRY_DOCKERHUB }}:latest${VARIANT_SUFFIX},${{ env.REGISTRY_GHCR }}:latest${VARIANT_SUFFIX},${{ env.REGISTRY_QUAY }}:latest${VARIANT_SUFFIX}"
|
||||||
elif [[ "$BUILD_TYPE" == "prerelease" ]]; then
|
fi
|
||||||
|
|
||||||
|
# Always add the channel tag for prereleases, independent of latest
|
||||||
|
if [[ "$BUILD_TYPE" == "prerelease" ]]; then
|
||||||
# Prerelease channel tags (alpha, beta, rc)
|
# Prerelease channel tags (alpha, beta, rc)
|
||||||
if [[ "$VERSION" == *"alpha"* ]]; then
|
if [[ "$VERSION" == *"alpha"* ]]; then
|
||||||
CHANNEL="alpha"
|
CHANNEL="alpha"
|
||||||
@@ -555,7 +573,7 @@ jobs:
|
|||||||
"prerelease")
|
"prerelease")
|
||||||
echo "🧪 Prerelease Docker image has been built with ${VERSION} tags"
|
echo "🧪 Prerelease Docker image has been built with ${VERSION} tags"
|
||||||
echo "⚠️ This is a prerelease image - use with caution"
|
echo "⚠️ This is a prerelease image - use with caution"
|
||||||
# Create latest tags for stable releases and selected prereleases when CREATE_LATEST=true.
|
# Prereleases move latest until the first stable tag exists (pre-GA policy).
|
||||||
if [[ "$CREATE_LATEST" == "true" ]]; then
|
if [[ "$CREATE_LATEST" == "true" ]]; then
|
||||||
echo "🏷️ Latest tag has been created for prerelease: $VERSION"
|
echo "🏷️ Latest tag has been created for prerelease: $VERSION"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -0,0 +1,216 @@
|
|||||||
|
# Copyright 2024 RustFS Team
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
# 4-node 4-disk distributed e2e lane.
|
||||||
|
#
|
||||||
|
# Each selected test starts a real localhost cluster via
|
||||||
|
# `RustFSTestClusterEnvironment` (4 processes; 4 drives per node unless the
|
||||||
|
# case is a two-site 4-node 1-drive pair or a 4-node upgrade). Membership is
|
||||||
|
# `[profile.e2e-distributed]` in `.config/nextest.toml`. Storage-sensitive PRs,
|
||||||
|
# nightly runs, and manual dispatches all execute the same fail-closed suite.
|
||||||
|
# Upgrade cases download the same pinned previous release as e2e-upgrade.yml.
|
||||||
|
#
|
||||||
|
# Isolated pool filesystems: expand/decommission/rebalance cases require
|
||||||
|
# independent `statfs` capacity. This job runs on GitHub-hosted
|
||||||
|
# `ubuntu-latest` because the self-hosted `sm-standard-4` ARC pods cannot
|
||||||
|
# create filesystems: `mount -o loop` fails with ENOENT (no
|
||||||
|
# `/dev/loop-control`), and `mount -t tmpfs` fails with "cannot mount tmpfs
|
||||||
|
# read-only" (no `CAP_SYS_ADMIN` in the initial namespace). The same reason
|
||||||
|
# `uring-integration` and `e2e-s3tests.yml` left that label. The prepare
|
||||||
|
# step mounts four 1 GiB tmpfs instances and exports `RUSTFS_E2E_POOL_ROOTS`.
|
||||||
|
|
||||||
|
name: e2e-distributed
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "Cargo.lock"
|
||||||
|
- "Cargo.toml"
|
||||||
|
- ".config/nextest.toml"
|
||||||
|
- ".github/workflows/e2e-distributed.yml"
|
||||||
|
- "crates/audit/**"
|
||||||
|
- "crates/common/**"
|
||||||
|
- "crates/config/**"
|
||||||
|
- "crates/e2e_test/**"
|
||||||
|
- "crates/ecstore/**"
|
||||||
|
- "crates/filemeta/**"
|
||||||
|
- "crates/heal/**"
|
||||||
|
- "crates/iam/**"
|
||||||
|
- "crates/lock/**"
|
||||||
|
- "crates/madmin/**"
|
||||||
|
- "crates/notify/**"
|
||||||
|
- "crates/replication/**"
|
||||||
|
- "crates/s3-client/**"
|
||||||
|
- "crates/s3-ops/**"
|
||||||
|
- "crates/s3-types/**"
|
||||||
|
- "crates/scanner/**"
|
||||||
|
- "crates/storage-api/**"
|
||||||
|
- "crates/utils/**"
|
||||||
|
- "rustfs/**"
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
filter:
|
||||||
|
description: "Optional nextest -E filter (default: the whole e2e-distributed profile)"
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
schedule:
|
||||||
|
# 05:53 UTC nightly — clear of e2e-nightly (04:29) and ODM interop (05:23).
|
||||||
|
- cron: "53 5 * * *"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ github.event_name != 'schedule' }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
distributed:
|
||||||
|
name: Distributed 4-node 4-disk e2e
|
||||||
|
# GitHub-hosted VM: loop and tmpfs mounts work here. sm-standard-4 is an
|
||||||
|
# ARC pod and rejects both (`mount -o loop` ENOENT, tmpfs "read-only").
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 180
|
||||||
|
env:
|
||||||
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
||||||
|
NO_PROXY: 127.0.0.1,localhost
|
||||||
|
HTTP_PROXY: ""
|
||||||
|
HTTPS_PROXY: ""
|
||||||
|
# Pinned previous release used by distributed::upgrade_test (same pin as e2e-upgrade.yml).
|
||||||
|
UPGRADE_SOURCE_VERSION: 1.0.0-rc.2
|
||||||
|
UPGRADE_SOURCE_ASSET: rustfs-linux-x86_64-gnu-v1.0.0-rc.2.zip
|
||||||
|
UPGRADE_SOURCE_SHA256: 7c789386bf85278f865b8e0d359bf4edb84d5aa408cc3fa54a18c25ca74cd6e7
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Setup Rust environment
|
||||||
|
uses: ./.github/actions/setup
|
||||||
|
with:
|
||||||
|
rust-version: stable
|
||||||
|
# Dedicated key: ubuntu-latest and sm-standard-4 share runner.os, so
|
||||||
|
# a shared key would mix VM and ARC pod target/ artifacts.
|
||||||
|
cache-shared-key: ci-e2e-distributed-hosted
|
||||||
|
cache-save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
install-build-packaging-tools: 'false'
|
||||||
|
|
||||||
|
- name: Prepare isolated filesystems for pool movement
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
mount_base="${RUNNER_TEMP}/rustfs-e2e-pools"
|
||||||
|
mkdir -p "${mount_base}"
|
||||||
|
roots=()
|
||||||
|
for pool in 0 1 2 3; do
|
||||||
|
mountpoint="${mount_base}/pool-${pool}"
|
||||||
|
mkdir -p "${mountpoint}"
|
||||||
|
# Sized tmpfs reports a distinct st_dev and independent 1G
|
||||||
|
# statfs capacity. Requires a VM runner (ubuntu-latest).
|
||||||
|
if ! sudo mount -t tmpfs -o size=1G,nosuid,nodev,mode=1777 tmpfs "${mountpoint}"; then
|
||||||
|
echo "tmpfs mount failed on $(uname -a)" >&2
|
||||||
|
findmnt || true
|
||||||
|
grep Cap /proc/self/status || true
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sudo chmod 1777 "${mountpoint}"
|
||||||
|
roots+=("${mountpoint}")
|
||||||
|
done
|
||||||
|
printf -v joined_roots '%s:' "${roots[@]}"
|
||||||
|
echo "RUSTFS_E2E_POOL_ROOTS=${joined_roots%:}" >> "${GITHUB_ENV}"
|
||||||
|
findmnt --noheadings --output TARGET,SOURCE,FSTYPE,SIZE --target "${roots[0]}"
|
||||||
|
findmnt --noheadings --output TARGET,SOURCE,FSTYPE,SIZE --target "${roots[1]}"
|
||||||
|
findmnt --noheadings --output TARGET,SOURCE,FSTYPE,SIZE --target "${roots[2]}"
|
||||||
|
findmnt --noheadings --output TARGET,SOURCE,FSTYPE,SIZE --target "${roots[3]}"
|
||||||
|
|
||||||
|
- name: Download pinned previous release
|
||||||
|
env:
|
||||||
|
SOURCE_DIR: ${{ runner.temp }}/rustfs-upgrade-source
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
mkdir -p "$SOURCE_DIR"
|
||||||
|
archive="$SOURCE_DIR/$UPGRADE_SOURCE_ASSET"
|
||||||
|
curl --fail --location --retry 3 --output "$archive" \
|
||||||
|
"https://github.com/${GITHUB_REPOSITORY}/releases/download/${UPGRADE_SOURCE_VERSION}/${UPGRADE_SOURCE_ASSET}"
|
||||||
|
echo "$UPGRADE_SOURCE_SHA256 $archive" | sha256sum --check --strict
|
||||||
|
unzip -q "$archive" -d "$SOURCE_DIR"
|
||||||
|
chmod +x "$SOURCE_DIR/rustfs"
|
||||||
|
test -x "$SOURCE_DIR/rustfs"
|
||||||
|
echo "RUSTFS_UPGRADE_SOURCE_BINARY=$SOURCE_DIR/rustfs" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Build rustfs binary
|
||||||
|
run: |
|
||||||
|
cargo build -p rustfs --bins
|
||||||
|
: > target/debug/rustfs.features
|
||||||
|
|
||||||
|
- name: Verify distributed e2e membership
|
||||||
|
env:
|
||||||
|
NEXTEST_LISTING: ${{ runner.temp }}/rustfs-e2e-distributed-list.json
|
||||||
|
run: |
|
||||||
|
cargo nextest list --profile e2e-distributed -p e2e_test --message-format json > "${NEXTEST_LISTING}"
|
||||||
|
python3 ./scripts/check_test_wiring.py --check-profile e2e-distributed "${NEXTEST_LISTING}"
|
||||||
|
|
||||||
|
- name: Run distributed 4-node e2e suite
|
||||||
|
env:
|
||||||
|
RUSTFS_E2E_LOG_DIR: ${{ runner.temp }}/rustfs-e2e-distributed-logs
|
||||||
|
FILTER: ${{ inputs.filter }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
if [ -n "${FILTER}" ]; then
|
||||||
|
cargo nextest run --profile e2e-distributed -p e2e_test -E "${FILTER}"
|
||||||
|
else
|
||||||
|
cargo nextest run --profile e2e-distributed -p e2e_test --no-tests=fail
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload distributed e2e diagnostics
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
|
with:
|
||||||
|
name: e2e-distributed-${{ github.run_number }}
|
||||||
|
path: |
|
||||||
|
target/nextest/e2e-distributed/junit.xml
|
||||||
|
${{ runner.temp }}/rustfs-e2e-distributed-list.json
|
||||||
|
${{ runner.temp }}/rustfs-e2e-distributed-logs/
|
||||||
|
retention-days: 7
|
||||||
|
if-no-files-found: warn
|
||||||
|
|
||||||
|
- name: Unmount isolated pool filesystems
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
mount_base="${RUNNER_TEMP}/rustfs-e2e-pools"
|
||||||
|
for pool in 0 1 2 3; do
|
||||||
|
mountpoint="${mount_base}/pool-${pool}"
|
||||||
|
if mountpoint --quiet "${mountpoint}"; then
|
||||||
|
sudo umount "${mountpoint}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
alert-on-failure:
|
||||||
|
name: Alert on scheduled failure
|
||||||
|
needs: [distributed]
|
||||||
|
if: always() && github.event_name == 'schedule' && contains(needs.*.result, 'failure')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Open or update failure-tracking issue
|
||||||
|
uses: ./.github/actions/schedule-failure-issue
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -19,7 +19,9 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- ".github/workflows/e2e-upgrade.yml"
|
- ".github/workflows/e2e-upgrade.yml"
|
||||||
- "crates/e2e_test/src/common.rs"
|
- "crates/e2e_test/src/common.rs"
|
||||||
|
- "crates/e2e_test/src/fake_s3_target/**"
|
||||||
- "crates/e2e_test/src/lib.rs"
|
- "crates/e2e_test/src/lib.rs"
|
||||||
|
- "crates/e2e_test/src/replication_extension_test.rs"
|
||||||
- "crates/e2e_test/src/upgrade_compatibility_test.rs"
|
- "crates/e2e_test/src/upgrade_compatibility_test.rs"
|
||||||
- "crates/ecstore/**"
|
- "crates/ecstore/**"
|
||||||
- "crates/filemeta/**"
|
- "crates/filemeta/**"
|
||||||
@@ -44,9 +46,9 @@ concurrency:
|
|||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
UPGRADE_SOURCE_VERSION: 1.0.0-rc.2
|
UPGRADE_SOURCE_VERSION: 1.0.0-rc.5
|
||||||
UPGRADE_SOURCE_ASSET: rustfs-linux-x86_64-gnu-v1.0.0-rc.2.zip
|
UPGRADE_SOURCE_ASSET: rustfs-linux-x86_64-gnu-v1.0.0-rc.5.zip
|
||||||
UPGRADE_SOURCE_SHA256: 7c789386bf85278f865b8e0d359bf4edb84d5aa408cc3fa54a18c25ca74cd6e7
|
UPGRADE_SOURCE_SHA256: 3ee8df71e8edcfada533be452c4135868f697bc515460ae97b027313eade7a3d
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
upgrade:
|
upgrade:
|
||||||
@@ -55,14 +57,39 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: Direct upgrade from rc.2
|
# The two `_from_rc2_` tests keep their names: they assert
|
||||||
|
# release-independent object contracts and pass unchanged against the
|
||||||
|
# newer pinned source, so renaming them would only churn history and
|
||||||
|
# the CI required-check names. UPGRADE_SOURCE_VERSION above is the
|
||||||
|
# single source of truth for which release they actually run against.
|
||||||
|
- name: Direct upgrade from the previous release
|
||||||
cache_key: e2e-direct-upgrade
|
cache_key: e2e-direct-upgrade
|
||||||
test: direct_upgrade_from_rc2_preserves_object_contracts
|
test: direct_upgrade_from_rc2_preserves_object_contracts
|
||||||
artifact: direct-upgrade
|
artifact: direct-upgrade
|
||||||
- name: Mixed-version rolling upgrade from rc.2
|
- name: Mixed-version rolling upgrade from the previous release
|
||||||
cache_key: e2e-mixed-version-upgrade
|
cache_key: e2e-mixed-version-upgrade
|
||||||
test: rolling_upgrade_from_rc2_preserves_mixed_version_contracts
|
test: rolling_upgrade_from_rc2_preserves_mixed_version_contracts
|
||||||
artifact: mixed-version-upgrade
|
artifact: mixed-version-upgrade
|
||||||
|
- name: Bucket configuration survives the upgrade
|
||||||
|
cache_key: e2e-bucket-config-upgrade
|
||||||
|
test: direct_upgrade_from_previous_release_preserves_bucket_configuration
|
||||||
|
artifact: bucket-config-upgrade
|
||||||
|
- name: Rollback reads current bucket metadata
|
||||||
|
cache_key: e2e-bucket-config-rollback
|
||||||
|
test: rollback_to_previous_release_reads_current_bucket_metadata
|
||||||
|
artifact: bucket-config-rollback
|
||||||
|
- name: ODM configuration recovery after rc.5 rollback
|
||||||
|
cache_key: e2e-odm-config-rollback
|
||||||
|
test: rc5_rollback_requires_restoring_odm_configuration
|
||||||
|
artifact: odm-config-rollback
|
||||||
|
- name: Multipart layouts survive the rc.5 upgrade
|
||||||
|
cache_key: e2e-multipart-layout-upgrade
|
||||||
|
test: direct_upgrade_from_rc5_preserves_multipart_layouts
|
||||||
|
artifact: multipart-layout-upgrade
|
||||||
|
- name: rc.5 multipart replication baseline
|
||||||
|
cache_key: e2e-multipart-layout-baseline
|
||||||
|
test: rc5_baseline_replicates_multipart_layouts
|
||||||
|
artifact: multipart-layout-baseline
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
env:
|
env:
|
||||||
@@ -102,11 +129,22 @@ jobs:
|
|||||||
: > target/debug/rustfs.features
|
: > target/debug/rustfs.features
|
||||||
|
|
||||||
- name: Run upgrade compatibility test
|
- name: Run upgrade compatibility test
|
||||||
|
env:
|
||||||
|
RUSTFS_SCANNER_HEAL_G09_EVIDENCE_DIR: ${{ runner.temp }}/rustfs-upgrade-g09-evidence/${{ matrix.artifact }}
|
||||||
run: |
|
run: |
|
||||||
cargo test --locked -p e2e_test \
|
cargo test --locked -p e2e_test \
|
||||||
"upgrade_compatibility_test::${{ matrix.test }}" \
|
"upgrade_compatibility_test::${{ matrix.test }}" \
|
||||||
-- --ignored --exact --nocapture
|
-- --ignored --exact --nocapture
|
||||||
|
|
||||||
|
- name: Upload scanner/heal G09 evidence
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.artifact }}-g09-evidence-${{ github.run_number }}
|
||||||
|
path: ${{ runner.temp }}/rustfs-upgrade-g09-evidence/${{ matrix.artifact }}
|
||||||
|
if-no-files-found: ignore
|
||||||
|
retention-days: 14
|
||||||
|
|
||||||
- name: Upload server logs
|
- name: Upload server logs
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
|
|||||||
@@ -19,17 +19,27 @@ on:
|
|||||||
- cron: "7 0 * * *"
|
- cron: "7 0 * * *"
|
||||||
timezone: "Asia/Shanghai"
|
timezone: "Asia/Shanghai"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
branch:
|
||||||
|
description: 'Branch/ref to build and publish as the nightly (empty = scheduled source, see NIGHTLY_BUILD_REF)'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
# Scheduled builds follow the NIGHTLY_BRANCH repo variable so the channel can
|
||||||
|
# be pointed at e.g. `release` for the GA cycle and back to `main` afterwards
|
||||||
|
# without touching this file. Manual runs take the `branch` input, falling
|
||||||
|
# back to the branch the run was dispatched from.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: nightly-gnu-build-main-${{ github.event_name }}
|
group: nightly-gnu-build-${{ github.event_name }}-${{ github.event_name == 'schedule' && (vars.NIGHTLY_BRANCH || 'main') || (inputs.branch || github.ref_name) }}
|
||||||
cancel-in-progress: ${{ github.event_name == 'workflow_dispatch' }}
|
cancel-in-progress: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
|
NIGHTLY_BUILD_REF: ${{ github.event_name == 'schedule' && (vars.NIGHTLY_BRANCH || 'main') || (inputs.branch || github.ref_name) }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -43,6 +53,7 @@ jobs:
|
|||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
ref: ${{ env.NIGHTLY_BUILD_REF }}
|
||||||
|
|
||||||
- name: Setup Rust environment
|
- name: Setup Rust environment
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
@@ -152,13 +163,104 @@ jobs:
|
|||||||
|
|
||||||
fakeroot dpkg-deb --build "${PKG_DIR}"
|
fakeroot dpkg-deb --build "${PKG_DIR}"
|
||||||
ls -lh "${DEB_FILE}"
|
ls -lh "${DEB_FILE}"
|
||||||
|
echo "deb_date=${DEB_DATE}" >> "${GITHUB_OUTPUT}"
|
||||||
echo "deb_file=${DEB_FILE}" >> "${GITHUB_OUTPUT}"
|
echo "deb_file=${DEB_FILE}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
|
# Same packaging scheme as .github/workflows/package.yml (fpm), but from
|
||||||
|
# the locally built nightly binary instead of a release artifact, with a
|
||||||
|
# date-based version that mirrors the DEB.
|
||||||
|
- name: Build RPM package
|
||||||
|
id: rpm
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
DEB_DATE: ${{ steps.deb.outputs.deb_date }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
if ! command -v fpm >/dev/null 2>&1; then
|
||||||
|
SUDO=""; [ "$(id -u)" -ne 0 ] && SUDO="sudo -n"
|
||||||
|
${SUDO} apt-get update -qq && ${SUDO} apt-get install -y -qq ruby ruby-dev build-essential rpm >/dev/null
|
||||||
|
${SUDO} gem install fpm --no-document >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
RPM_FILE="rustfs-nightly-${DEB_DATE}.rpm"
|
||||||
|
RPM_VERSION="0"
|
||||||
|
RPM_RELEASE="0.nightly.${DEB_DATE//-/.}"
|
||||||
|
|
||||||
|
echo "Building RPM: ${RPM_FILE} (version ${RPM_VERSION}-${RPM_RELEASE})"
|
||||||
|
|
||||||
|
# fpm wants the config file to exist before packaging.
|
||||||
|
mkdir -p ./tmp-pkg/etc/default
|
||||||
|
cat > ./tmp-pkg/etc/default/rustfs << 'ENVEOF'
|
||||||
|
# RustFS Environment Configuration
|
||||||
|
# See https://rustfs.com/docs/ for more information
|
||||||
|
# RUSTFS_VOLUMES=""
|
||||||
|
# RUSTFS_ROOT_USER=""
|
||||||
|
# RUSTFS_ROOT_PASSWORD=""
|
||||||
|
ENVEOF
|
||||||
|
|
||||||
|
fpm -s dir -t rpm \
|
||||||
|
--name rustfs \
|
||||||
|
--version "$RPM_VERSION" \
|
||||||
|
--iteration "$RPM_RELEASE" \
|
||||||
|
--architecture x86_64 \
|
||||||
|
--package "$RPM_FILE" \
|
||||||
|
--depends "glibc >= 2.31" \
|
||||||
|
--maintainer "RustFS Team <support@rustfs.com>" \
|
||||||
|
--description "High-performance distributed object storage" \
|
||||||
|
--url "https://rustfs.com" \
|
||||||
|
--license "Apache-2.0" \
|
||||||
|
--after-install <(cat << 'POSTINST'
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
if ! getent passwd rustfs > /dev/null 2>&1; then
|
||||||
|
useradd -r -s /bin/false -d /opt/rustfs rustfs
|
||||||
|
fi
|
||||||
|
mkdir -p /opt/rustfs /data/rustfs /var/log/rustfs
|
||||||
|
chown rustfs:rustfs /opt/rustfs /data/rustfs /var/log/rustfs
|
||||||
|
if [ -d /run/systemd/system ]; then
|
||||||
|
systemctl daemon-reload
|
||||||
|
fi
|
||||||
|
POSTINST
|
||||||
|
) \
|
||||||
|
--before-remove <(cat << 'PRERM'
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
if [ -d /run/systemd/system ] && systemctl is-active --quiet rustfs; then
|
||||||
|
systemctl stop rustfs
|
||||||
|
fi
|
||||||
|
PRERM
|
||||||
|
) \
|
||||||
|
--after-remove <(cat << 'POSTRM'
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
if [ -d /run/systemd/system ]; then
|
||||||
|
systemctl daemon-reload
|
||||||
|
fi
|
||||||
|
POSTRM
|
||||||
|
) \
|
||||||
|
--config-files /etc/default/rustfs \
|
||||||
|
"rustfs-nightly-${DEB_DATE}/usr/bin/rustfs=/usr/bin/rustfs" \
|
||||||
|
./tmp-pkg/etc/default/rustfs=/etc/default/rustfs \
|
||||||
|
deploy/build/rustfs.service=/lib/systemd/system/rustfs.service \
|
||||||
|
LICENSE=/usr/share/doc/rustfs/LICENSE \
|
||||||
|
README.md=/usr/share/doc/rustfs/README.md
|
||||||
|
|
||||||
|
[[ -f "$RPM_FILE" ]] || { echo "RPM build failed"; exit 1; }
|
||||||
|
rpm -qpl "$RPM_FILE" | grep -Fx '/usr/bin/rustfs' >/dev/null
|
||||||
|
stat --printf='%n %s bytes\n' "$RPM_FILE"
|
||||||
|
echo "rpm_file=$RPM_FILE" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Upload DEB artifact
|
- name: Upload DEB artifact
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.deb.outputs.deb_file }}
|
name: ${{ steps.deb.outputs.deb_file }}
|
||||||
path: ${{ steps.deb.outputs.deb_file }}
|
path: ${{ steps.deb.outputs.deb_file }}
|
||||||
|
- name: Upload RPM artifact
|
||||||
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
|
with:
|
||||||
|
name: ${{ steps.rpm.outputs.rpm_file }}
|
||||||
|
path: ${{ steps.rpm.outputs.rpm_file }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
# Persist the nightly deb on Cloudflare R2 (same channel as package.yml)
|
# Persist the nightly deb on Cloudflare R2 (same channel as package.yml)
|
||||||
@@ -166,8 +268,9 @@ jobs:
|
|||||||
# e.g. https://dl.rustfs.com/artifacts/rustfs/packages/nightly/... .
|
# e.g. https://dl.rustfs.com/artifacts/rustfs/packages/nightly/... .
|
||||||
# Skipped when the R2 secrets are not configured (artifact-only mode).
|
# Skipped when the R2 secrets are not configured (artifact-only mode).
|
||||||
- name: Upload DEB to Cloudflare R2
|
- name: Upload DEB to Cloudflare R2
|
||||||
if: env.R2_ACCESS_KEY_ID != ''
|
id: publish
|
||||||
env:
|
env:
|
||||||
|
DEB_FILE: ${{ steps.deb.outputs.deb_file }}
|
||||||
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
|
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||||
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||||
R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }}
|
R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }}
|
||||||
@@ -182,28 +285,83 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v aws >/dev/null 2>&1; then
|
|
||||||
sudo apt-get update && sudo apt-get install -y -qq awscli
|
|
||||||
fi
|
|
||||||
|
|
||||||
export AWS_ACCESS_KEY_ID="$R2_ACCESS_KEY_ID"
|
export AWS_ACCESS_KEY_ID="$R2_ACCESS_KEY_ID"
|
||||||
export AWS_SECRET_ACCESS_KEY="$R2_SECRET_ACCESS_KEY"
|
export AWS_SECRET_ACCESS_KEY="$R2_SECRET_ACCESS_KEY"
|
||||||
export AWS_DEFAULT_REGION="auto"
|
export AWS_DEFAULT_REGION="auto"
|
||||||
|
|
||||||
DEB_FILE="${{ steps.deb.outputs.deb_file }}"
|
# The candidate manifest must describe the tree that was actually
|
||||||
|
# built. With a ref override (NIGHTLY_BRANCH / dispatch input) that
|
||||||
|
# is not necessarily GITHUB_SHA, so always advertise HEAD.
|
||||||
|
SOURCE_SHA="$(git rev-parse HEAD)"
|
||||||
|
DEB_SHA256="$(sha256sum "${DEB_FILE}" | cut -d ' ' -f 1)"
|
||||||
|
CANDIDATE_KEY="artifacts/rustfs/packages/nightly/runs/${GITHUB_RUN_ID}/${GITHUB_RUN_ATTEMPT}/${DEB_SHA256}/rustfs.deb"
|
||||||
|
CANDIDATE_URL="https://dl.rustfs.com/${CANDIDATE_KEY}"
|
||||||
|
|
||||||
|
# Old AWS CLI models lack conditional PutObject support. Never fall
|
||||||
|
# back to an overwriting upload for a candidate.
|
||||||
|
AWS_CLI=aws
|
||||||
|
if ! "${AWS_CLI}" s3api put-object --generate-cli-skeleton input | jq -e 'has("IfNoneMatch")' >/dev/null; then
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y -qq python3-venv
|
||||||
|
AWS_CLI_DIR="$(mktemp -d "${RUNNER_TEMP}/nightly-awscli.XXXXXX")"
|
||||||
|
trap 'rm -rf "${AWS_CLI_DIR}"' EXIT
|
||||||
|
python3 -m venv "${AWS_CLI_DIR}"
|
||||||
|
"${AWS_CLI_DIR}/bin/python" -m pip install --disable-pip-version-check 'awscli==1.44.79'
|
||||||
|
AWS_CLI="${AWS_CLI_DIR}/bin/aws"
|
||||||
|
fi
|
||||||
|
"${AWS_CLI}" s3api put-object --generate-cli-skeleton input | jq -e 'has("IfNoneMatch")' >/dev/null
|
||||||
|
"${AWS_CLI}" --version
|
||||||
|
"${AWS_CLI}" s3api put-object --bucket "${R2_BUCKET}" --key "${CANDIDATE_KEY}" \
|
||||||
|
--body "${DEB_FILE}" --if-none-match '*' --endpoint-url "${R2_ENDPOINT}"
|
||||||
|
PUBLISHED_SHA256="$(curl -fsSL --retry 3 --connect-timeout 15 --max-time 300 "${CANDIDATE_URL}" | sha256sum | cut -d ' ' -f 1)"
|
||||||
|
if [[ "${PUBLISHED_SHA256}" != "${DEB_SHA256}" ]]; then
|
||||||
|
echo "Published candidate checksum does not match the built package" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
R2_PREFIX="s3://${R2_BUCKET}/artifacts/rustfs/packages/nightly/"
|
R2_PREFIX="s3://${R2_BUCKET}/artifacts/rustfs/packages/nightly/"
|
||||||
|
|
||||||
echo "📤 Uploading ${DEB_FILE} to ${R2_PREFIX}"
|
echo "📤 Uploading ${DEB_FILE} to ${R2_PREFIX}"
|
||||||
aws s3 cp "${DEB_FILE}" "${R2_PREFIX}" --endpoint-url "$R2_ENDPOINT" --only-show-errors
|
"${AWS_CLI}" s3 cp "${DEB_FILE}" "${R2_PREFIX}" --endpoint-url "$R2_ENDPOINT" --only-show-errors
|
||||||
|
|
||||||
# Stable "latest" alias so tests can fetch the newest nightly
|
# Stable "latest" alias so tests can fetch the newest nightly
|
||||||
# without knowing today's date.
|
# without knowing today's date.
|
||||||
echo "📤 Uploading latest alias"
|
echo "📤 Uploading latest alias"
|
||||||
aws s3 cp "${DEB_FILE}" "${R2_PREFIX}rustfs-nightly-latest.deb" \
|
"${AWS_CLI}" s3 cp "${DEB_FILE}" "${R2_PREFIX}rustfs-nightly-latest.deb" \
|
||||||
--endpoint-url "$R2_ENDPOINT" --only-show-errors
|
--endpoint-url "$R2_ENDPOINT" --only-show-errors
|
||||||
|
|
||||||
echo "✅ R2 upload complete"
|
echo "✅ R2 upload complete"
|
||||||
|
|
||||||
|
CANDIDATE_FILE="${RUNNER_TEMP}/nightly-candidate-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}.json"
|
||||||
|
jq -n --arg source_sha "${SOURCE_SHA}" \
|
||||||
|
--argjson build_run_id "${GITHUB_RUN_ID}" --argjson build_run_attempt "${GITHUB_RUN_ATTEMPT}" \
|
||||||
|
--arg package_url "${CANDIDATE_URL}" --arg package_sha256 "${DEB_SHA256}" \
|
||||||
|
'{schema: 1, source_sha: $source_sha, build_run_id: $build_run_id, build_run_attempt: $build_run_attempt, package_url: $package_url, package_sha256: $package_sha256}' \
|
||||||
|
> "${CANDIDATE_FILE}"
|
||||||
|
echo "candidate_file=${CANDIDATE_FILE}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
|
- name: Upload nightly candidate manifest
|
||||||
|
if: ${{ steps.publish.outputs.candidate_file != '' }}
|
||||||
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
|
with:
|
||||||
|
name: nightly-candidate-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
path: ${{ steps.publish.outputs.candidate_file }}
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
# Publish the deb/rpm pair to the auto-testing repo's `assets` branch so
|
||||||
|
# engineers can download and install the nightly directly. The branch is
|
||||||
|
# a single-commit orphan rewritten on every build, which keeps the repo
|
||||||
|
# small while the latest files stay reachable at stable raw URLs.
|
||||||
|
# Publish the deb/rpm pair as assets of the rolling `nightly` release on
|
||||||
|
# rustfs/auto-testing (see scripts/release/publish_nightly_assets.sh).
|
||||||
|
- name: Publish packages to auto-testing release assets
|
||||||
|
env:
|
||||||
|
ASSETS_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
DEB_FILE: ${{ steps.deb.outputs.deb_file }}
|
||||||
|
RPM_FILE: ${{ steps.rpm.outputs.rpm_file }}
|
||||||
|
DEB_DATE: ${{ steps.deb.outputs.deb_date }}
|
||||||
|
BUILD_REF: ${{ env.NIGHTLY_BUILD_REF }}
|
||||||
|
run: bash scripts/release/publish_nightly_assets.sh
|
||||||
# Live-Vault lane for the rustfs-kms suite (rustfs/backlog#1774).
|
# Live-Vault lane for the rustfs-kms suite (rustfs/backlog#1774).
|
||||||
#
|
#
|
||||||
# RUSTFS_KMS_VAULT_TOKEN is the single switch that adds the Vault KV2 and
|
# RUSTFS_KMS_VAULT_TOKEN is the single switch that adds the Vault KV2 and
|
||||||
@@ -241,6 +399,7 @@ jobs:
|
|||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
ref: ${{ env.NIGHTLY_BUILD_REF }}
|
||||||
|
|
||||||
- name: Setup Rust environment
|
- name: Setup Rust environment
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
@@ -329,6 +488,7 @@ jobs:
|
|||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
ref: ${{ env.NIGHTLY_BUILD_REF }}
|
||||||
|
|
||||||
- name: Setup Rust environment
|
- name: Setup Rust environment
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
|
|||||||
@@ -0,0 +1,315 @@
|
|||||||
|
# Copyright 2024 RustFS Team
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
# On-demand migration provider interop (rustfs/backlog#2167, ODM-20).
|
||||||
|
#
|
||||||
|
# The in-process fake source that the merge-gate ODM suite runs against covers
|
||||||
|
# the protocol semantics, but real implementations differ in path-style vs
|
||||||
|
# virtual-host addressing, region handling, ETag shape, list pagination and
|
||||||
|
# rate limiting. This lane runs the same case bodies
|
||||||
|
# (crates/e2e_test/src/on_demand_migration/interop_test.rs) against real
|
||||||
|
# sources; the source is injected through RUSTFS_ODM_INTEROP_* environment
|
||||||
|
# variables, so nothing about the cases is duplicated per provider.
|
||||||
|
#
|
||||||
|
# Report-only and scheduled. It is never a required check and must not be
|
||||||
|
# promoted to one: it depends on third-party endpoints and on repository
|
||||||
|
# secrets that a fork does not have.
|
||||||
|
#
|
||||||
|
# Jobs:
|
||||||
|
# * minio-source runs the whole e2e-odm-interop profile — read-through,
|
||||||
|
# HEAD passthrough, merged list pagination and a backfill — against a
|
||||||
|
# pinned MinIO container. The backfill is sized at 5,000 objects here: the
|
||||||
|
# fake source retains at most 4,096 object versions and 4,096 journal
|
||||||
|
# entries, so the merge-gate backfill coverage cannot go past that, and a
|
||||||
|
# real source is where a production-shaped batch belongs.
|
||||||
|
# * cloud-source runs the three-case minimum (GET miss, HEAD miss, merged
|
||||||
|
# list pagination) against AWS S3, Cloudflare R2 and the GCS XML
|
||||||
|
# interoperability API. Each provider is skipped with a summary note when
|
||||||
|
# its ODM_INTEROP_* repository secrets are absent, which is the normal
|
||||||
|
# state on a fork and in any clone of this repository.
|
||||||
|
#
|
||||||
|
# Every job uploads one JSON report per provider naming the cases, their
|
||||||
|
# timings and the source request accounting.
|
||||||
|
name: on-demand-migration-interop
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
# Nightly at 05:23 UTC, offset from the other nightly lanes.
|
||||||
|
- cron: "23 5 * * *"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
RUST_BACKTRACE: 1
|
||||||
|
# The three cases a cloud provider is asked for. Named individually rather
|
||||||
|
# than by module so adding a fourth case does not silently start billing a
|
||||||
|
# cloud account for it.
|
||||||
|
CLOUD_CASE_FILTER: >-
|
||||||
|
package(e2e_test) & test(/^on_demand_migration::interop_test::(interop_get_miss_pulls_from_the_source_and_serves_locally|interop_head_miss_answers_from_the_source_without_persisting|interop_list_through_pages_the_source_namespace)$/)
|
||||||
|
CLOUD_CASE_COUNT: "3"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
minio-source:
|
||||||
|
name: MinIO source (read-through, list-through, backfill)
|
||||||
|
# Skip on forks: needs this repository's runners and is not a contributor
|
||||||
|
# gate.
|
||||||
|
if: github.repository == 'rustfs/rustfs'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 90
|
||||||
|
env:
|
||||||
|
NO_PROXY: 127.0.0.1,localhost
|
||||||
|
# Fixed credentials of the container this job starts and throws away;
|
||||||
|
# not a secret and deliberately not read from one, so the lane runs
|
||||||
|
# unattended in any clone that enables it.
|
||||||
|
MINIO_ROOT_USER: rustfsodminterop
|
||||||
|
MINIO_ROOT_PASSWORD: rustfsodminteropsecret
|
||||||
|
RUSTFS_ODM_INTEROP_PROVIDER: minio
|
||||||
|
RUSTFS_ODM_INTEROP_ENDPOINT: http://127.0.0.1:9100
|
||||||
|
RUSTFS_ODM_INTEROP_REGION: auto
|
||||||
|
RUSTFS_ODM_INTEROP_BUCKET: odm-interop-source
|
||||||
|
RUSTFS_ODM_INTEROP_PATH_STYLE: path
|
||||||
|
RUSTFS_ODM_INTEROP_ACCESS_KEY: rustfsodminterop
|
||||||
|
RUSTFS_ODM_INTEROP_SECRET_KEY: rustfsodminteropsecret
|
||||||
|
RUSTFS_ODM_INTEROP_BACKFILL_OBJECTS: "5000"
|
||||||
|
RUSTFS_ODM_INTEROP_REPORT_DIR: ${{ github.workspace }}/artifacts/odm-interop/minio/cases
|
||||||
|
NEXTEST_LISTING: ${{ github.workspace }}/artifacts/odm-interop/minio/selection.json
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Setup Rust environment
|
||||||
|
uses: ./.github/actions/setup
|
||||||
|
with:
|
||||||
|
cache-shared-key: ci-odm-interop
|
||||||
|
cache-save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
install-build-packaging-tools: 'false'
|
||||||
|
|
||||||
|
- name: Start MinIO source
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
mkdir -p artifacts/odm-interop/minio
|
||||||
|
docker run -d --name rustfs-odm-interop-minio \
|
||||||
|
-e "MINIO_ROOT_USER=${MINIO_ROOT_USER}" \
|
||||||
|
-e "MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}" \
|
||||||
|
-p 9100:9000 \
|
||||||
|
minio/minio:RELEASE.2025-09-07T16-13-09Z server /data
|
||||||
|
for _ in $(seq 1 120); do
|
||||||
|
curl -fsS http://127.0.0.1:9100/minio/health/live >/dev/null 2>&1 && break
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
curl -fsS http://127.0.0.1:9100/minio/health/live
|
||||||
|
|
||||||
|
# The harness never creates a bucket, so that pointing it at a cloud
|
||||||
|
# account cannot create one there either. The source bucket for the
|
||||||
|
# container is created here instead.
|
||||||
|
- name: Create the MinIO source bucket
|
||||||
|
env:
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ env.MINIO_ROOT_USER }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ env.MINIO_ROOT_PASSWORD }}
|
||||||
|
AWS_DEFAULT_REGION: us-east-1
|
||||||
|
run: |
|
||||||
|
aws --endpoint-url "${RUSTFS_ODM_INTEROP_ENDPOINT}" \
|
||||||
|
s3api create-bucket --bucket "${RUSTFS_ODM_INTEROP_BUCKET}"
|
||||||
|
|
||||||
|
- name: Build the RustFS binary under test
|
||||||
|
run: cargo build --locked -p rustfs --bins
|
||||||
|
|
||||||
|
# The lane selects tests by module, so a rename would quietly shrink it.
|
||||||
|
# The committed digest in .config/e2e-odm-interop-selection.txt fails
|
||||||
|
# closed on that.
|
||||||
|
- name: Verify interop lane membership
|
||||||
|
run: |
|
||||||
|
cargo nextest list --profile e2e-odm-interop -p e2e_test --message-format json > "${NEXTEST_LISTING}"
|
||||||
|
python3 ./scripts/check_test_wiring.py --check-profile e2e-odm-interop "${NEXTEST_LISTING}"
|
||||||
|
|
||||||
|
- name: Run the interop cases against MinIO
|
||||||
|
run: cargo nextest run --profile e2e-odm-interop -p e2e_test --no-tests=fail
|
||||||
|
|
||||||
|
- name: Build the MinIO interop report
|
||||||
|
if: always()
|
||||||
|
uses: ./.github/actions/odm-interop-report
|
||||||
|
with:
|
||||||
|
provider: minio
|
||||||
|
cases-dir: ${{ env.RUSTFS_ODM_INTEROP_REPORT_DIR }}
|
||||||
|
junit: target/nextest/e2e-odm-interop/junit.xml
|
||||||
|
output: artifacts/odm-interop/minio/report.json
|
||||||
|
|
||||||
|
- name: Collect MinIO logs
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker logs --tail 500 rustfs-odm-interop-minio \
|
||||||
|
> artifacts/odm-interop/minio/minio.log 2>&1 || true
|
||||||
|
|
||||||
|
- name: Stop MinIO source
|
||||||
|
if: always()
|
||||||
|
run: docker rm -f rustfs-odm-interop-minio >/dev/null 2>&1 || true
|
||||||
|
|
||||||
|
- name: Upload the MinIO interop report
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
|
with:
|
||||||
|
name: odm-interop-minio-${{ github.run_number }}-${{ github.run_attempt }}
|
||||||
|
path: |
|
||||||
|
artifacts/odm-interop/minio
|
||||||
|
target/nextest/e2e-odm-interop/junit.xml
|
||||||
|
retention-days: 14
|
||||||
|
|
||||||
|
# Unlike a production migration source, which needs read access only, the
|
||||||
|
# credentials here also seed the objects each case reads back, so they need
|
||||||
|
# write and delete on the interop bucket. Every run seeds under
|
||||||
|
# `odm-interop/<case>/<uuid>/` and deletes what it seeded when the case
|
||||||
|
# passes; give the bucket an expiration lifecycle rule so the prefixes a
|
||||||
|
# failing case leaves behind cannot accumulate.
|
||||||
|
cloud-source:
|
||||||
|
name: ${{ matrix.provider }} source (three-case minimum)
|
||||||
|
if: github.repository == 'rustfs/rustfs'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 45
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- provider: aws
|
||||||
|
secret_prefix: AWS
|
||||||
|
path_style: virtual
|
||||||
|
- provider: r2
|
||||||
|
secret_prefix: R2
|
||||||
|
path_style: virtual
|
||||||
|
- provider: gcs
|
||||||
|
secret_prefix: GCS_HMAC
|
||||||
|
path_style: virtual
|
||||||
|
env:
|
||||||
|
RUSTFS_ODM_INTEROP_PROVIDER: ${{ matrix.provider }}
|
||||||
|
RUSTFS_ODM_INTEROP_PATH_STYLE: ${{ matrix.path_style }}
|
||||||
|
RUSTFS_ODM_INTEROP_ENDPOINT: ${{ secrets[format('ODM_INTEROP_{0}_ENDPOINT', matrix.secret_prefix)] }}
|
||||||
|
RUSTFS_ODM_INTEROP_REGION: ${{ secrets[format('ODM_INTEROP_{0}_REGION', matrix.secret_prefix)] }}
|
||||||
|
RUSTFS_ODM_INTEROP_BUCKET: ${{ secrets[format('ODM_INTEROP_{0}_BUCKET', matrix.secret_prefix)] }}
|
||||||
|
RUSTFS_ODM_INTEROP_ACCESS_KEY: ${{ secrets[format('ODM_INTEROP_{0}_ACCESS_KEY_ID', matrix.secret_prefix)] }}
|
||||||
|
RUSTFS_ODM_INTEROP_SECRET_KEY: ${{ secrets[format('ODM_INTEROP_{0}_SECRET_ACCESS_KEY', matrix.secret_prefix)] }}
|
||||||
|
RUSTFS_ODM_INTEROP_REPORT_DIR: ${{ github.workspace }}/artifacts/odm-interop/${{ matrix.provider }}/cases
|
||||||
|
NEXTEST_LISTING: ${{ github.workspace }}/artifacts/odm-interop/${{ matrix.provider }}/selection.json
|
||||||
|
steps:
|
||||||
|
# Absent secrets are the normal state, not a failure: the lane reports
|
||||||
|
# which providers it could reach and skips the rest. An empty value is
|
||||||
|
# what an unset repository secret expands to, so it is checked, not the
|
||||||
|
# secret's existence.
|
||||||
|
- name: Check for provider credentials
|
||||||
|
id: credentials
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
if [ -z "${RUSTFS_ODM_INTEROP_ENDPOINT}" ] \
|
||||||
|
|| [ -z "${RUSTFS_ODM_INTEROP_REGION}" ] \
|
||||||
|
|| [ -z "${RUSTFS_ODM_INTEROP_BUCKET}" ] \
|
||||||
|
|| [ -z "${RUSTFS_ODM_INTEROP_ACCESS_KEY}" ] \
|
||||||
|
|| [ -z "${RUSTFS_ODM_INTEROP_SECRET_KEY}" ]; then
|
||||||
|
echo "present=false" >> "$GITHUB_OUTPUT"
|
||||||
|
{
|
||||||
|
echo "### On-demand migration interop: \`${{ matrix.provider }}\`"
|
||||||
|
echo
|
||||||
|
echo "Skipped: the \`ODM_INTEROP_${{ matrix.secret_prefix }}_*\` repository secrets"
|
||||||
|
echo "(\`_ENDPOINT\`, \`_REGION\`, \`_BUCKET\`, \`_ACCESS_KEY_ID\`, \`_SECRET_ACCESS_KEY\`)"
|
||||||
|
echo "are not configured, so no real \`${{ matrix.provider }}\` source was reached."
|
||||||
|
echo
|
||||||
|
} >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
else
|
||||||
|
echo "present=true" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
if: steps.credentials.outputs.present == 'true'
|
||||||
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Setup Rust environment
|
||||||
|
if: steps.credentials.outputs.present == 'true'
|
||||||
|
uses: ./.github/actions/setup
|
||||||
|
with:
|
||||||
|
cache-shared-key: ci-odm-interop
|
||||||
|
cache-save-if: 'false'
|
||||||
|
install-build-packaging-tools: 'false'
|
||||||
|
|
||||||
|
- name: Build the RustFS binary under test
|
||||||
|
if: steps.credentials.outputs.present == 'true'
|
||||||
|
run: cargo build --locked -p rustfs --bins
|
||||||
|
|
||||||
|
# A filterset that matches nothing is valid, so the count is asserted
|
||||||
|
# rather than inferred from a green run.
|
||||||
|
- name: Verify the three-case minimum still selects three cases
|
||||||
|
if: steps.credentials.outputs.present == 'true'
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
mkdir -p "$(dirname "${NEXTEST_LISTING}")"
|
||||||
|
cargo nextest list --profile e2e-odm-interop -p e2e_test \
|
||||||
|
-E "${CLOUD_CASE_FILTER}" --message-format json > "${NEXTEST_LISTING}"
|
||||||
|
selected="$(python3 -c 'import json,sys; d=json.load(open(sys.argv[1])); print(sum(1 for suite in d.get("rust-suites", {}).values() for test in suite.get("testcases", {}).values() if test.get("filter-match", {}).get("status") == "matches"))' "${NEXTEST_LISTING}")"
|
||||||
|
echo "cloud interop cases selected: ${selected}"
|
||||||
|
if [ "${selected}" != "${CLOUD_CASE_COUNT}" ]; then
|
||||||
|
echo "::error::CLOUD_CASE_FILTER selected ${selected} cases, expected ${CLOUD_CASE_COUNT}; the interop cases were renamed or moved. Context: rustfs/backlog#2167."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Run the three-case minimum
|
||||||
|
if: steps.credentials.outputs.present == 'true'
|
||||||
|
run: |
|
||||||
|
cargo nextest run --profile e2e-odm-interop -p e2e_test \
|
||||||
|
-E "${CLOUD_CASE_FILTER}" --no-tests=fail
|
||||||
|
|
||||||
|
- name: Build the ${{ matrix.provider }} interop report
|
||||||
|
if: always() && steps.credentials.outputs.present == 'true'
|
||||||
|
uses: ./.github/actions/odm-interop-report
|
||||||
|
with:
|
||||||
|
provider: ${{ matrix.provider }}
|
||||||
|
cases-dir: ${{ env.RUSTFS_ODM_INTEROP_REPORT_DIR }}
|
||||||
|
junit: target/nextest/e2e-odm-interop/junit.xml
|
||||||
|
output: artifacts/odm-interop/${{ matrix.provider }}/report.json
|
||||||
|
|
||||||
|
- name: Upload the ${{ matrix.provider }} interop report
|
||||||
|
if: always() && steps.credentials.outputs.present == 'true'
|
||||||
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
|
with:
|
||||||
|
name: odm-interop-${{ matrix.provider }}-${{ github.run_number }}-${{ github.run_attempt }}
|
||||||
|
path: |
|
||||||
|
artifacts/odm-interop/${{ matrix.provider }}
|
||||||
|
target/nextest/e2e-odm-interop/junit.xml
|
||||||
|
retention-days: 14
|
||||||
|
|
||||||
|
alert-on-failure:
|
||||||
|
name: Alert on scheduled failure
|
||||||
|
needs: [minio-source, cloud-source]
|
||||||
|
if: >-
|
||||||
|
always() && github.event_name == 'schedule' &&
|
||||||
|
(contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled'))
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Open or update failure-tracking issue
|
||||||
|
uses: ./.github/actions/schedule-failure-issue
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -12,10 +12,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# Functional chain driver: runs the nine functional suites in a fixed order
|
# Functional chain driver: runs the ten functional suites in a fixed order
|
||||||
# (upgrade -> s3 -> kms -> tier -> storage -> heal -> pool -> security, with
|
# (upgrade -> s3 -> kms -> tier -> storage -> heal -> pool -> security ->
|
||||||
# performance on its own runner in parallel) and guarantees the chain keeps
|
# replication -> performance). Each suite attempts the next handoff even
|
||||||
# moving even when individual suites fail.
|
# when its tests fail.
|
||||||
#
|
#
|
||||||
# Each suite workflow can still be dispatched standalone (workflow_dispatch);
|
# Each suite workflow can still be dispatched standalone (workflow_dispatch);
|
||||||
# only chain-triggered runs forward to the next suite via repository_dispatch,
|
# only chain-triggered runs forward to the next suite via repository_dispatch,
|
||||||
@@ -59,16 +59,3 @@ jobs:
|
|||||||
gh api --method POST repos/rustfs/rustfs/dispatches \
|
gh api --method POST repos/rustfs/rustfs/dispatches \
|
||||||
-f event_type='rustfs-chain-upgrade' \
|
-f event_type='rustfs-chain-upgrade' \
|
||||||
-F 'client_payload[from_suite]=nightly-build'
|
-F 'client_payload[from_suite]=nightly-build'
|
||||||
|
|
||||||
- name: Dispatch performance suite (parallel, own runner)
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
if [ -z "${GH_TOKEN:-}" ]; then
|
|
||||||
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch performance" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
gh api --method POST repos/rustfs/rustfs/dispatches \
|
|
||||||
-f event_type='rustfs-chain-performance' \
|
|
||||||
-F 'client_payload[from_suite]=nightly-build'
|
|
||||||
|
|||||||
@@ -54,14 +54,26 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
heal-test:
|
heal-test:
|
||||||
runs-on: smoke-testing
|
runs-on: smoke-testing
|
||||||
# Requirement: a failing suite must not fail the workflow; failures
|
|
||||||
# are filed to rustfs/backlog and the chain continues.
|
|
||||||
continue-on-error: true
|
|
||||||
timeout-minutes: 480
|
timeout-minutes: 480
|
||||||
# Standalone manual run, or one link of the nightly functional chain
|
# Standalone manual run, or one link of the nightly functional chain
|
||||||
# (storage -> heal -> pool). Pool expansion no longer re-runs heal.
|
# (storage -> heal -> pool). Pool expansion no longer re-runs heal.
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Initialize functional evidence
|
||||||
|
id: evidence
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
umask 077
|
||||||
|
FUNCTIONAL_ARTIFACTS_DIR="${RUNNER_TEMP}/rustfs-heal-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
mkdir -- "${FUNCTIONAL_ARTIFACTS_DIR}" "${FUNCTIONAL_ARTIFACTS_DIR}-scratch"
|
||||||
|
{
|
||||||
|
printf 'FUNCTIONAL_ARTIFACTS_DIR=%s\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'LOG_FILE=%s/suite.log\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'RUSTFS_WARP_LOG_FILE=%s/warp.log\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'REPORT_FILE=%s/report.md\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'TMPDIR=%s-scratch\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
} >> "${GITHUB_ENV}"
|
||||||
|
|
||||||
# auto-testing is private: clone it with the dedicated PF token (not
|
# auto-testing is private: clone it with the dedicated PF token (not
|
||||||
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
||||||
- name: Checkout auto-testing scripts (with retry)
|
- name: Checkout auto-testing scripts (with retry)
|
||||||
@@ -117,7 +129,7 @@ jobs:
|
|||||||
else
|
else
|
||||||
ARGS+=(--package-url "${{ env.RUSTFS_NIGHTLY_PACKAGE_URL }}")
|
ARGS+=(--package-url "${{ env.RUSTFS_NIGHTLY_PACKAGE_URL }}")
|
||||||
fi
|
fi
|
||||||
./auto-testing/rustfs_heal_test.sh "${ARGS[@]}"
|
./auto-testing/rustfs_heal_test.sh "${ARGS[@]}" --log-file "${LOG_FILE}"
|
||||||
|
|
||||||
- name: Preflight checks
|
- name: Preflight checks
|
||||||
run: |
|
run: |
|
||||||
@@ -127,7 +139,7 @@ jobs:
|
|||||||
else
|
else
|
||||||
ARGS+=(--package-url "${{ env.RUSTFS_NIGHTLY_PACKAGE_URL }}")
|
ARGS+=(--package-url "${{ env.RUSTFS_NIGHTLY_PACKAGE_URL }}")
|
||||||
fi
|
fi
|
||||||
./auto-testing/rustfs_heal_test.sh "${ARGS[@]}"
|
./auto-testing/rustfs_heal_test.sh "${ARGS[@]}" --log-file "${LOG_FILE}"
|
||||||
|
|
||||||
- name: Run heal test (write -> outage -> heal -> verify)
|
- name: Run heal test (write -> outage -> heal -> verify)
|
||||||
id: test
|
id: test
|
||||||
@@ -137,13 +149,10 @@ jobs:
|
|||||||
--endpoint "${{ env.RUSTFS_API_ENDPOINT }}" \
|
--endpoint "${{ env.RUSTFS_API_ENDPOINT }}" \
|
||||||
--stop-node-gb "${{ inputs.stop_node_gb || '15' }}" \
|
--stop-node-gb "${{ inputs.stop_node_gb || '15' }}" \
|
||||||
--warp-stop-gb "${{ inputs.warp_stop_gb || '40' }}" \
|
--warp-stop-gb "${{ inputs.warp_stop_gb || '40' }}" \
|
||||||
--log-file /tmp/rustfs-heal-test.log
|
--log-file "${LOG_FILE}"
|
||||||
|
|
||||||
- name: Generate report
|
- name: Generate report
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
env:
|
|
||||||
LOG_FILE: /tmp/rustfs-heal-test.log
|
|
||||||
REPORT_FILE: /tmp/rustfs-heal-report.md
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
PACKAGE_URL='${{ inputs.package_url }}'
|
PACKAGE_URL='${{ inputs.package_url }}'
|
||||||
@@ -152,27 +161,99 @@ jobs:
|
|||||||
else
|
else
|
||||||
PACKAGE_SOURCE="${RUSTFS_NIGHTLY_PACKAGE_URL}"
|
PACKAGE_SOURCE="${RUSTFS_NIGHTLY_PACKAGE_URL}"
|
||||||
fi
|
fi
|
||||||
|
STEPS_TABLE="${FUNCTIONAL_ARTIFACTS_DIR}/steps.md"
|
||||||
|
CASE_RESULT=success
|
||||||
|
python3 - "${LOG_FILE}" "${STEPS_TABLE}" <<'PY' || CASE_RESULT=failure
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
log_file, out_file = sys.argv[1], sys.argv[2]
|
||||||
|
ansi = re.compile(r'\x1b\[[0-9;]*m')
|
||||||
|
step_re = re.compile(r'^\[HEAL-STEP\]\s+(\d+)\s+(.+?)\s+(PASS|FAIL|SKIP)\s*$')
|
||||||
|
ver_re = re.compile(r'^\[HEAL-VERSION\]\s+(\S+)(?:\s+\(node\s+(\S+)\))?\s*$')
|
||||||
|
result_re = re.compile(r'^\[HEAL-RESULT\]\s+(PASS|FAIL)\s+(.*)$')
|
||||||
|
|
||||||
|
steps = {}
|
||||||
|
order = []
|
||||||
|
status_rank = {'SKIP': 0, 'PASS': 1, 'FAIL': 2}
|
||||||
|
version = None
|
||||||
|
version_node = None
|
||||||
|
verdict = None
|
||||||
|
verdict_detail = ''
|
||||||
|
try:
|
||||||
|
with open(log_file, 'r', encoding='utf-8', errors='replace') as fh:
|
||||||
|
for raw in fh:
|
||||||
|
line = ansi.sub('', raw).strip()
|
||||||
|
m = step_re.match(line)
|
||||||
|
if m:
|
||||||
|
n, desc, status = m.group(1), m.group(2), m.group(3)
|
||||||
|
if n not in steps:
|
||||||
|
order.append(n)
|
||||||
|
if n not in steps or status_rank[status] > status_rank[steps[n][1]]:
|
||||||
|
steps[n] = (desc, status)
|
||||||
|
continue
|
||||||
|
m = ver_re.match(line)
|
||||||
|
if m:
|
||||||
|
version, version_node = m.group(1), m.group(2)
|
||||||
|
continue
|
||||||
|
m = result_re.match(line)
|
||||||
|
if m and verdict != 'FAIL':
|
||||||
|
verdict, verdict_detail = m.group(1), m.group(2)
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
with open(out_file, 'w', encoding='utf-8') as out:
|
||||||
|
out.write('## Step Results\n\n')
|
||||||
|
if version:
|
||||||
|
node_note = f' (captured via `rustfs --version` on {version_node})' if version_node else ''
|
||||||
|
out.write(f'- Version under test: **{version}**{node_note}\n')
|
||||||
|
if verdict:
|
||||||
|
out.write(f'- Overall result: **{verdict}** — {verdict_detail}\n')
|
||||||
|
out.write('\n')
|
||||||
|
out.write('| Step | Description | Result |\n')
|
||||||
|
out.write('| --- | --- | --- |\n')
|
||||||
|
for n in sorted(order, key=int):
|
||||||
|
desc, status = steps[n]
|
||||||
|
out.write(f'| {n} | {desc} | {status} |\n')
|
||||||
|
if not order:
|
||||||
|
out.write('| - | - | NOT RUN (no step result lines found) |\n')
|
||||||
|
complete = set(steps) == {str(n) for n in range(1, 8)}
|
||||||
|
sys.exit(0 if complete and verdict != 'FAIL' and all(status == 'PASS' for _, status in steps.values()) else 1)
|
||||||
|
PY
|
||||||
|
RESULT=failure
|
||||||
|
if [ '${{ steps.test.outcome }}' = 'success' ] && [ "${CASE_RESULT}" = 'success' ]; then
|
||||||
|
RESULT=success
|
||||||
|
fi
|
||||||
{
|
{
|
||||||
echo "# RustFS heal test report"
|
echo "# RustFS heal test report"
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
echo "- Trigger: ${{ github.event_name }}"
|
echo "- Trigger: ${{ github.event_name }}"
|
||||||
echo "- Package: ${PACKAGE_SOURCE}"
|
echo "- Package: ${PACKAGE_SOURCE}"
|
||||||
echo "- Test Step Outcome: ${{ steps.test.outcome }}"
|
echo "- Test Step Outcome: ${RESULT}"
|
||||||
|
echo "- Suite Step Outcome: ${{ steps.test.outcome }}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "## Log tail"
|
if [ "${RESULT}" = "success" ]; then
|
||||||
echo '```text'
|
cat "${STEPS_TABLE}"
|
||||||
tail -n 200 "${LOG_FILE}" || true
|
echo ""
|
||||||
echo '```'
|
echo "## Log tail"
|
||||||
|
echo '```text'
|
||||||
|
tail -n 200 "${LOG_FILE}"
|
||||||
|
echo '```'
|
||||||
|
else
|
||||||
|
echo "The suite or evidence validation failed. See this run's artifact for partial step results and suite.log."
|
||||||
|
fi
|
||||||
} | tee "${REPORT_FILE}"
|
} | tee "${REPORT_FILE}"
|
||||||
cat "${REPORT_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
cat "${REPORT_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
||||||
|
[ "${RESULT}" = "success" ]
|
||||||
|
|
||||||
- name: Upload functional report to dashboard
|
- name: Upload functional report to dashboard
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
||||||
REPORT_FILE: /tmp/rustfs-heal-report.md
|
|
||||||
SUITE: heal
|
SUITE: heal
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -182,28 +263,32 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
DATE="$(date -u +%Y-%m-%d)"
|
DATE="$(date -u +%Y-%m-%d)"
|
||||||
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
||||||
CONTENT="$(python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}")"
|
# Base64-encode the report into a temp file and feed it to jq via
|
||||||
|
# --rawfile: large reports (e.g. pool) exceed the OS argv limit and
|
||||||
|
# make `jq --arg content "${CONTENT}"` fail with "Argument list too long".
|
||||||
|
B64_FILE="$(mktemp)"
|
||||||
|
python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}" > "${B64_FILE}"
|
||||||
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
||||||
if [ -n "${SHA}" ]; then
|
if [ -n "${SHA}" ]; then
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" --arg sha "${SHA}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" --arg sha "${SHA}" \
|
||||||
'{message:$msg, content:$content, sha:$sha}' \
|
'{message:$msg, content:($content|rtrimstr("\n")), sha:$sha}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
else
|
else
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" \
|
||||||
'{message:$msg, content:$content}' \
|
'{message:$msg, content:($content|rtrimstr("\n"))}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
fi
|
fi
|
||||||
|
rm -f "${B64_FILE}"
|
||||||
|
|
||||||
- name: File failure issue in rustfs/backlog
|
- name: File failure issue in rustfs/backlog
|
||||||
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
EVIDENCE_OUTCOME: ${{ steps.evidence.outcome }}
|
||||||
SUITE: 'heal'
|
SUITE: 'heal'
|
||||||
SUITE_LABEL: 'Heal'
|
SUITE_LABEL: 'Heal'
|
||||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
REPORT_FILE: '/tmp/rustfs-heal-report.md'
|
|
||||||
LOG_FILE: '/tmp/rustfs-heal-test.log'
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
if [ -z "${GH_TOKEN:-}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
@@ -231,14 +316,16 @@ jobs:
|
|||||||
echo ""
|
echo ""
|
||||||
echo "- Suite: \`${SUITE}\`"
|
echo "- Suite: \`${SUITE}\`"
|
||||||
echo "- Run: ${RUN_URL}"
|
echo "- Run: ${RUN_URL}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
||||||
echo "- Date: $(date -u +%Y-%m-%d)"
|
echo "- Date: $(date -u +%Y-%m-%d)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "## Report (errors and symptoms)"
|
echo "## Report (errors and symptoms)"
|
||||||
echo ""
|
echo ""
|
||||||
if [ -s "${REPORT_FILE}" ]; then
|
if [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${REPORT_FILE}" ]; then
|
||||||
redact < "${REPORT_FILE}"
|
redact < "${REPORT_FILE}"
|
||||||
elif [ -s "${LOG_FILE:-}" ]; then
|
elif [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${LOG_FILE:-}" ]; then
|
||||||
echo "(report file missing; log tail below)"
|
echo "(report file missing; log tail below)"
|
||||||
echo ""
|
echo ""
|
||||||
tail -n 200 "${LOG_FILE}" | redact
|
tail -n 200 "${LOG_FILE}" | redact
|
||||||
@@ -254,14 +341,16 @@ jobs:
|
|||||||
echo "filed backlog issue for suite ${SUITE}"
|
echo "filed backlog issue for suite ${SUITE}"
|
||||||
|
|
||||||
- name: Upload test logs
|
- name: Upload test logs
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
with:
|
with:
|
||||||
name: rustfs-heal-test-${{ github.run_id }}
|
name: rustfs-heal-test-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
path: |
|
path: |
|
||||||
/tmp/rustfs-heal-test*.log
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/report.md
|
||||||
/tmp/rustfs-warp.*.log
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/suite.log
|
||||||
if-no-files-found: warn
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/warp.log
|
||||||
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/steps.md
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Cleanup environment (after)
|
- name: Cleanup environment (after)
|
||||||
if: ${{ always() && inputs.cleanup_after != 'false' }}
|
if: ${{ always() && inputs.cleanup_after != 'false' }}
|
||||||
@@ -293,7 +382,7 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
if [ -z "${{GH_TOKEN:-}}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -302,31 +391,31 @@ jobs:
|
|||||||
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
||||||
-f event_type='rustfs-chain-pool' \
|
-f event_type='rustfs-chain-pool' \
|
||||||
-F 'client_payload[from_suite]=heal'; then
|
-F 'client_payload[from_suite]=heal'; then
|
||||||
echo "dispatched next suite Pool expansion (attempt ${{attempt}})"
|
echo "dispatched next suite Pool expansion (attempt ${attempt})"
|
||||||
DISPATCHED=1
|
DISPATCHED=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "dispatch attempt ${{attempt}} failed; retrying in ${{attempt}}0s" >&2
|
echo "dispatch attempt ${attempt} failed; retrying in ${attempt}0s" >&2
|
||||||
sleep "${{attempt}}0"
|
sleep "${attempt}0"
|
||||||
done
|
done
|
||||||
if [ "${{DISPATCHED:-0}}" -ne 1 ]; then
|
if [ "${DISPATCHED:-0}" -ne 1 ]; then
|
||||||
echo "ERROR: functional chain stalled: could not dispatch Pool expansion after 3 attempts" >&2
|
echo "ERROR: functional chain stalled: could not dispatch Pool expansion after 3 attempts" >&2
|
||||||
TITLE="[functional][chain] stalled after heal (run ${{GITHUB_RUN_ID}})"
|
TITLE="[functional][chain] stalled after heal (run ${GITHUB_RUN_ID})"
|
||||||
BODY_FILE="$(mktemp)"
|
BODY_FILE="$(mktemp)"
|
||||||
{
|
{
|
||||||
echo "The functional chain could not hand off from **heal** to **Pool expansion** after 3 attempts."
|
echo "The functional chain could not hand off from **heal** to **Pool expansion** after 3 attempts."
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Failed suite job: ${{GITHUB_SERVER_URL}}/${{GITHUB_REPOSITORY}}/actions/runs/${{GITHUB_RUN_ID}}"
|
echo "- Failed suite job: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||||
echo "- Expected next event: `rustfs-chain-pool`"
|
echo "- Expected next event: 'rustfs-chain-pool'"
|
||||||
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
||||||
echo "- Recovery: re-dispatch manually with"
|
echo "- Recovery: re-dispatch manually with"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-pool'"
|
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-pool'"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
} > "${{BODY_FILE}}"
|
} > "${BODY_FILE}"
|
||||||
gh issue create -R rustfs/backlog --title "${{TITLE}}" \
|
gh issue create -R rustfs/backlog --title "${TITLE}" \
|
||||||
--body-file "${{BODY_FILE}}" --label functional-test \
|
--body-file "${BODY_FILE}" --label functional-test \
|
||||||
|| gh issue create -R rustfs/backlog --title "${{TITLE}}" --body-file "${{BODY_FILE}}" \
|
|| gh issue create -R rustfs/backlog --title "${TITLE}" --body-file "${BODY_FILE}" \
|
||||||
|| echo "could not file the stall alert issue either; check the token" >&2
|
|| echo "could not file the stall alert issue either; check the token" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -49,10 +49,28 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
kms-test:
|
kms-test:
|
||||||
runs-on: smoke-testing
|
runs-on: smoke-testing
|
||||||
continue-on-error: true
|
|
||||||
timeout-minutes: 420
|
timeout-minutes: 420
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout repository (for report parser)
|
||||||
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Initialize functional evidence
|
||||||
|
id: evidence
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
umask 077
|
||||||
|
FUNCTIONAL_ARTIFACTS_DIR="${RUNNER_TEMP}/rustfs-kms-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
mkdir -- "${FUNCTIONAL_ARTIFACTS_DIR}" "${FUNCTIONAL_ARTIFACTS_DIR}-scratch"
|
||||||
|
{
|
||||||
|
printf 'FUNCTIONAL_ARTIFACTS_DIR=%s\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'LOG_FILE=%s/suite.log\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'REPORT_FILE=%s/report.md\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'TMPDIR=%s-scratch\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
} >> "${GITHUB_ENV}"
|
||||||
|
|
||||||
# auto-testing is private: clone it with the dedicated PF token (not
|
# auto-testing is private: clone it with the dedicated PF token (not
|
||||||
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
||||||
- name: Checkout auto-testing scripts (with retry)
|
- name: Checkout auto-testing scripts (with retry)
|
||||||
@@ -109,9 +127,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Run KMS suite
|
- name: Run KMS suite
|
||||||
id: test
|
id: test
|
||||||
continue-on-error: true
|
|
||||||
env:
|
|
||||||
LOG_FILE: /tmp/rustfs-kms.log
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
chmod +x auto-testing/rustfs-kms-test.sh
|
chmod +x auto-testing/rustfs-kms-test.sh
|
||||||
@@ -141,10 +156,7 @@ jobs:
|
|||||||
./auto-testing/rustfs-kms-test.sh "${ARGS[@]}"
|
./auto-testing/rustfs-kms-test.sh "${ARGS[@]}"
|
||||||
|
|
||||||
- name: Generate report
|
- name: Generate report
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
env:
|
|
||||||
LOG_FILE: /tmp/rustfs-kms.log
|
|
||||||
REPORT_FILE: /tmp/rustfs-kms-report.md
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
PACKAGE_URL='${{ inputs.package_url }}'
|
PACKAGE_URL='${{ inputs.package_url }}'
|
||||||
@@ -156,79 +168,43 @@ jobs:
|
|||||||
else
|
else
|
||||||
PACKAGE_SOURCE="${RUSTFS_NIGHTLY_PACKAGE_URL}"
|
PACKAGE_SOURCE="${RUSTFS_NIGHTLY_PACKAGE_URL}"
|
||||||
fi
|
fi
|
||||||
CASE_TABLE="/tmp/rustfs-kms-cases.md"
|
CASE_TABLE="${FUNCTIONAL_ARTIFACTS_DIR}/cases.md"
|
||||||
python3 - "${LOG_FILE}" "${CASE_TABLE}" <<'PY'
|
CASE_RESULT=success
|
||||||
import re
|
python3 scripts/functional_case_report.py "${LOG_FILE}" "${CASE_TABLE}" || CASE_RESULT=failure
|
||||||
import sys
|
RESULT=failure
|
||||||
|
if [ '${{ steps.test.outcome }}' = 'success' ] && [ "${CASE_RESULT}" = 'success' ]; then
|
||||||
log_file, out_file = sys.argv[1], sys.argv[2]
|
RESULT=success
|
||||||
ansi = re.compile(r'\x1b\[[0-9;]*m')
|
fi
|
||||||
start_re = re.compile(r'^---\s+([A-Z]+-[0-9]+)\s+(.+?)\s+---$')
|
|
||||||
done_re = re.compile(r'^\[(PASS|FAIL|UNSUPPORTED)\]\s+([A-Z]+-[0-9]+)\b')
|
|
||||||
|
|
||||||
rows = []
|
|
||||||
index = {}
|
|
||||||
try:
|
|
||||||
with open(log_file, 'r', encoding='utf-8', errors='replace') as fh:
|
|
||||||
for raw in fh:
|
|
||||||
line = ansi.sub('', raw).strip()
|
|
||||||
m = start_re.match(line)
|
|
||||||
if m:
|
|
||||||
case_id, name = m.group(1), m.group(2)
|
|
||||||
if case_id not in index:
|
|
||||||
index[case_id] = len(rows)
|
|
||||||
rows.append([case_id, name, 'RUNNING'])
|
|
||||||
continue
|
|
||||||
m = done_re.match(line)
|
|
||||||
if m:
|
|
||||||
status, case_id = m.group(1), m.group(2)
|
|
||||||
if case_id in index:
|
|
||||||
rows[index[case_id]][2] = status
|
|
||||||
else:
|
|
||||||
rows.append([case_id, case_id, status])
|
|
||||||
index[case_id] = len(rows) - 1
|
|
||||||
except FileNotFoundError:
|
|
||||||
rows = []
|
|
||||||
|
|
||||||
counts = {'PASS': 0, 'FAIL': 0, 'UNSUPPORTED': 0, 'RUNNING': 0}
|
|
||||||
for _, _, status in rows:
|
|
||||||
counts[status] = counts.get(status, 0) + 1
|
|
||||||
|
|
||||||
with open(out_file, 'w', encoding='utf-8') as out:
|
|
||||||
out.write('## Case Summary\n\n')
|
|
||||||
out.write(f"- Total: {len(rows)}\\n")
|
|
||||||
out.write(f"- PASS: {counts.get('PASS', 0)}\\n")
|
|
||||||
out.write(f"- FAIL: {counts.get('FAIL', 0)}\\n")
|
|
||||||
out.write(f"- UNSUPPORTED: {counts.get('UNSUPPORTED', 0)}\\n")
|
|
||||||
out.write('\\n')
|
|
||||||
out.write('| Case | Name | Status |\\n')
|
|
||||||
out.write('| --- | --- | --- |\\n')
|
|
||||||
for case_id, name, status in rows:
|
|
||||||
out.write(f'| {case_id} | {name} | {status} |\\n')
|
|
||||||
PY
|
|
||||||
{
|
{
|
||||||
echo "# RustFS KMS test report"
|
echo "# RustFS KMS test report"
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
echo "- Trigger: ${{ github.event_name }}"
|
echo "- Trigger: ${{ github.event_name }}"
|
||||||
echo "- Package: ${PACKAGE_SOURCE}"
|
echo "- Package: ${PACKAGE_SOURCE}"
|
||||||
echo "- Test Step Outcome: ${{ steps.test.outcome }}"
|
echo "- Test Step Outcome: ${RESULT}"
|
||||||
|
echo "- Suite Step Outcome: ${{ steps.test.outcome }}"
|
||||||
echo ""
|
echo ""
|
||||||
cat "${CASE_TABLE}" || true
|
if [ "${RESULT}" = "success" ]; then
|
||||||
echo ""
|
cat "${CASE_TABLE}"
|
||||||
echo "## Log tail"
|
echo ""
|
||||||
echo '```text'
|
echo "## Log tail"
|
||||||
tail -n 200 "${LOG_FILE}" || true
|
echo '```text'
|
||||||
echo '```'
|
tail -n 200 "${LOG_FILE}"
|
||||||
|
echo '```'
|
||||||
|
else
|
||||||
|
echo "The suite or evidence validation failed. See this run's artifact for partial case results and suite.log."
|
||||||
|
fi
|
||||||
} | tee "${REPORT_FILE}"
|
} | tee "${REPORT_FILE}"
|
||||||
cat "${REPORT_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
cat "${REPORT_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
||||||
|
[ "${RESULT}" = "success" ]
|
||||||
|
|
||||||
- name: Upload functional report to dashboard
|
- name: Upload functional report to dashboard
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
||||||
REPORT_FILE: /tmp/rustfs-kms-report.md
|
|
||||||
SUITE: kms
|
SUITE: kms
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -238,28 +214,32 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
DATE="$(date -u +%Y-%m-%d)"
|
DATE="$(date -u +%Y-%m-%d)"
|
||||||
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
||||||
CONTENT="$(python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}")"
|
# Base64-encode the report into a temp file and feed it to jq via
|
||||||
|
# --rawfile: large reports (e.g. pool) exceed the OS argv limit and
|
||||||
|
# make `jq --arg content "${CONTENT}"` fail with "Argument list too long".
|
||||||
|
B64_FILE="$(mktemp)"
|
||||||
|
python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}" > "${B64_FILE}"
|
||||||
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
||||||
if [ -n "${SHA}" ]; then
|
if [ -n "${SHA}" ]; then
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" --arg sha "${SHA}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" --arg sha "${SHA}" \
|
||||||
'{message:$msg, content:$content, sha:$sha}' \
|
'{message:$msg, content:($content|rtrimstr("\n")), sha:$sha}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
else
|
else
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" \
|
||||||
'{message:$msg, content:$content}' \
|
'{message:$msg, content:($content|rtrimstr("\n"))}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
fi
|
fi
|
||||||
|
rm -f "${B64_FILE}"
|
||||||
|
|
||||||
- name: File failure issue in rustfs/backlog
|
- name: File failure issue in rustfs/backlog
|
||||||
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
EVIDENCE_OUTCOME: ${{ steps.evidence.outcome }}
|
||||||
SUITE: 'kms'
|
SUITE: 'kms'
|
||||||
SUITE_LABEL: 'KMS'
|
SUITE_LABEL: 'KMS'
|
||||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
REPORT_FILE: '/tmp/rustfs-kms-report.md'
|
|
||||||
LOG_FILE: '/tmp/rustfs-kms.log'
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
if [ -z "${GH_TOKEN:-}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
@@ -287,14 +267,16 @@ jobs:
|
|||||||
echo ""
|
echo ""
|
||||||
echo "- Suite: \`${SUITE}\`"
|
echo "- Suite: \`${SUITE}\`"
|
||||||
echo "- Run: ${RUN_URL}"
|
echo "- Run: ${RUN_URL}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
||||||
echo "- Date: $(date -u +%Y-%m-%d)"
|
echo "- Date: $(date -u +%Y-%m-%d)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "## Report (errors and symptoms)"
|
echo "## Report (errors and symptoms)"
|
||||||
echo ""
|
echo ""
|
||||||
if [ -s "${REPORT_FILE}" ]; then
|
if [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${REPORT_FILE}" ]; then
|
||||||
redact < "${REPORT_FILE}"
|
redact < "${REPORT_FILE}"
|
||||||
elif [ -s "${LOG_FILE:-}" ]; then
|
elif [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${LOG_FILE:-}" ]; then
|
||||||
echo "(report file missing; log tail below)"
|
echo "(report file missing; log tail below)"
|
||||||
echo ""
|
echo ""
|
||||||
tail -n 200 "${LOG_FILE}" | redact
|
tail -n 200 "${LOG_FILE}" | redact
|
||||||
@@ -310,14 +292,15 @@ jobs:
|
|||||||
echo "filed backlog issue for suite ${SUITE}"
|
echo "filed backlog issue for suite ${SUITE}"
|
||||||
|
|
||||||
- name: Upload report and logs
|
- name: Upload report and logs
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
with:
|
with:
|
||||||
name: rustfs-kms-test-${{ github.run_id }}
|
name: rustfs-kms-test-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
path: |
|
path: |
|
||||||
/tmp/rustfs-kms.log
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/report.md
|
||||||
/tmp/rustfs-kms-report.md
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/suite.log
|
||||||
if-no-files-found: warn
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/cases.md
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Cleanup environment (after)
|
- name: Cleanup environment (after)
|
||||||
if: always()
|
if: always()
|
||||||
@@ -349,7 +332,7 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
if [ -z "${{GH_TOKEN:-}}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -358,31 +341,31 @@ jobs:
|
|||||||
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
||||||
-f event_type='rustfs-chain-tier' \
|
-f event_type='rustfs-chain-tier' \
|
||||||
-F 'client_payload[from_suite]=kms'; then
|
-F 'client_payload[from_suite]=kms'; then
|
||||||
echo "dispatched next suite Tier (attempt ${{attempt}})"
|
echo "dispatched next suite Tier (attempt ${attempt})"
|
||||||
DISPATCHED=1
|
DISPATCHED=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "dispatch attempt ${{attempt}} failed; retrying in ${{attempt}}0s" >&2
|
echo "dispatch attempt ${attempt} failed; retrying in ${attempt}0s" >&2
|
||||||
sleep "${{attempt}}0"
|
sleep "${attempt}0"
|
||||||
done
|
done
|
||||||
if [ "${{DISPATCHED:-0}}" -ne 1 ]; then
|
if [ "${DISPATCHED:-0}" -ne 1 ]; then
|
||||||
echo "ERROR: functional chain stalled: could not dispatch Tier after 3 attempts" >&2
|
echo "ERROR: functional chain stalled: could not dispatch Tier after 3 attempts" >&2
|
||||||
TITLE="[functional][chain] stalled after kms (run ${{GITHUB_RUN_ID}})"
|
TITLE="[functional][chain] stalled after kms (run ${GITHUB_RUN_ID})"
|
||||||
BODY_FILE="$(mktemp)"
|
BODY_FILE="$(mktemp)"
|
||||||
{
|
{
|
||||||
echo "The functional chain could not hand off from **kms** to **Tier** after 3 attempts."
|
echo "The functional chain could not hand off from **kms** to **Tier** after 3 attempts."
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Failed suite job: ${{GITHUB_SERVER_URL}}/${{GITHUB_REPOSITORY}}/actions/runs/${{GITHUB_RUN_ID}}"
|
echo "- Failed suite job: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||||
echo "- Expected next event: `rustfs-chain-tier`"
|
echo "- Expected next event: 'rustfs-chain-tier'"
|
||||||
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
||||||
echo "- Recovery: re-dispatch manually with"
|
echo "- Recovery: re-dispatch manually with"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-tier'"
|
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-tier'"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
} > "${{BODY_FILE}}"
|
} > "${BODY_FILE}"
|
||||||
gh issue create -R rustfs/backlog --title "${{TITLE}}" \
|
gh issue create -R rustfs/backlog --title "${TITLE}" \
|
||||||
--body-file "${{BODY_FILE}}" --label functional-test \
|
--body-file "${BODY_FILE}" --label functional-test \
|
||||||
|| gh issue create -R rustfs/backlog --title "${{TITLE}}" --body-file "${{BODY_FILE}}" \
|
|| gh issue create -R rustfs/backlog --title "${TITLE}" --body-file "${BODY_FILE}" \
|
||||||
|| echo "could not file the stall alert issue either; check the token" >&2
|
|| echo "could not file the stall alert issue either; check the token" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -49,17 +49,16 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
# Chain entry: dispatched by rustfs-functional-chain.yml (runs on its own
|
# Chain handoff: dispatched when the replication suite finishes.
|
||||||
# pf-testing runner, in parallel with the shared-VM chain).
|
|
||||||
types: [rustfs-chain-performance]
|
types: [rustfs-chain-performance]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
# Dedicated pf-testing runner/environment: own concurrency group so perf runs
|
# The default performance nodes overlap the other suites' remote VMs, even
|
||||||
# never block (or are blocked by) the pool-expansion / heal tests.
|
# though the runner differs. Hold the shared lock through cleanup as well.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: rustfs-performance-test
|
group: rustfs-shared-functional-tests
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
@@ -76,22 +75,39 @@ env:
|
|||||||
# Package used by the nightly run (workflow_dispatch inputs are empty for
|
# Package used by the nightly run (workflow_dispatch inputs are empty for
|
||||||
# workflow_run events), i.e. the latest nightly deb published by nightly-gnu.yml.
|
# workflow_run events), i.e. the latest nightly deb published by nightly-gnu.yml.
|
||||||
RUSTFS_NIGHTLY_PACKAGE_URL: ${{ vars.RUSTFS_NIGHTLY_PACKAGE_URL || 'https://dl.rustfs.com/artifacts/rustfs/packages/nightly/rustfs-nightly-latest.deb' }}
|
RUSTFS_NIGHTLY_PACKAGE_URL: ${{ vars.RUSTFS_NIGHTLY_PACKAGE_URL || 'https://dl.rustfs.com/artifacts/rustfs/packages/nightly/rustfs-nightly-latest.deb' }}
|
||||||
# Fixed benchmark result directory so later steps can read summary.md
|
|
||||||
RUSTFS_RESULT_DIR: /tmp/rustfs-perf-results
|
|
||||||
# Cross-repo token for uploading reports to rustfs/dashboard (set in repo settings)
|
# Cross-repo token for uploading reports to rustfs/dashboard (set in repo settings)
|
||||||
PF_TESTING_GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
PF_TESTING_GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
performance-test:
|
performance-test:
|
||||||
runs-on: pf-testing
|
runs-on: pf-testing
|
||||||
# Requirement: a failing benchmark must not fail the workflow;
|
|
||||||
# failures are filed to rustfs/backlog.
|
|
||||||
continue-on-error: true
|
|
||||||
timeout-minutes: 900
|
timeout-minutes: 900
|
||||||
|
env:
|
||||||
|
RUSTFS_BENCH_SCRIPT: ${{ github.workspace }}/auto-testing/rustfs_performance_testing.sh
|
||||||
|
RUSTFS_WARP_METHODS: ${{ inputs.test_method }}
|
||||||
|
RUSTFS_WARP_SIZES: ${{ inputs.object_size }}
|
||||||
|
RUSTFS_WARP_DURATION: ${{ inputs.warp_duration || '5m' }}
|
||||||
|
RUSTFS_WARP_CONCURRENCY: ${{ inputs.warp_concurrency || '64' }}
|
||||||
# Run on manual dispatch, or when the nightly build completed successfully.
|
# Run on manual dispatch, or when the nightly build completed successfully.
|
||||||
# Skipped when nightly failed.
|
# Skipped when nightly failed.
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Initialize functional evidence
|
||||||
|
id: evidence
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
umask 077
|
||||||
|
FUNCTIONAL_ARTIFACTS_DIR="${RUNNER_TEMP}/rustfs-performance-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
mkdir -- "${FUNCTIONAL_ARTIFACTS_DIR}" "${FUNCTIONAL_ARTIFACTS_DIR}-scratch"
|
||||||
|
{
|
||||||
|
printf 'FUNCTIONAL_ARTIFACTS_DIR=%s\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'LOG_FILE=%s/suite.log\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'REPORT_FILE=%s/report.md\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'TMPDIR=%s-scratch\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'RUSTFS_RESULT_DIR=%s/results\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'VERSION_FILE=%s/version.txt\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
} >> "${GITHUB_ENV}"
|
||||||
|
|
||||||
# auto-testing is private: clone it with the dedicated PF token (not
|
# auto-testing is private: clone it with the dedicated PF token (not
|
||||||
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
||||||
- name: Checkout auto-testing scripts (with retry)
|
- name: Checkout auto-testing scripts (with retry)
|
||||||
@@ -123,7 +139,7 @@ jobs:
|
|||||||
if: ${{ inputs.cleanup_before != 'false' }}
|
if: ${{ inputs.cleanup_before != 'false' }}
|
||||||
run: |
|
run: |
|
||||||
chmod +x auto-testing/rustfs_performance_test.sh
|
chmod +x auto-testing/rustfs_performance_test.sh
|
||||||
./auto-testing/rustfs_performance_test.sh --step 1 -y
|
./auto-testing/rustfs_performance_test.sh --step 1 -y --log-file "${LOG_FILE:-/dev/null}"
|
||||||
|
|
||||||
- name: Install RustFS package & start cluster (4x4)
|
- name: Install RustFS package & start cluster (4x4)
|
||||||
run: |
|
run: |
|
||||||
@@ -133,7 +149,7 @@ jobs:
|
|||||||
else
|
else
|
||||||
ARGS+=(--package-url "${{ env.RUSTFS_NIGHTLY_PACKAGE_URL }}")
|
ARGS+=(--package-url "${{ env.RUSTFS_NIGHTLY_PACKAGE_URL }}")
|
||||||
fi
|
fi
|
||||||
./auto-testing/rustfs_performance_test.sh "${ARGS[@]}"
|
./auto-testing/rustfs_performance_test.sh "${ARGS[@]}" --log-file "${LOG_FILE}"
|
||||||
|
|
||||||
- name: Preflight checks
|
- name: Preflight checks
|
||||||
run: |
|
run: |
|
||||||
@@ -143,30 +159,24 @@ jobs:
|
|||||||
else
|
else
|
||||||
ARGS+=(--package-url "${{ env.RUSTFS_NIGHTLY_PACKAGE_URL }}")
|
ARGS+=(--package-url "${{ env.RUSTFS_NIGHTLY_PACKAGE_URL }}")
|
||||||
fi
|
fi
|
||||||
./auto-testing/rustfs_performance_test.sh "${ARGS[@]}"
|
./auto-testing/rustfs_performance_test.sh "${ARGS[@]}" --log-file "${LOG_FILE}"
|
||||||
|
|
||||||
- name: Run benchmark (GET/PUT/MIXED)
|
- name: Run benchmark (GET/PUT/MIXED)
|
||||||
id: benchmark
|
id: benchmark
|
||||||
run: |
|
run: |
|
||||||
# Empty on automatic (workflow_run) runs -> full 30 rounds.
|
|
||||||
# Manual dispatch can restrict method(s)/size(s).
|
|
||||||
export WARP_METHODS="${{ inputs.test_method }}"
|
|
||||||
export WARP_SIZES="${{ inputs.object_size }}"
|
|
||||||
./auto-testing/rustfs_performance_test.sh \
|
./auto-testing/rustfs_performance_test.sh \
|
||||||
--step 5 -y \
|
--step 5 -y \
|
||||||
--warp-duration "${{ inputs.warp_duration || '5m' }}" \
|
--log-file "${LOG_FILE}"
|
||||||
--warp-concurrency "${{ inputs.warp_concurrency || '64' }}" \
|
|
||||||
--log-file /tmp/rustfs-perf-test.log
|
|
||||||
|
|
||||||
- name: Analyze results
|
- name: Analyze results
|
||||||
if: ${{ steps.benchmark.conclusion == 'success' }}
|
if: ${{ steps.benchmark.conclusion == 'success' }}
|
||||||
run: |
|
run: |
|
||||||
./auto-testing/rustfs_performance_test.sh --step 6 -y
|
export WARP_METHODS="${RUSTFS_WARP_METHODS}" WARP_SIZES="${RUSTFS_WARP_SIZES}"
|
||||||
|
export WARP_DURATION="${RUSTFS_WARP_DURATION}" WARP_CONCURRENCY="${RUSTFS_WARP_CONCURRENCY}"
|
||||||
|
./auto-testing/rustfs_performance_test.sh --step 6 -y --log-file "${LOG_FILE:-/dev/null}"
|
||||||
|
|
||||||
- name: Collect RustFS version info
|
- name: Collect RustFS version info
|
||||||
if: ${{ steps.benchmark.conclusion == 'success' }}
|
if: ${{ steps.benchmark.conclusion == 'success' }}
|
||||||
env:
|
|
||||||
VERSION_FILE: /tmp/rustfs-version.txt
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
read -r -a NODES <<< "${RUSTFS_NODES}"
|
read -r -a NODES <<< "${RUSTFS_NODES}"
|
||||||
@@ -186,7 +196,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
||||||
RESULT_DIR: ${{ env.RUSTFS_RESULT_DIR }}
|
RESULT_DIR: ${{ env.RUSTFS_RESULT_DIR }}
|
||||||
VERSION_FILE: /tmp/rustfs-version.txt
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
if [ -z "${GH_TOKEN:-}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
@@ -194,7 +203,7 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
SUMMARY="${RESULT_DIR}/summary.md"
|
SUMMARY="${RESULT_DIR}/summary.md"
|
||||||
[ -f "${SUMMARY}" ] || { echo "summary.md not found at ${SUMMARY}"; exit 1; }
|
[ -s "${SUMMARY}" ] || { echo "summary.md not found at ${SUMMARY}"; exit 1; }
|
||||||
DATE="$(date -u +%Y-%m-%d)"
|
DATE="$(date -u +%Y-%m-%d)"
|
||||||
REPORT_PATH="reports/${DATE}.md"
|
REPORT_PATH="reports/${DATE}.md"
|
||||||
{
|
{
|
||||||
@@ -202,6 +211,8 @@ jobs:
|
|||||||
echo ""
|
echo ""
|
||||||
echo "- **Date**: ${DATE}"
|
echo "- **Date**: ${DATE}"
|
||||||
echo "- **Run**: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
echo "- **Run**: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
|
echo "- **Attempt**: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- **Workflow Commit**: ${GITHUB_SHA}"
|
||||||
echo "- **Trigger**: ${{ github.event_name }}"
|
echo "- **Trigger**: ${{ github.event_name }}"
|
||||||
echo "- **Package**: ${{ inputs.package_url || 'nightly (R2 latest)' }}"
|
echo "- **Package**: ${{ inputs.package_url || 'nightly (R2 latest)' }}"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -211,8 +222,8 @@ jobs:
|
|||||||
echo '```text'
|
echo '```text'
|
||||||
cat "${VERSION_FILE}"
|
cat "${VERSION_FILE}"
|
||||||
echo '```'
|
echo '```'
|
||||||
} > /tmp/rustfs-perf-report.md
|
} > "${REPORT_FILE}"
|
||||||
CONTENT="$(python3 -c 'import base64; print(base64.b64encode(open("/tmp/rustfs-perf-report.md","rb").read()).decode())')"
|
CONTENT="$(python3 -c 'import base64,sys; print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}")"
|
||||||
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
||||||
if [ -n "${SHA}" ]; then
|
if [ -n "${SHA}" ]; then
|
||||||
jq -n --arg msg "report: ${DATE}" --arg content "${CONTENT}" --arg sha "${SHA}" \
|
jq -n --arg msg "report: ${DATE}" --arg content "${CONTENT}" --arg sha "${SHA}" \
|
||||||
@@ -231,11 +242,10 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
EVIDENCE_OUTCOME: ${{ steps.evidence.outcome }}
|
||||||
SUITE: 'performance'
|
SUITE: 'performance'
|
||||||
SUITE_LABEL: 'Performance'
|
SUITE_LABEL: 'Performance'
|
||||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
REPORT_FILE: '/tmp/rustfs-perf-report.md'
|
|
||||||
LOG_FILE: '/tmp/rustfs-perf-test.log'
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
if [ -z "${GH_TOKEN:-}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
@@ -263,14 +273,16 @@ jobs:
|
|||||||
echo ""
|
echo ""
|
||||||
echo "- Suite: \`${SUITE}\`"
|
echo "- Suite: \`${SUITE}\`"
|
||||||
echo "- Run: ${RUN_URL}"
|
echo "- Run: ${RUN_URL}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
||||||
echo "- Date: $(date -u +%Y-%m-%d)"
|
echo "- Date: $(date -u +%Y-%m-%d)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "## Report (errors and symptoms)"
|
echo "## Report (errors and symptoms)"
|
||||||
echo ""
|
echo ""
|
||||||
if [ -s "${REPORT_FILE}" ]; then
|
if [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${REPORT_FILE}" ]; then
|
||||||
redact < "${REPORT_FILE}"
|
redact < "${REPORT_FILE}"
|
||||||
elif [ -s "${LOG_FILE:-}" ]; then
|
elif [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${LOG_FILE:-}" ]; then
|
||||||
echo "(report file missing; log tail below)"
|
echo "(report file missing; log tail below)"
|
||||||
echo ""
|
echo ""
|
||||||
tail -n 200 "${LOG_FILE}" | redact
|
tail -n 200 "${LOG_FILE}" | redact
|
||||||
@@ -286,20 +298,26 @@ jobs:
|
|||||||
echo "filed backlog issue for suite ${SUITE}"
|
echo "filed backlog issue for suite ${SUITE}"
|
||||||
|
|
||||||
- name: Upload test logs & results
|
- name: Upload test logs & results
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
with:
|
with:
|
||||||
name: rustfs-perf-test-${{ github.run_id }}
|
name: rustfs-perf-test-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
path: |
|
path: |
|
||||||
/tmp/rustfs-perf-test*.log
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/report.md
|
||||||
/tmp/rustfs-perf-results/**
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/suite.log
|
||||||
/tmp/rustfs-version.txt
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/version.txt
|
||||||
if-no-files-found: warn
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/master.log
|
||||||
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/summary.md
|
||||||
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/summary.tsv
|
||||||
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/get_*.txt
|
||||||
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/put_*.txt
|
||||||
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/results/mixed_*.txt
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Reset test environment (after)
|
- name: Reset test environment (after)
|
||||||
if: ${{ always() && inputs.cleanup_after != 'false' }}
|
if: ${{ always() && inputs.cleanup_after != 'false' }}
|
||||||
run: |
|
run: |
|
||||||
./auto-testing/rustfs_performance_test.sh --step 7 -y
|
./auto-testing/rustfs_performance_test.sh --step 7 -y --log-file "${LOG_FILE:-/dev/null}"
|
||||||
|
|
||||||
- name: Notify on failure
|
- name: Notify on failure
|
||||||
if: failure()
|
if: failure()
|
||||||
|
|||||||
@@ -76,9 +76,6 @@ jobs:
|
|||||||
pool-expansion-test:
|
pool-expansion-test:
|
||||||
name: Pool expansion / decommission test
|
name: Pool expansion / decommission test
|
||||||
runs-on: smoke-testing
|
runs-on: smoke-testing
|
||||||
# Requirement: a failing suite must not fail the workflow; failures
|
|
||||||
# are filed to rustfs/backlog and the chain continues.
|
|
||||||
continue-on-error: true
|
|
||||||
timeout-minutes: 360
|
timeout-minutes: 360
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
||||||
env:
|
env:
|
||||||
@@ -380,6 +377,60 @@ jobs:
|
|||||||
else
|
else
|
||||||
PACKAGE_SOURCE="${RUSTFS_NIGHTLY_PACKAGE_URL}"
|
PACKAGE_SOURCE="${RUSTFS_NIGHTLY_PACKAGE_URL}"
|
||||||
fi
|
fi
|
||||||
|
STEPS_TABLE="${POOL_ARTIFACT_DIR}/pool-steps.md"
|
||||||
|
python3 - "${LOG_FILE}" "${STEPS_TABLE}" <<'PY'
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
log_file, out_file = sys.argv[1], sys.argv[2]
|
||||||
|
ansi = re.compile(r'\x1b\[[0-9;]*m')
|
||||||
|
step_re = re.compile(r'^\[POOL-STEP\]\s+(\d+)\s+(.+?)\s+(PASS|FAIL|SKIP)\s*$')
|
||||||
|
ver_re = re.compile(r'^\[POOL-VERSION\]\s+(\S+)(?:\s+\(node\s+(\S+)\))?\s*$')
|
||||||
|
result_re = re.compile(r'^\[POOL-RESULT\]\s+(PASS|FAIL)\s+(.*)$')
|
||||||
|
|
||||||
|
steps = {}
|
||||||
|
order = []
|
||||||
|
version = None
|
||||||
|
version_node = None
|
||||||
|
verdict = None
|
||||||
|
verdict_detail = ''
|
||||||
|
try:
|
||||||
|
with open(log_file, 'r', encoding='utf-8', errors='replace') as fh:
|
||||||
|
for raw in fh:
|
||||||
|
line = ansi.sub('', raw).strip()
|
||||||
|
m = step_re.match(line)
|
||||||
|
if m:
|
||||||
|
n, desc, status = m.group(1), m.group(2), m.group(3)
|
||||||
|
if n not in steps:
|
||||||
|
order.append(n)
|
||||||
|
steps[n] = (desc, status) # later lines win (fail after pass)
|
||||||
|
continue
|
||||||
|
m = ver_re.match(line)
|
||||||
|
if m:
|
||||||
|
version, version_node = m.group(1), m.group(2)
|
||||||
|
continue
|
||||||
|
m = result_re.match(line)
|
||||||
|
if m:
|
||||||
|
verdict, verdict_detail = m.group(1), m.group(2)
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
with open(out_file, 'w', encoding='utf-8') as out:
|
||||||
|
out.write('## Step Results\n\n')
|
||||||
|
if version:
|
||||||
|
node_note = f' (captured via `rustfs --version` on {version_node})' if version_node else ''
|
||||||
|
out.write(f'- Version under test: **{version}**{node_note}\n')
|
||||||
|
if verdict:
|
||||||
|
out.write(f'- Overall result: **{verdict}** — {verdict_detail}\n')
|
||||||
|
out.write('\n')
|
||||||
|
out.write('| Step | Description | Result |\n')
|
||||||
|
out.write('| --- | --- | --- |\n')
|
||||||
|
for n in sorted(order, key=int):
|
||||||
|
desc, status = steps[n]
|
||||||
|
out.write(f'| {n} | {desc} | {status} |\n')
|
||||||
|
if not order:
|
||||||
|
out.write('| - | - | NOT RUN (no step result lines found) |\n')
|
||||||
|
PY
|
||||||
{
|
{
|
||||||
echo "# RustFS pool expansion test report"
|
echo "# RustFS pool expansion test report"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -389,6 +440,8 @@ jobs:
|
|||||||
echo "- Warp concurrent: ${{ inputs.warp_concurrent || '32' }}"
|
echo "- Warp concurrent: ${{ inputs.warp_concurrent || '32' }}"
|
||||||
echo "- Test Step Outcome: ${{ steps.pool_test.outcome }}"
|
echo "- Test Step Outcome: ${{ steps.pool_test.outcome }}"
|
||||||
echo ""
|
echo ""
|
||||||
|
cat "${STEPS_TABLE}" || true
|
||||||
|
echo ""
|
||||||
echo "## Log tail"
|
echo "## Log tail"
|
||||||
echo '```text'
|
echo '```text'
|
||||||
tail -n 200 "${LOG_FILE}" || true
|
tail -n 200 "${LOG_FILE}" || true
|
||||||
@@ -486,17 +539,22 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
DATE="$(date -u +%Y-%m-%d)"
|
DATE="$(date -u +%Y-%m-%d)"
|
||||||
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
||||||
CONTENT="$(python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}")"
|
# Base64-encode the report into a temp file and feed it to jq via
|
||||||
|
# --rawfile: large reports (e.g. pool) exceed the OS argv limit and
|
||||||
|
# make `jq --arg content "${CONTENT}"` fail with "Argument list too long".
|
||||||
|
B64_FILE="$(mktemp)"
|
||||||
|
python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}" > "${B64_FILE}"
|
||||||
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
||||||
if [ -n "${SHA}" ]; then
|
if [ -n "${SHA}" ]; then
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" --arg sha "${SHA}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" --arg sha "${SHA}" \
|
||||||
'{message:$msg, content:$content, sha:$sha}' \
|
'{message:$msg, content:($content|rtrimstr("\n")), sha:$sha}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
else
|
else
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" \
|
||||||
'{message:$msg, content:$content}' \
|
'{message:$msg, content:($content|rtrimstr("\n"))}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
fi
|
fi
|
||||||
|
rm -f "${B64_FILE}"
|
||||||
|
|
||||||
- name: File failure issue in rustfs/backlog
|
- name: File failure issue in rustfs/backlog
|
||||||
if: ${{ always() && (failure() || steps.pool_test.outcome == 'failure' || steps.pool_test.outcome == 'cancelled') }}
|
if: ${{ always() && (failure() || steps.pool_test.outcome == 'failure' || steps.pool_test.outcome == 'cancelled') }}
|
||||||
@@ -605,7 +663,7 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
if [ -z "${{GH_TOKEN:-}}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -614,31 +672,31 @@ jobs:
|
|||||||
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
||||||
-f event_type='rustfs-chain-security' \
|
-f event_type='rustfs-chain-security' \
|
||||||
-F 'client_payload[from_suite]=pool'; then
|
-F 'client_payload[from_suite]=pool'; then
|
||||||
echo "dispatched next suite Security (attempt ${{attempt}})"
|
echo "dispatched next suite Security (attempt ${attempt})"
|
||||||
DISPATCHED=1
|
DISPATCHED=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "dispatch attempt ${{attempt}} failed; retrying in ${{attempt}}0s" >&2
|
echo "dispatch attempt ${attempt} failed; retrying in ${attempt}0s" >&2
|
||||||
sleep "${{attempt}}0"
|
sleep "${attempt}0"
|
||||||
done
|
done
|
||||||
if [ "${{DISPATCHED:-0}}" -ne 1 ]; then
|
if [ "${DISPATCHED:-0}" -ne 1 ]; then
|
||||||
echo "ERROR: functional chain stalled: could not dispatch Security after 3 attempts" >&2
|
echo "ERROR: functional chain stalled: could not dispatch Security after 3 attempts" >&2
|
||||||
TITLE="[functional][chain] stalled after pool (run ${{GITHUB_RUN_ID}})"
|
TITLE="[functional][chain] stalled after pool (run ${GITHUB_RUN_ID})"
|
||||||
BODY_FILE="$(mktemp)"
|
BODY_FILE="$(mktemp)"
|
||||||
{
|
{
|
||||||
echo "The functional chain could not hand off from **pool** to **Security** after 3 attempts."
|
echo "The functional chain could not hand off from **pool** to **Security** after 3 attempts."
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Failed suite job: ${{GITHUB_SERVER_URL}}/${{GITHUB_REPOSITORY}}/actions/runs/${{GITHUB_RUN_ID}}"
|
echo "- Failed suite job: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||||
echo "- Expected next event: `rustfs-chain-security`"
|
echo "- Expected next event: 'rustfs-chain-security'"
|
||||||
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
||||||
echo "- Recovery: re-dispatch manually with"
|
echo "- Recovery: re-dispatch manually with"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-security'"
|
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-security'"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
} > "${{BODY_FILE}}"
|
} > "${BODY_FILE}"
|
||||||
gh issue create -R rustfs/backlog --title "${{TITLE}}" \
|
gh issue create -R rustfs/backlog --title "${TITLE}" \
|
||||||
--body-file "${{BODY_FILE}}" --label functional-test \
|
--body-file "${BODY_FILE}" --label functional-test \
|
||||||
|| gh issue create -R rustfs/backlog --title "${{TITLE}}" --body-file "${{BODY_FILE}}" \
|
|| gh issue create -R rustfs/backlog --title "${TITLE}" --body-file "${BODY_FILE}" \
|
||||||
|| echo "could not file the stall alert issue either; check the token" >&2
|
|| echo "could not file the stall alert issue either; check the token" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -0,0 +1,382 @@
|
|||||||
|
# Copyright 2024 RustFS Team
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
name: RustFS Replication Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
rustfs_version:
|
||||||
|
description: 'RustFS release tag to test (e.g. 1.0.0-rc.4-preview.1)'
|
||||||
|
required: false
|
||||||
|
default: '1.0.0-rc.4-preview.1'
|
||||||
|
package_url:
|
||||||
|
description: 'Direct .deb URL (nightly/R2/dev). Overrides rustfs_version.'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
suite:
|
||||||
|
description: 'Suite to run (all = bucket REP-* then site SITE-*)'
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- all
|
||||||
|
- bucket
|
||||||
|
- site
|
||||||
|
default: all
|
||||||
|
repository_dispatch:
|
||||||
|
# Chain handoff: dispatched when the security suite finishes.
|
||||||
|
types: [rustfs-chain-replication]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
# The replication suite uses the same shared VMs as the other functional
|
||||||
|
# tests, so it must serialize with them instead of running in parallel.
|
||||||
|
concurrency:
|
||||||
|
group: rustfs-shared-functional-tests
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
env:
|
||||||
|
RUSTFS_ACCESS_KEY: ${{ secrets.RUSTFS_ACCESS_KEY }}
|
||||||
|
RUSTFS_SECRET_KEY: ${{ secrets.RUSTFS_SECRET_KEY }}
|
||||||
|
RUSTFS_NODES: ${{ secrets.RUSTFS_NODES || vars.RUSTFS_NODES }}
|
||||||
|
RUSTFS_SSH_USER: ${{ secrets.RUSTFS_SSH_USER || vars.RUSTFS_SSH_USER }}
|
||||||
|
RUSTFS_NIGHTLY_PACKAGE_URL: ${{ vars.RUSTFS_NIGHTLY_PACKAGE_URL || 'https://dl.rustfs.com/artifacts/rustfs/packages/nightly/rustfs-nightly-latest.deb' }}
|
||||||
|
PF_TESTING_GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
replication-test:
|
||||||
|
runs-on: smoke-testing
|
||||||
|
timeout-minutes: 360
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository (for report parser)
|
||||||
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Initialize functional evidence
|
||||||
|
id: evidence
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
umask 077
|
||||||
|
FUNCTIONAL_ARTIFACTS_DIR="${RUNNER_TEMP}/rustfs-replication-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
mkdir -- "${FUNCTIONAL_ARTIFACTS_DIR}" "${FUNCTIONAL_ARTIFACTS_DIR}-scratch"
|
||||||
|
{
|
||||||
|
printf 'FUNCTIONAL_ARTIFACTS_DIR=%s\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'LOG_FILE=%s/suite.log\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'REPORT_FILE=%s/report.md\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'TMPDIR=%s-scratch\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
} >> "${GITHUB_ENV}"
|
||||||
|
|
||||||
|
# auto-testing is private: clone it with the dedicated PF token (not
|
||||||
|
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
||||||
|
- name: Checkout auto-testing scripts (with retry)
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
rm -rf auto-testing
|
||||||
|
for attempt in 1 2 3 4 5; do
|
||||||
|
if gh repo clone rustfs/auto-testing auto-testing -- --depth 1 --quiet; then
|
||||||
|
echo "auto-testing cloned (attempt ${attempt})"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
rm -rf auto-testing
|
||||||
|
echo "clone attempt ${attempt} failed; retrying in $((attempt * 15))s" >&2
|
||||||
|
sleep $((attempt * 15))
|
||||||
|
done
|
||||||
|
echo "ERROR: unable to clone rustfs/auto-testing after 5 attempts" >&2
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
- name: Show environment
|
||||||
|
run: |
|
||||||
|
uname -a
|
||||||
|
jq --version
|
||||||
|
openssl version
|
||||||
|
aws --version
|
||||||
|
df -h /data | tail -1 || true
|
||||||
|
|
||||||
|
- name: Cleanup environment (before)
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
read -r -a NODES <<< "${RUSTFS_NODES:-vm000 vm001 vm002}"
|
||||||
|
SSH_USER="${RUSTFS_SSH_USER:-azureuser}"
|
||||||
|
for node in "${NODES[@]}"; do
|
||||||
|
ssh -o BatchMode=yes -o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new "${SSH_USER}@${node}" '
|
||||||
|
set -euo pipefail
|
||||||
|
SUDO=""; [ "$(id -u)" -ne 0 ] && SUDO="sudo -n"
|
||||||
|
${SUDO} systemctl stop rustfs rustfs-rep2 2>/dev/null || true
|
||||||
|
if ${SUDO} dpkg -l rustfs 2>/dev/null | grep -q "^ii"; then
|
||||||
|
${SUDO} dpkg -P rustfs
|
||||||
|
fi
|
||||||
|
for i in 1 2 3 4; do ${SUDO} rm -rf /data/rustfs${i}/mnmd; done
|
||||||
|
${SUDO} rm -rf /data/rustfs-rep2 /var/log/rustfs /var/log/rustfs-rep2 /var/lib/rustfs/kms
|
||||||
|
'
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Run replication suite
|
||||||
|
id: test
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
chmod +x auto-testing/rustfs-replication-test.sh
|
||||||
|
PACKAGE_URL='${{ inputs.package_url }}'
|
||||||
|
RUSTFS_VERSION='${{ inputs.rustfs_version }}'
|
||||||
|
SUITE='${{ inputs.suite }}'
|
||||||
|
ARGS=(-y --log-file "${LOG_FILE}")
|
||||||
|
if [ "${SUITE}" = "all" ] || [ -z "${SUITE}" ] || [ "${SUITE}" = "null" ]; then
|
||||||
|
ARGS+=(--suite all)
|
||||||
|
else
|
||||||
|
ARGS+=(--suite "${SUITE}")
|
||||||
|
fi
|
||||||
|
if [ -n "${PACKAGE_URL}" ]; then
|
||||||
|
ARGS+=(--package-url "${PACKAGE_URL}")
|
||||||
|
elif [ -n "${RUSTFS_VERSION}" ] && [ "${RUSTFS_VERSION}" != "null" ]; then
|
||||||
|
ARGS+=(--version "${RUSTFS_VERSION}")
|
||||||
|
else
|
||||||
|
ARGS+=(--package-url "${RUSTFS_NIGHTLY_PACKAGE_URL}")
|
||||||
|
fi
|
||||||
|
./auto-testing/rustfs-replication-test.sh "${ARGS[@]}"
|
||||||
|
|
||||||
|
- name: Generate report
|
||||||
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
PACKAGE_URL='${{ inputs.package_url }}'
|
||||||
|
RUSTFS_VERSION='${{ inputs.rustfs_version }}'
|
||||||
|
if [ -n "${PACKAGE_URL}" ]; then
|
||||||
|
PACKAGE_SOURCE="${PACKAGE_URL}"
|
||||||
|
elif [ -n "${RUSTFS_VERSION}" ] && [ "${RUSTFS_VERSION}" != "null" ]; then
|
||||||
|
PACKAGE_SOURCE="version ${RUSTFS_VERSION}"
|
||||||
|
else
|
||||||
|
PACKAGE_SOURCE="${RUSTFS_NIGHTLY_PACKAGE_URL}"
|
||||||
|
fi
|
||||||
|
read -r -a NODES <<< "${RUSTFS_NODES:-vm000 vm001 vm002}"
|
||||||
|
SSH_USER="${RUSTFS_SSH_USER:-azureuser}"
|
||||||
|
RUSTFS_VERSION_INFO="N/A"
|
||||||
|
if [ "${#NODES[@]}" -gt 0 ]; then
|
||||||
|
DETECTED_VERSION="$(ssh -o BatchMode=yes -o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new \
|
||||||
|
"${SSH_USER}@${NODES[0]}" 'rustfs --version' 2>/dev/null | tr -d '\r' | head -n 1 || true)"
|
||||||
|
if [ -n "${DETECTED_VERSION}" ]; then
|
||||||
|
RUSTFS_VERSION_INFO="${DETECTED_VERSION}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
CASE_TABLE="${FUNCTIONAL_ARTIFACTS_DIR}/cases.md"
|
||||||
|
CASE_RESULT=success
|
||||||
|
python3 scripts/functional_case_report.py "${LOG_FILE}" "${CASE_TABLE}" || CASE_RESULT=failure
|
||||||
|
RESULT=failure
|
||||||
|
if [ '${{ steps.test.outcome }}' = 'success' ] && [ "${CASE_RESULT}" = 'success' ]; then
|
||||||
|
RESULT=success
|
||||||
|
fi
|
||||||
|
{
|
||||||
|
echo "# RustFS replication test report"
|
||||||
|
echo ""
|
||||||
|
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
|
echo "- Trigger: ${{ github.event_name }}"
|
||||||
|
echo "- Package: ${PACKAGE_SOURCE}"
|
||||||
|
echo "- RustFS Version: ${RUSTFS_VERSION_INFO}"
|
||||||
|
echo "- Test Step Outcome: ${RESULT}"
|
||||||
|
echo "- Suite Step Outcome: ${{ steps.test.outcome }}"
|
||||||
|
echo ""
|
||||||
|
if [ "${RESULT}" = "success" ]; then
|
||||||
|
cat "${CASE_TABLE}"
|
||||||
|
echo ""
|
||||||
|
echo "## Log tail"
|
||||||
|
echo '```text'
|
||||||
|
tail -n 200 "${LOG_FILE}"
|
||||||
|
echo '```'
|
||||||
|
else
|
||||||
|
echo "The suite or evidence validation failed. See this run's artifact for partial case results and suite.log."
|
||||||
|
fi
|
||||||
|
} | tee "${REPORT_FILE}"
|
||||||
|
cat "${REPORT_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
||||||
|
[ "${RESULT}" = "success" ]
|
||||||
|
|
||||||
|
- name: Upload functional report to dashboard
|
||||||
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
||||||
|
SUITE: replication
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
|
echo "PF_TESTING_GH_TOKEN is not configured; skipping dashboard upload"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
DATE="$(date -u +%Y-%m-%d)"
|
||||||
|
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
||||||
|
# Base64-encode the report into a temp file and feed it to jq via
|
||||||
|
# --rawfile: large reports (e.g. pool) exceed the OS argv limit and
|
||||||
|
# make `jq --arg content "${CONTENT}"` fail with "Argument list too long".
|
||||||
|
B64_FILE="$(mktemp)"
|
||||||
|
python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}" > "${B64_FILE}"
|
||||||
|
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
||||||
|
if [ -n "${SHA}" ]; then
|
||||||
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" --arg sha "${SHA}" \
|
||||||
|
'{message:$msg, content:($content|rtrimstr("\n")), sha:$sha}' \
|
||||||
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
|
else
|
||||||
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" \
|
||||||
|
'{message:$msg, content:($content|rtrimstr("\n"))}' \
|
||||||
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
|
fi
|
||||||
|
rm -f "${B64_FILE}"
|
||||||
|
|
||||||
|
- name: File failure issue in rustfs/backlog
|
||||||
|
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
||||||
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
EVIDENCE_OUTCOME: ${{ steps.evidence.outcome }}
|
||||||
|
SUITE: 'replication'
|
||||||
|
SUITE_LABEL: 'Replication (bucket + site)'
|
||||||
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
|
echo "PF_TESTING_GH_TOKEN is not configured; skipping backlog issue"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
TITLE="[functional][${SUITE}] ${SUITE_LABEL} suite failed (run ${GITHUB_RUN_ID})"
|
||||||
|
EXISTING="$(gh issue list -R rustfs/backlog --state all \
|
||||||
|
--search "in:title \"run ${GITHUB_RUN_ID}\"" \
|
||||||
|
--json number --jq '.[].number' || true)"
|
||||||
|
if [ -n "${EXISTING}" ]; then
|
||||||
|
echo "backlog issue already exists for run ${GITHUB_RUN_ID}; skipping"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
redact() {
|
||||||
|
sed -E \
|
||||||
|
-e 's/(RUSTFS_(ACCESS_KEY|SECRET_KEY)[=: ]+)[^[:space:]]+/\1[REDACTED]/Ig' \
|
||||||
|
-e 's/(Authorization:).*/\1 [REDACTED]/Ig' \
|
||||||
|
-e 's/(X-Amz-Signature=)[^&[:space:]]+/\1[REDACTED]/Ig' \
|
||||||
|
-e 's/^.*(password|secret|token)[=: ].*/[REDACTED SENSITIVE LINE]/Ig'
|
||||||
|
}
|
||||||
|
BODY_FILE="$(mktemp)"
|
||||||
|
{
|
||||||
|
echo "The **${SUITE_LABEL}** functional suite failed."
|
||||||
|
echo ""
|
||||||
|
echo "- Suite: \`${SUITE}\`"
|
||||||
|
echo "- Run: ${RUN_URL}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
|
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
||||||
|
echo "- Date: $(date -u +%Y-%m-%d)"
|
||||||
|
echo ""
|
||||||
|
echo "## Report (errors and symptoms)"
|
||||||
|
echo ""
|
||||||
|
if [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${REPORT_FILE}" ]; then
|
||||||
|
redact < "${REPORT_FILE}"
|
||||||
|
elif [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${LOG_FILE:-}" ]; then
|
||||||
|
echo "(report file missing; log tail below)"
|
||||||
|
echo ""
|
||||||
|
tail -n 200 "${LOG_FILE}" | redact
|
||||||
|
else
|
||||||
|
echo "(no report or log file was produced)"
|
||||||
|
fi
|
||||||
|
} | head -c 55000 > "${BODY_FILE}"
|
||||||
|
gh label create functional-test -R rustfs/backlog --color d73a4a 2>/dev/null || true
|
||||||
|
if ! gh issue create -R rustfs/backlog --title "${TITLE}" \
|
||||||
|
--body-file "${BODY_FILE}" --label functional-test; then
|
||||||
|
gh issue create -R rustfs/backlog --title "${TITLE}" --body-file "${BODY_FILE}"
|
||||||
|
fi
|
||||||
|
echo "filed backlog issue for suite ${SUITE}"
|
||||||
|
|
||||||
|
- name: Upload report and logs
|
||||||
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
|
with:
|
||||||
|
name: rustfs-replication-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
path: |
|
||||||
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/report.md
|
||||||
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/suite.log
|
||||||
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/cases.md
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Cleanup environment (after)
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
read -r -a NODES <<< "${RUSTFS_NODES:-vm000 vm001 vm002}"
|
||||||
|
SSH_USER="${RUSTFS_SSH_USER:-azureuser}"
|
||||||
|
for node in "${NODES[@]}"; do
|
||||||
|
ssh -o BatchMode=yes -o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new "${SSH_USER}@${node}" '
|
||||||
|
set -euo pipefail
|
||||||
|
SUDO=""; [ "$(id -u)" -ne 0 ] && SUDO="sudo -n"
|
||||||
|
${SUDO} systemctl stop rustfs rustfs-rep2 2>/dev/null || true
|
||||||
|
if ${SUDO} dpkg -l rustfs 2>/dev/null | grep -q "^ii"; then
|
||||||
|
${SUDO} dpkg -P rustfs
|
||||||
|
fi
|
||||||
|
for i in 1 2 3 4; do ${SUDO} rm -rf /data/rustfs${i}/mnmd; done
|
||||||
|
${SUDO} rm -rf /data/rustfs-rep2 /var/log/rustfs /var/log/rustfs-rep2
|
||||||
|
'
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: "Continue functional chain (next: Performance)"
|
||||||
|
if: ${{ always() && github.event_name == 'repository_dispatch' }}
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -uo pipefail
|
||||||
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
|
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
DISPATCHED=0
|
||||||
|
for attempt in 1 2 3; do
|
||||||
|
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
||||||
|
-f event_type='rustfs-chain-performance' \
|
||||||
|
-F 'client_payload[from_suite]=replication'; then
|
||||||
|
echo "dispatched next suite Performance (attempt ${attempt})"
|
||||||
|
DISPATCHED=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo "dispatch attempt ${attempt} failed; retrying in ${attempt}0s" >&2
|
||||||
|
sleep "${attempt}0"
|
||||||
|
done
|
||||||
|
if [ "${DISPATCHED:-0}" -ne 1 ]; then
|
||||||
|
echo "ERROR: functional chain stalled: could not dispatch Performance after 3 attempts" >&2
|
||||||
|
TITLE="[functional][chain] stalled after replication (run ${GITHUB_RUN_ID})"
|
||||||
|
BODY_FILE="$(mktemp)"
|
||||||
|
trap 'rm -f "${BODY_FILE}"' EXIT
|
||||||
|
{
|
||||||
|
echo "The functional chain could not hand off from **replication** to **Performance** after 3 attempts."
|
||||||
|
echo ""
|
||||||
|
echo "- Failed suite job: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||||
|
echo "- Expected next event: 'rustfs-chain-performance'"
|
||||||
|
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
||||||
|
echo "- Recovery: re-dispatch manually with"
|
||||||
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
|
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-performance'"
|
||||||
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
|
} > "${BODY_FILE}"
|
||||||
|
gh issue create -R rustfs/backlog --title "${TITLE}" \
|
||||||
|
--body-file "${BODY_FILE}" --label functional-test \
|
||||||
|
|| gh issue create -R rustfs/backlog --title "${TITLE}" --body-file "${BODY_FILE}" \
|
||||||
|
|| echo "could not file the stall alert issue either; check the token" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Notify on failure
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
echo "RustFS replication suite failed"
|
||||||
|
echo "Package source: ${{ inputs.package_url || inputs.rustfs_version || 'nightly (R2 latest)' }}"
|
||||||
|
echo "See the uploaded report and log artifacts for details."
|
||||||
@@ -37,10 +37,28 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
s3-compat-test:
|
s3-compat-test:
|
||||||
runs-on: smoke-testing
|
runs-on: smoke-testing
|
||||||
continue-on-error: true
|
|
||||||
timeout-minutes: 360
|
timeout-minutes: 360
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout repository (for report parser)
|
||||||
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Initialize functional evidence
|
||||||
|
id: evidence
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
umask 077
|
||||||
|
FUNCTIONAL_ARTIFACTS_DIR="${RUNNER_TEMP}/rustfs-s3-compat-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
mkdir -- "${FUNCTIONAL_ARTIFACTS_DIR}" "${FUNCTIONAL_ARTIFACTS_DIR}-scratch"
|
||||||
|
{
|
||||||
|
printf 'FUNCTIONAL_ARTIFACTS_DIR=%s\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'LOG_FILE=%s/suite.log\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'REPORT_FILE=%s/report.md\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'TMPDIR=%s-scratch\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
} >> "${GITHUB_ENV}"
|
||||||
|
|
||||||
# auto-testing is private: clone it with the dedicated PF token (not
|
# auto-testing is private: clone it with the dedicated PF token (not
|
||||||
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
||||||
- name: Checkout auto-testing scripts (with retry)
|
- name: Checkout auto-testing scripts (with retry)
|
||||||
@@ -88,9 +106,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Run S3 compatibility suite
|
- name: Run S3 compatibility suite
|
||||||
id: test
|
id: test
|
||||||
continue-on-error: true
|
|
||||||
env:
|
|
||||||
LOG_FILE: /tmp/rustfs-s3-compat.log
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
chmod +x auto-testing/rustfs-s3-compat-test.sh
|
chmod +x auto-testing/rustfs-s3-compat-test.sh
|
||||||
@@ -107,10 +122,7 @@ jobs:
|
|||||||
./auto-testing/rustfs-s3-compat-test.sh "${ARGS[@]}"
|
./auto-testing/rustfs-s3-compat-test.sh "${ARGS[@]}"
|
||||||
|
|
||||||
- name: Generate report
|
- name: Generate report
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
env:
|
|
||||||
LOG_FILE: /tmp/rustfs-s3-compat.log
|
|
||||||
REPORT_FILE: /tmp/rustfs-s3-compat-report.md
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
PACKAGE_URL='${{ inputs.package_url }}'
|
PACKAGE_URL='${{ inputs.package_url }}'
|
||||||
@@ -132,83 +144,44 @@ jobs:
|
|||||||
RUSTFS_VERSION_INFO="${DETECTED_VERSION}"
|
RUSTFS_VERSION_INFO="${DETECTED_VERSION}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
CASE_TABLE="/tmp/rustfs-s3-compat-cases.md"
|
CASE_TABLE="${FUNCTIONAL_ARTIFACTS_DIR}/cases.md"
|
||||||
python3 - "${LOG_FILE}" "${CASE_TABLE}" <<'PY'
|
CASE_RESULT=success
|
||||||
import re
|
python3 scripts/functional_case_report.py "${LOG_FILE}" "${CASE_TABLE}" || CASE_RESULT=failure
|
||||||
import sys
|
RESULT=failure
|
||||||
|
if [ '${{ steps.test.outcome }}' = 'success' ] && [ "${CASE_RESULT}" = 'success' ]; then
|
||||||
log_file, out_file = sys.argv[1], sys.argv[2]
|
RESULT=success
|
||||||
ansi = re.compile(r'\x1b\[[0-9;]*m')
|
fi
|
||||||
start_re = re.compile(r'^---\s+([A-Z0-9]+-[0-9]+)\s+(.+?)\s+---$')
|
|
||||||
done_re = re.compile(r'^\[(PASS|FAIL|UNSUPPORTED)\]\s+([A-Z0-9]+-[0-9]+)\b')
|
|
||||||
|
|
||||||
rows = []
|
|
||||||
index = {}
|
|
||||||
current = None
|
|
||||||
try:
|
|
||||||
with open(log_file, 'r', encoding='utf-8', errors='replace') as fh:
|
|
||||||
for raw in fh:
|
|
||||||
line = ansi.sub('', raw).strip()
|
|
||||||
m = start_re.match(line)
|
|
||||||
if m:
|
|
||||||
case_id, name = m.group(1), m.group(2)
|
|
||||||
current = case_id
|
|
||||||
if case_id not in index:
|
|
||||||
index[case_id] = len(rows)
|
|
||||||
rows.append([case_id, name, 'RUNNING'])
|
|
||||||
continue
|
|
||||||
m = done_re.match(line)
|
|
||||||
if m:
|
|
||||||
status, case_id = m.group(1), m.group(2)
|
|
||||||
if case_id in index:
|
|
||||||
rows[index[case_id]][2] = status
|
|
||||||
else:
|
|
||||||
rows.append([case_id, case_id, status])
|
|
||||||
index[case_id] = len(rows) - 1
|
|
||||||
current = None
|
|
||||||
except FileNotFoundError:
|
|
||||||
rows = []
|
|
||||||
|
|
||||||
counts = {'PASS': 0, 'FAIL': 0, 'UNSUPPORTED': 0, 'RUNNING': 0}
|
|
||||||
for _, _, status in rows:
|
|
||||||
counts[status] = counts.get(status, 0) + 1
|
|
||||||
|
|
||||||
with open(out_file, 'w', encoding='utf-8') as out:
|
|
||||||
out.write('## Case Summary\n\n')
|
|
||||||
out.write(f"- Total: {len(rows)}\\n")
|
|
||||||
out.write(f"- PASS: {counts.get('PASS', 0)}\\n")
|
|
||||||
out.write(f"- FAIL: {counts.get('FAIL', 0)}\\n")
|
|
||||||
out.write(f"- UNSUPPORTED: {counts.get('UNSUPPORTED', 0)}\\n")
|
|
||||||
out.write('\\n')
|
|
||||||
out.write('| Case | Name | Status |\\n')
|
|
||||||
out.write('| --- | --- | --- |\\n')
|
|
||||||
for case_id, name, status in rows:
|
|
||||||
out.write(f'| {case_id} | {name} | {status} |\\n')
|
|
||||||
PY
|
|
||||||
{
|
{
|
||||||
echo "# RustFS S3 compatibility test report"
|
echo "# RustFS S3 compatibility test report"
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
echo "- Trigger: ${{ github.event_name }}"
|
echo "- Trigger: ${{ github.event_name }}"
|
||||||
echo "- Package: ${PACKAGE_SOURCE}"
|
echo "- Package: ${PACKAGE_SOURCE}"
|
||||||
echo "- RustFS Version: ${RUSTFS_VERSION_INFO}"
|
echo "- RustFS Version: ${RUSTFS_VERSION_INFO}"
|
||||||
echo "- Test Step Outcome: ${{ steps.test.outcome }}"
|
echo "- Test Step Outcome: ${RESULT}"
|
||||||
|
echo "- Suite Step Outcome: ${{ steps.test.outcome }}"
|
||||||
echo ""
|
echo ""
|
||||||
cat "${CASE_TABLE}" || true
|
if [ "${RESULT}" = "success" ]; then
|
||||||
echo ""
|
cat "${CASE_TABLE}"
|
||||||
echo "## Log tail"
|
echo ""
|
||||||
echo '```text'
|
echo "## Log tail"
|
||||||
tail -n 200 "${LOG_FILE}" || true
|
echo '```text'
|
||||||
echo '```'
|
tail -n 200 "${LOG_FILE}"
|
||||||
|
echo '```'
|
||||||
|
else
|
||||||
|
echo "The suite or evidence validation failed. See this run's artifact for partial case results and suite.log."
|
||||||
|
fi
|
||||||
} | tee "${REPORT_FILE}"
|
} | tee "${REPORT_FILE}"
|
||||||
cat "${REPORT_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
cat "${REPORT_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
||||||
|
[ "${RESULT}" = "success" ]
|
||||||
|
|
||||||
- name: Upload functional report to dashboard
|
- name: Upload functional report to dashboard
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
||||||
REPORT_FILE: /tmp/rustfs-s3-compat-report.md
|
|
||||||
SUITE: s3
|
SUITE: s3
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -218,28 +191,32 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
DATE="$(date -u +%Y-%m-%d)"
|
DATE="$(date -u +%Y-%m-%d)"
|
||||||
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
||||||
CONTENT="$(python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}")"
|
# Base64-encode the report into a temp file and feed it to jq via
|
||||||
|
# --rawfile: large reports (e.g. pool) exceed the OS argv limit and
|
||||||
|
# make `jq --arg content "${CONTENT}"` fail with "Argument list too long".
|
||||||
|
B64_FILE="$(mktemp)"
|
||||||
|
python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}" > "${B64_FILE}"
|
||||||
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
||||||
if [ -n "${SHA}" ]; then
|
if [ -n "${SHA}" ]; then
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" --arg sha "${SHA}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" --arg sha "${SHA}" \
|
||||||
'{message:$msg, content:$content, sha:$sha}' \
|
'{message:$msg, content:($content|rtrimstr("\n")), sha:$sha}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
else
|
else
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" \
|
||||||
'{message:$msg, content:$content}' \
|
'{message:$msg, content:($content|rtrimstr("\n"))}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
fi
|
fi
|
||||||
|
rm -f "${B64_FILE}"
|
||||||
|
|
||||||
- name: File failure issue in rustfs/backlog
|
- name: File failure issue in rustfs/backlog
|
||||||
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
EVIDENCE_OUTCOME: ${{ steps.evidence.outcome }}
|
||||||
SUITE: 's3'
|
SUITE: 's3'
|
||||||
SUITE_LABEL: 'S3 compatibility'
|
SUITE_LABEL: 'S3 compatibility'
|
||||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
REPORT_FILE: '/tmp/rustfs-s3-compat-report.md'
|
|
||||||
LOG_FILE: '/tmp/rustfs-s3-compat.log'
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
if [ -z "${GH_TOKEN:-}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
@@ -267,14 +244,16 @@ jobs:
|
|||||||
echo ""
|
echo ""
|
||||||
echo "- Suite: \`${SUITE}\`"
|
echo "- Suite: \`${SUITE}\`"
|
||||||
echo "- Run: ${RUN_URL}"
|
echo "- Run: ${RUN_URL}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
||||||
echo "- Date: $(date -u +%Y-%m-%d)"
|
echo "- Date: $(date -u +%Y-%m-%d)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "## Report (errors and symptoms)"
|
echo "## Report (errors and symptoms)"
|
||||||
echo ""
|
echo ""
|
||||||
if [ -s "${REPORT_FILE}" ]; then
|
if [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${REPORT_FILE}" ]; then
|
||||||
redact < "${REPORT_FILE}"
|
redact < "${REPORT_FILE}"
|
||||||
elif [ -s "${LOG_FILE:-}" ]; then
|
elif [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${LOG_FILE:-}" ]; then
|
||||||
echo "(report file missing; log tail below)"
|
echo "(report file missing; log tail below)"
|
||||||
echo ""
|
echo ""
|
||||||
tail -n 200 "${LOG_FILE}" | redact
|
tail -n 200 "${LOG_FILE}" | redact
|
||||||
@@ -290,14 +269,15 @@ jobs:
|
|||||||
echo "filed backlog issue for suite ${SUITE}"
|
echo "filed backlog issue for suite ${SUITE}"
|
||||||
|
|
||||||
- name: Upload report and logs
|
- name: Upload report and logs
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
with:
|
with:
|
||||||
name: rustfs-s3-compat-${{ github.run_id }}
|
name: rustfs-s3-compat-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
path: |
|
path: |
|
||||||
/tmp/rustfs-s3-compat.log
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/report.md
|
||||||
/tmp/rustfs-s3-compat-report.md
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/suite.log
|
||||||
if-no-files-found: warn
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/cases.md
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Cleanup environment (after)
|
- name: Cleanup environment (after)
|
||||||
if: always()
|
if: always()
|
||||||
@@ -329,7 +309,7 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
if [ -z "${{GH_TOKEN:-}}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -338,31 +318,31 @@ jobs:
|
|||||||
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
||||||
-f event_type='rustfs-chain-kms' \
|
-f event_type='rustfs-chain-kms' \
|
||||||
-F 'client_payload[from_suite]=s3'; then
|
-F 'client_payload[from_suite]=s3'; then
|
||||||
echo "dispatched next suite KMS (attempt ${{attempt}})"
|
echo "dispatched next suite KMS (attempt ${attempt})"
|
||||||
DISPATCHED=1
|
DISPATCHED=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "dispatch attempt ${{attempt}} failed; retrying in ${{attempt}}0s" >&2
|
echo "dispatch attempt ${attempt} failed; retrying in ${attempt}0s" >&2
|
||||||
sleep "${{attempt}}0"
|
sleep "${attempt}0"
|
||||||
done
|
done
|
||||||
if [ "${{DISPATCHED:-0}}" -ne 1 ]; then
|
if [ "${DISPATCHED:-0}" -ne 1 ]; then
|
||||||
echo "ERROR: functional chain stalled: could not dispatch KMS after 3 attempts" >&2
|
echo "ERROR: functional chain stalled: could not dispatch KMS after 3 attempts" >&2
|
||||||
TITLE="[functional][chain] stalled after s3 (run ${{GITHUB_RUN_ID}})"
|
TITLE="[functional][chain] stalled after s3 (run ${GITHUB_RUN_ID})"
|
||||||
BODY_FILE="$(mktemp)"
|
BODY_FILE="$(mktemp)"
|
||||||
{
|
{
|
||||||
echo "The functional chain could not hand off from **s3** to **KMS** after 3 attempts."
|
echo "The functional chain could not hand off from **s3** to **KMS** after 3 attempts."
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Failed suite job: ${{GITHUB_SERVER_URL}}/${{GITHUB_REPOSITORY}}/actions/runs/${{GITHUB_RUN_ID}}"
|
echo "- Failed suite job: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||||
echo "- Expected next event: `rustfs-chain-kms`"
|
echo "- Expected next event: 'rustfs-chain-kms'"
|
||||||
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
||||||
echo "- Recovery: re-dispatch manually with"
|
echo "- Recovery: re-dispatch manually with"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-kms'"
|
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-kms'"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
} > "${{BODY_FILE}}"
|
} > "${BODY_FILE}"
|
||||||
gh issue create -R rustfs/backlog --title "${{TITLE}}" \
|
gh issue create -R rustfs/backlog --title "${TITLE}" \
|
||||||
--body-file "${{BODY_FILE}}" --label functional-test \
|
--body-file "${BODY_FILE}" --label functional-test \
|
||||||
|| gh issue create -R rustfs/backlog --title "${{TITLE}}" --body-file "${{BODY_FILE}}" \
|
|| gh issue create -R rustfs/backlog --title "${TITLE}" --body-file "${BODY_FILE}" \
|
||||||
|| echo "could not file the stall alert issue either; check the token" >&2
|
|| echo "could not file the stall alert issue either; check the token" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
# Chain handoff: dispatched when the pool expansion suite finishes (last link).
|
# Chain handoff: dispatched when the pool expansion suite finishes.
|
||||||
types: [rustfs-chain-security]
|
types: [rustfs-chain-security]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -74,10 +74,27 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
security-test:
|
security-test:
|
||||||
runs-on: smoke-testing
|
runs-on: smoke-testing
|
||||||
continue-on-error: true
|
|
||||||
timeout-minutes: 360
|
timeout-minutes: 360
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
|
# Checkout the repository into its own subdirectory. Checking out at
|
||||||
|
# the workspace root would wipe the auto-testing clone above (that is
|
||||||
|
# exactly how run 33934141181 lost rustfs-security-test.sh).
|
||||||
|
- name: Checkout repository (for the OIDC live gate script)
|
||||||
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
path: rustfs-repo
|
||||||
|
|
||||||
|
- name: Initialize security evidence
|
||||||
|
id: evidence
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
umask 077
|
||||||
|
SECURITY_ARTIFACTS_DIR="${RUNNER_TEMP}/rustfs-security-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
mkdir -- "${SECURITY_ARTIFACTS_DIR}" "${SECURITY_ARTIFACTS_DIR}-scratch"
|
||||||
|
printf 'SECURITY_ARTIFACTS_DIR=%s\n' "${SECURITY_ARTIFACTS_DIR}" >> "${GITHUB_ENV}"
|
||||||
|
|
||||||
# auto-testing is private: clone it with the dedicated PF token (not
|
# auto-testing is private: clone it with the dedicated PF token (not
|
||||||
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
||||||
- name: Checkout auto-testing scripts (with retry)
|
- name: Checkout auto-testing scripts (with retry)
|
||||||
@@ -98,11 +115,6 @@ jobs:
|
|||||||
echo "ERROR: unable to clone rustfs/auto-testing after 5 attempts" >&2
|
echo "ERROR: unable to clone rustfs/auto-testing after 5 attempts" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
- name: Checkout repository (for the OIDC live gate script)
|
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Show environment
|
- name: Show environment
|
||||||
run: |
|
run: |
|
||||||
uname -a
|
uname -a
|
||||||
@@ -135,8 +147,9 @@ jobs:
|
|||||||
id: test
|
id: test
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
REPORT_FILE: /tmp/rustfs-security-report.md
|
REPORT_FILE: ${{ env.SECURITY_ARTIFACTS_DIR }}/suite-report.md
|
||||||
RUSTFS_SECURITY_OIDC_LIVE_SCRIPT: ${{ github.workspace }}/scripts/test/oidc_keycloak_live.sh
|
TMPDIR: ${{ env.SECURITY_ARTIFACTS_DIR }}-scratch
|
||||||
|
RUSTFS_SECURITY_OIDC_LIVE_SCRIPT: ${{ github.workspace }}/rustfs-repo/scripts/test/oidc_keycloak_live.sh
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
chmod +x auto-testing/rustfs-security-test.sh
|
chmod +x auto-testing/rustfs-security-test.sh
|
||||||
@@ -159,29 +172,48 @@ jobs:
|
|||||||
else
|
else
|
||||||
ARGS+=(--package-url "${RUSTFS_NIGHTLY_PACKAGE_URL}")
|
ARGS+=(--package-url "${RUSTFS_NIGHTLY_PACKAGE_URL}")
|
||||||
fi
|
fi
|
||||||
./auto-testing/rustfs-security-test.sh "${ARGS[@]}"
|
GITHUB_STEP_SUMMARY=/dev/null ./auto-testing/rustfs-security-test.sh "${ARGS[@]}" 2>&1 | tee "${SECURITY_ARTIFACTS_DIR}/suite.log"
|
||||||
|
|
||||||
- name: Generate report
|
- name: Generate report
|
||||||
if: always()
|
id: report
|
||||||
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
|
env:
|
||||||
|
TEST_OUTCOME: ${{ steps.test.outcome }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
if [ ! -f /tmp/rustfs-security-report.md ]; then
|
RESULT=failure
|
||||||
{
|
if [ "${TEST_OUTCOME}" = "success" ] && [ -s "${SECURITY_ARTIFACTS_DIR}/suite-report.md" ]; then
|
||||||
echo "# RustFS security test report"
|
RESULT=success
|
||||||
echo ""
|
|
||||||
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
||||||
echo "- Trigger: ${{ github.event_name }}"
|
|
||||||
echo "- Test Step Outcome: failure (suite did not produce a report)"
|
|
||||||
} > /tmp/rustfs-security-report.md
|
|
||||||
fi
|
fi
|
||||||
cat /tmp/rustfs-security-report.md >> "${GITHUB_STEP_SUMMARY}"
|
{
|
||||||
|
echo "# RustFS security test report"
|
||||||
|
echo ""
|
||||||
|
echo "- Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
|
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
||||||
|
echo "- Test Step Outcome: ${RESULT}"
|
||||||
|
echo "- Suite Step Outcome: ${TEST_OUTCOME}"
|
||||||
|
echo ""
|
||||||
|
# The dashboard prioritizes case rows over the step outcome.
|
||||||
|
# Keep partial case results in the artifact when the suite fails.
|
||||||
|
if [ "${RESULT}" = "success" ]; then
|
||||||
|
cat "${SECURITY_ARTIFACTS_DIR}/suite-report.md"
|
||||||
|
elif [ -s "${SECURITY_ARTIFACTS_DIR}/suite-report.md" ]; then
|
||||||
|
echo "The suite did not complete successfully. See suite-report.md in this run's artifact for diagnostics."
|
||||||
|
else
|
||||||
|
echo "The suite did not produce a non-empty report."
|
||||||
|
fi
|
||||||
|
} > "${SECURITY_ARTIFACTS_DIR}/report.md"
|
||||||
|
cat "${SECURITY_ARTIFACTS_DIR}/report.md" >> "${GITHUB_STEP_SUMMARY}"
|
||||||
|
[ "${RESULT}" = "success" ]
|
||||||
|
|
||||||
- name: Upload functional report to dashboard
|
- name: Upload functional report to dashboard
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
||||||
REPORT_FILE: /tmp/rustfs-security-report.md
|
REPORT_FILE: ${{ env.SECURITY_ARTIFACTS_DIR }}/report.md
|
||||||
SUITE: security
|
SUITE: security
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -191,17 +223,22 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
DATE="$(date -u +%Y-%m-%d)"
|
DATE="$(date -u +%Y-%m-%d)"
|
||||||
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
||||||
CONTENT="$(python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}")"
|
# Base64-encode the report into a temp file and feed it to jq via
|
||||||
|
# --rawfile: large reports (e.g. pool) exceed the OS argv limit and
|
||||||
|
# make `jq --arg content "${CONTENT}"` fail with "Argument list too long".
|
||||||
|
B64_FILE="$(mktemp)"
|
||||||
|
python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}" > "${B64_FILE}"
|
||||||
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
||||||
if [ -n "${SHA}" ]; then
|
if [ -n "${SHA}" ]; then
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" --arg sha "${SHA}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" --arg sha "${SHA}" \
|
||||||
'{message:$msg, content:$content, sha:$sha}' \
|
'{message:$msg, content:($content|rtrimstr("\n")), sha:$sha}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
else
|
else
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" \
|
||||||
'{message:$msg, content:$content}' \
|
'{message:$msg, content:($content|rtrimstr("\n"))}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
fi
|
fi
|
||||||
|
rm -f "${B64_FILE}"
|
||||||
|
|
||||||
- name: File failure issue in rustfs/backlog
|
- name: File failure issue in rustfs/backlog
|
||||||
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
||||||
@@ -210,8 +247,9 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
SUITE: 'security'
|
SUITE: 'security'
|
||||||
SUITE_LABEL: 'Security'
|
SUITE_LABEL: 'Security'
|
||||||
|
EVIDENCE_OUTCOME: ${{ steps.evidence.outcome }}
|
||||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
REPORT_FILE: '/tmp/rustfs-security-report.md'
|
REPORT_FILE: ${{ env.SECURITY_ARTIFACTS_DIR }}/report.md
|
||||||
LOG_FILE: ''
|
LOG_FILE: ''
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -245,7 +283,7 @@ jobs:
|
|||||||
echo ""
|
echo ""
|
||||||
echo "## Report (errors and symptoms)"
|
echo "## Report (errors and symptoms)"
|
||||||
echo ""
|
echo ""
|
||||||
if [ -s "${REPORT_FILE}" ]; then
|
if [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${REPORT_FILE}" ]; then
|
||||||
redact < "${REPORT_FILE}"
|
redact < "${REPORT_FILE}"
|
||||||
elif [ -s "${LOG_FILE:-}" ]; then
|
elif [ -s "${LOG_FILE:-}" ]; then
|
||||||
echo "(report file missing; log tail below)"
|
echo "(report file missing; log tail below)"
|
||||||
@@ -263,14 +301,15 @@ jobs:
|
|||||||
echo "filed backlog issue for suite ${SUITE}"
|
echo "filed backlog issue for suite ${SUITE}"
|
||||||
|
|
||||||
- name: Upload report and logs
|
- name: Upload report and logs
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
with:
|
with:
|
||||||
name: rustfs-security-test-${{ github.run_id }}
|
name: rustfs-security-test-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
path: |
|
path: |
|
||||||
/tmp/rustfs-security-report.md
|
${{ env.SECURITY_ARTIFACTS_DIR }}/report.md
|
||||||
/tmp/rustfs-security.*/*
|
${{ env.SECURITY_ARTIFACTS_DIR }}/suite.log
|
||||||
if-no-files-found: ignore
|
${{ env.SECURITY_ARTIFACTS_DIR }}/suite-report.md
|
||||||
|
if-no-files-found: error
|
||||||
retention-days: 3
|
retention-days: 3
|
||||||
|
|
||||||
- name: Cleanup environment (after)
|
- name: Cleanup environment (after)
|
||||||
@@ -292,6 +331,24 @@ jobs:
|
|||||||
'
|
'
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- name: "Continue functional chain (next: Replication)"
|
||||||
|
# Only chain-triggered runs forward to the next suite; standalone
|
||||||
|
# workflow_dispatch runs stop after their own cleanup.
|
||||||
|
if: ${{ always() && github.event_name == 'repository_dispatch' }}
|
||||||
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
|
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Dispatching next functional suite: Replication"
|
||||||
|
gh api --method POST repos/rustfs/rustfs/dispatches \
|
||||||
|
-f event_type='rustfs-chain-replication' \
|
||||||
|
-F 'client_payload[from_suite]=security'
|
||||||
|
|
||||||
- name: Notify on failure
|
- name: Notify on failure
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -46,10 +46,28 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
storage-test:
|
storage-test:
|
||||||
runs-on: smoke-testing
|
runs-on: smoke-testing
|
||||||
continue-on-error: true
|
|
||||||
timeout-minutes: 360
|
timeout-minutes: 360
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout repository (for report parser)
|
||||||
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Initialize functional evidence
|
||||||
|
id: evidence
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
umask 077
|
||||||
|
FUNCTIONAL_ARTIFACTS_DIR="${RUNNER_TEMP}/rustfs-storage-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
mkdir -- "${FUNCTIONAL_ARTIFACTS_DIR}" "${FUNCTIONAL_ARTIFACTS_DIR}-scratch"
|
||||||
|
{
|
||||||
|
printf 'FUNCTIONAL_ARTIFACTS_DIR=%s\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'LOG_FILE=%s/suite.log\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'REPORT_FILE=%s/report.md\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'TMPDIR=%s-scratch\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
} >> "${GITHUB_ENV}"
|
||||||
|
|
||||||
# auto-testing is private: clone it with the dedicated PF token (not
|
# auto-testing is private: clone it with the dedicated PF token (not
|
||||||
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
||||||
- name: Checkout auto-testing scripts (with retry)
|
- name: Checkout auto-testing scripts (with retry)
|
||||||
@@ -97,9 +115,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Run storage engine suite
|
- name: Run storage engine suite
|
||||||
id: test
|
id: test
|
||||||
continue-on-error: true
|
|
||||||
env:
|
|
||||||
LOG_FILE: /tmp/rustfs-storage.log
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
chmod +x auto-testing/rustfs-storage-test.sh
|
chmod +x auto-testing/rustfs-storage-test.sh
|
||||||
@@ -122,10 +137,7 @@ jobs:
|
|||||||
./auto-testing/rustfs-storage-test.sh "${ARGS[@]}"
|
./auto-testing/rustfs-storage-test.sh "${ARGS[@]}"
|
||||||
|
|
||||||
- name: Generate report
|
- name: Generate report
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
env:
|
|
||||||
LOG_FILE: /tmp/rustfs-storage.log
|
|
||||||
REPORT_FILE: /tmp/rustfs-storage-report.md
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
PACKAGE_URL='${{ inputs.package_url }}'
|
PACKAGE_URL='${{ inputs.package_url }}'
|
||||||
@@ -147,83 +159,44 @@ jobs:
|
|||||||
RUSTFS_VERSION_INFO="${DETECTED_VERSION}"
|
RUSTFS_VERSION_INFO="${DETECTED_VERSION}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
CASE_TABLE="/tmp/rustfs-storage-cases.md"
|
CASE_TABLE="${FUNCTIONAL_ARTIFACTS_DIR}/cases.md"
|
||||||
python3 - "${LOG_FILE}" "${CASE_TABLE}" <<'PY'
|
CASE_RESULT=success
|
||||||
import re
|
python3 scripts/functional_case_report.py "${LOG_FILE}" "${CASE_TABLE}" || CASE_RESULT=failure
|
||||||
import sys
|
RESULT=failure
|
||||||
|
if [ '${{ steps.test.outcome }}' = 'success' ] && [ "${CASE_RESULT}" = 'success' ]; then
|
||||||
log_file, out_file = sys.argv[1], sys.argv[2]
|
RESULT=success
|
||||||
ansi = re.compile(r'\x1b\[[0-9;]*m')
|
fi
|
||||||
start_re = re.compile(r'^---\s+([A-Z0-9]+-[0-9]+)\s+(.+?)\s+---$')
|
|
||||||
done_re = re.compile(r'^\[(PASS|FAIL|UNSUPPORTED)\]\s+([A-Z0-9]+-[0-9]+)\b')
|
|
||||||
|
|
||||||
rows = []
|
|
||||||
index = {}
|
|
||||||
current = None
|
|
||||||
try:
|
|
||||||
with open(log_file, 'r', encoding='utf-8', errors='replace') as fh:
|
|
||||||
for raw in fh:
|
|
||||||
line = ansi.sub('', raw).strip()
|
|
||||||
m = start_re.match(line)
|
|
||||||
if m:
|
|
||||||
case_id, name = m.group(1), m.group(2)
|
|
||||||
current = case_id
|
|
||||||
if case_id not in index:
|
|
||||||
index[case_id] = len(rows)
|
|
||||||
rows.append([case_id, name, 'RUNNING'])
|
|
||||||
continue
|
|
||||||
m = done_re.match(line)
|
|
||||||
if m:
|
|
||||||
status, case_id = m.group(1), m.group(2)
|
|
||||||
if case_id in index:
|
|
||||||
rows[index[case_id]][2] = status
|
|
||||||
else:
|
|
||||||
rows.append([case_id, case_id, status])
|
|
||||||
index[case_id] = len(rows) - 1
|
|
||||||
current = None
|
|
||||||
except FileNotFoundError:
|
|
||||||
rows = []
|
|
||||||
|
|
||||||
counts = {'PASS': 0, 'FAIL': 0, 'UNSUPPORTED': 0, 'RUNNING': 0}
|
|
||||||
for _, _, status in rows:
|
|
||||||
counts[status] = counts.get(status, 0) + 1
|
|
||||||
|
|
||||||
with open(out_file, 'w', encoding='utf-8') as out:
|
|
||||||
out.write('## Case Summary\n\n')
|
|
||||||
out.write(f"- Total: {len(rows)}\\n")
|
|
||||||
out.write(f"- PASS: {counts.get('PASS', 0)}\\n")
|
|
||||||
out.write(f"- FAIL: {counts.get('FAIL', 0)}\\n")
|
|
||||||
out.write(f"- UNSUPPORTED: {counts.get('UNSUPPORTED', 0)}\\n")
|
|
||||||
out.write('\\n')
|
|
||||||
out.write('| Case | Name | Status |\\n')
|
|
||||||
out.write('| --- | --- | --- |\\n')
|
|
||||||
for case_id, name, status in rows:
|
|
||||||
out.write(f'| {case_id} | {name} | {status} |\\n')
|
|
||||||
PY
|
|
||||||
{
|
{
|
||||||
echo "# RustFS storage engine test report"
|
echo "# RustFS storage engine test report"
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
echo "- Trigger: ${{ github.event_name }}"
|
echo "- Trigger: ${{ github.event_name }}"
|
||||||
echo "- Package: ${PACKAGE_SOURCE}"
|
echo "- Package: ${PACKAGE_SOURCE}"
|
||||||
echo "- RustFS Version: ${RUSTFS_VERSION_INFO}"
|
echo "- RustFS Version: ${RUSTFS_VERSION_INFO}"
|
||||||
echo "- Test Step Outcome: ${{ steps.test.outcome }}"
|
echo "- Test Step Outcome: ${RESULT}"
|
||||||
|
echo "- Suite Step Outcome: ${{ steps.test.outcome }}"
|
||||||
echo ""
|
echo ""
|
||||||
cat "${CASE_TABLE}" || true
|
if [ "${RESULT}" = "success" ]; then
|
||||||
echo ""
|
cat "${CASE_TABLE}"
|
||||||
echo "## Log tail"
|
echo ""
|
||||||
echo '```text'
|
echo "## Log tail"
|
||||||
tail -n 200 "${LOG_FILE}" || true
|
echo '```text'
|
||||||
echo '```'
|
tail -n 200 "${LOG_FILE}"
|
||||||
|
echo '```'
|
||||||
|
else
|
||||||
|
echo "The suite or evidence validation failed. See this run's artifact for partial case results and suite.log."
|
||||||
|
fi
|
||||||
} | tee "${REPORT_FILE}"
|
} | tee "${REPORT_FILE}"
|
||||||
cat "${REPORT_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
cat "${REPORT_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
||||||
|
[ "${RESULT}" = "success" ]
|
||||||
|
|
||||||
- name: Upload functional report to dashboard
|
- name: Upload functional report to dashboard
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
||||||
REPORT_FILE: /tmp/rustfs-storage-report.md
|
|
||||||
SUITE: storage
|
SUITE: storage
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -233,28 +206,32 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
DATE="$(date -u +%Y-%m-%d)"
|
DATE="$(date -u +%Y-%m-%d)"
|
||||||
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
||||||
CONTENT="$(python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}")"
|
# Base64-encode the report into a temp file and feed it to jq via
|
||||||
|
# --rawfile: large reports (e.g. pool) exceed the OS argv limit and
|
||||||
|
# make `jq --arg content "${CONTENT}"` fail with "Argument list too long".
|
||||||
|
B64_FILE="$(mktemp)"
|
||||||
|
python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}" > "${B64_FILE}"
|
||||||
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
||||||
if [ -n "${SHA}" ]; then
|
if [ -n "${SHA}" ]; then
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" --arg sha "${SHA}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" --arg sha "${SHA}" \
|
||||||
'{message:$msg, content:$content, sha:$sha}' \
|
'{message:$msg, content:($content|rtrimstr("\n")), sha:$sha}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
else
|
else
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" \
|
||||||
'{message:$msg, content:$content}' \
|
'{message:$msg, content:($content|rtrimstr("\n"))}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
fi
|
fi
|
||||||
|
rm -f "${B64_FILE}"
|
||||||
|
|
||||||
- name: File failure issue in rustfs/backlog
|
- name: File failure issue in rustfs/backlog
|
||||||
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
EVIDENCE_OUTCOME: ${{ steps.evidence.outcome }}
|
||||||
SUITE: 'storage'
|
SUITE: 'storage'
|
||||||
SUITE_LABEL: 'Storage engine'
|
SUITE_LABEL: 'Storage engine'
|
||||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
REPORT_FILE: '/tmp/rustfs-storage-report.md'
|
|
||||||
LOG_FILE: '/tmp/rustfs-storage.log'
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
if [ -z "${GH_TOKEN:-}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
@@ -282,14 +259,16 @@ jobs:
|
|||||||
echo ""
|
echo ""
|
||||||
echo "- Suite: \`${SUITE}\`"
|
echo "- Suite: \`${SUITE}\`"
|
||||||
echo "- Run: ${RUN_URL}"
|
echo "- Run: ${RUN_URL}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
||||||
echo "- Date: $(date -u +%Y-%m-%d)"
|
echo "- Date: $(date -u +%Y-%m-%d)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "## Report (errors and symptoms)"
|
echo "## Report (errors and symptoms)"
|
||||||
echo ""
|
echo ""
|
||||||
if [ -s "${REPORT_FILE}" ]; then
|
if [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${REPORT_FILE}" ]; then
|
||||||
redact < "${REPORT_FILE}"
|
redact < "${REPORT_FILE}"
|
||||||
elif [ -s "${LOG_FILE:-}" ]; then
|
elif [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${LOG_FILE:-}" ]; then
|
||||||
echo "(report file missing; log tail below)"
|
echo "(report file missing; log tail below)"
|
||||||
echo ""
|
echo ""
|
||||||
tail -n 200 "${LOG_FILE}" | redact
|
tail -n 200 "${LOG_FILE}" | redact
|
||||||
@@ -305,14 +284,15 @@ jobs:
|
|||||||
echo "filed backlog issue for suite ${SUITE}"
|
echo "filed backlog issue for suite ${SUITE}"
|
||||||
|
|
||||||
- name: Upload report and logs
|
- name: Upload report and logs
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
with:
|
with:
|
||||||
name: rustfs-storage-${{ github.run_id }}
|
name: rustfs-storage-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
path: |
|
path: |
|
||||||
/tmp/rustfs-storage.log
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/report.md
|
||||||
/tmp/rustfs-storage-report.md
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/suite.log
|
||||||
if-no-files-found: warn
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/cases.md
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Cleanup environment (after)
|
- name: Cleanup environment (after)
|
||||||
if: always()
|
if: always()
|
||||||
@@ -344,7 +324,7 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
if [ -z "${{GH_TOKEN:-}}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -353,31 +333,31 @@ jobs:
|
|||||||
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
||||||
-f event_type='rustfs-chain-heal' \
|
-f event_type='rustfs-chain-heal' \
|
||||||
-F 'client_payload[from_suite]=storage'; then
|
-F 'client_payload[from_suite]=storage'; then
|
||||||
echo "dispatched next suite Heal (attempt ${{attempt}})"
|
echo "dispatched next suite Heal (attempt ${attempt})"
|
||||||
DISPATCHED=1
|
DISPATCHED=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "dispatch attempt ${{attempt}} failed; retrying in ${{attempt}}0s" >&2
|
echo "dispatch attempt ${attempt} failed; retrying in ${attempt}0s" >&2
|
||||||
sleep "${{attempt}}0"
|
sleep "${attempt}0"
|
||||||
done
|
done
|
||||||
if [ "${{DISPATCHED:-0}}" -ne 1 ]; then
|
if [ "${DISPATCHED:-0}" -ne 1 ]; then
|
||||||
echo "ERROR: functional chain stalled: could not dispatch Heal after 3 attempts" >&2
|
echo "ERROR: functional chain stalled: could not dispatch Heal after 3 attempts" >&2
|
||||||
TITLE="[functional][chain] stalled after storage (run ${{GITHUB_RUN_ID}})"
|
TITLE="[functional][chain] stalled after storage (run ${GITHUB_RUN_ID})"
|
||||||
BODY_FILE="$(mktemp)"
|
BODY_FILE="$(mktemp)"
|
||||||
{
|
{
|
||||||
echo "The functional chain could not hand off from **storage** to **Heal** after 3 attempts."
|
echo "The functional chain could not hand off from **storage** to **Heal** after 3 attempts."
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Failed suite job: ${{GITHUB_SERVER_URL}}/${{GITHUB_REPOSITORY}}/actions/runs/${{GITHUB_RUN_ID}}"
|
echo "- Failed suite job: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||||
echo "- Expected next event: `rustfs-chain-heal`"
|
echo "- Expected next event: 'rustfs-chain-heal'"
|
||||||
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
||||||
echo "- Recovery: re-dispatch manually with"
|
echo "- Recovery: re-dispatch manually with"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-heal'"
|
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-heal'"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
} > "${{BODY_FILE}}"
|
} > "${BODY_FILE}"
|
||||||
gh issue create -R rustfs/backlog --title "${{TITLE}}" \
|
gh issue create -R rustfs/backlog --title "${TITLE}" \
|
||||||
--body-file "${{BODY_FILE}}" --label functional-test \
|
--body-file "${BODY_FILE}" --label functional-test \
|
||||||
|| gh issue create -R rustfs/backlog --title "${{TITLE}}" --body-file "${{BODY_FILE}}" \
|
|| gh issue create -R rustfs/backlog --title "${TITLE}" --body-file "${BODY_FILE}" \
|
||||||
|| echo "could not file the stall alert issue either; check the token" >&2
|
|| echo "could not file the stall alert issue either; check the token" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -11,9 +11,20 @@ on:
|
|||||||
description: 'Direct .deb URL (nightly/R2/dev). Overrides rustfs_version.'
|
description: 'Direct .deb URL (nightly/R2/dev). Overrides rustfs_version.'
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
rc_sha256:
|
rc_archive_url:
|
||||||
description: 'Optional SHA-256 for the preinstalled rc binary; mismatch is an infrastructure failure.'
|
description: 'Exact RustFS CLI Linux archive URL.'
|
||||||
required: false
|
required: false
|
||||||
|
default: 'https://github.com/rustfs/cli/releases/download/v0.1.32/rustfs-cli-linux-amd64-v0.1.32.tar.gz'
|
||||||
|
type: string
|
||||||
|
rc_archive_sha256:
|
||||||
|
description: 'Expected SHA-256 of the RustFS CLI archive.'
|
||||||
|
required: false
|
||||||
|
default: 'ab00d937079dcb6f1c7b41d34bbfaad0eb0bd4f7218672cbcb7c33652d1c46df'
|
||||||
|
type: string
|
||||||
|
rc_sha256:
|
||||||
|
description: 'Expected SHA-256 of the extracted RustFS CLI binary.'
|
||||||
|
required: false
|
||||||
|
default: '320bdd4223a4d1986c1a098165f2198e92c35c4042b9a4d5e6fa33e9152477df'
|
||||||
type: string
|
type: string
|
||||||
force_case_failure:
|
force_case_failure:
|
||||||
description: 'Diagnostic only: rewrite single-single/TIER-101 to FAIL after execution to verify artifact and final-gate behavior.'
|
description: 'Diagnostic only: rewrite single-single/TIER-101 to FAIL after execution to verify artifact and final-gate behavior.'
|
||||||
@@ -41,16 +52,15 @@ env:
|
|||||||
RUSTFS_NODES: ${{ secrets.RUSTFS_NODES || vars.RUSTFS_NODES }}
|
RUSTFS_NODES: ${{ secrets.RUSTFS_NODES || vars.RUSTFS_NODES }}
|
||||||
RUSTFS_SSH_USER: ${{ secrets.RUSTFS_SSH_USER || vars.RUSTFS_SSH_USER }}
|
RUSTFS_SSH_USER: ${{ secrets.RUSTFS_SSH_USER || vars.RUSTFS_SSH_USER }}
|
||||||
RUSTFS_NIGHTLY_PACKAGE_URL: ${{ vars.RUSTFS_NIGHTLY_PACKAGE_URL || 'https://dl.rustfs.com/artifacts/rustfs/packages/nightly/rustfs-nightly-latest.deb' }}
|
RUSTFS_NIGHTLY_PACKAGE_URL: ${{ vars.RUSTFS_NIGHTLY_PACKAGE_URL || 'https://dl.rustfs.com/artifacts/rustfs/packages/nightly/rustfs-nightly-latest.deb' }}
|
||||||
RUSTFS_EXPECTED_RC_SHA256: ${{ inputs.rc_sha256 || vars.RUSTFS_TIER_RC_SHA256 }}
|
RUSTFS_RC_ARCHIVE_URL: ${{ inputs.rc_archive_url || 'https://github.com/rustfs/cli/releases/download/v0.1.32/rustfs-cli-linux-amd64-v0.1.32.tar.gz' }}
|
||||||
|
RUSTFS_RC_ARCHIVE_SHA256: ${{ inputs.rc_archive_sha256 || 'ab00d937079dcb6f1c7b41d34bbfaad0eb0bd4f7218672cbcb7c33652d1c46df' }}
|
||||||
|
RUSTFS_EXPECTED_RC_SHA256: ${{ inputs.rc_sha256 || '320bdd4223a4d1986c1a098165f2198e92c35c4042b9a4d5e6fa33e9152477df' }}
|
||||||
PF_TESTING_GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
PF_TESTING_GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
TIER_ARTIFACTS_DIR: /tmp/rustfs-tier-artifacts-${{ github.run_id }}-${{ github.run_attempt }}
|
TIER_ARTIFACTS_DIR: /tmp/rustfs-tier-artifacts-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tier-test:
|
tier-test:
|
||||||
runs-on: smoke-testing
|
runs-on: smoke-testing
|
||||||
# Requirement: a failing suite must not fail the workflow; failures
|
|
||||||
# are filed to rustfs/backlog and the chain continues.
|
|
||||||
continue-on-error: true
|
|
||||||
timeout-minutes: 420
|
timeout-minutes: 420
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
@@ -86,6 +96,111 @@ jobs:
|
|||||||
echo "ERROR: unable to clone rustfs/auto-testing after 5 attempts" >&2
|
echo "ERROR: unable to clone rustfs/auto-testing after 5 attempts" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
|
- name: Prepare pinned RustFS CLI
|
||||||
|
id: rc
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
umask 077
|
||||||
|
|
||||||
|
case "${RUSTFS_RC_ARCHIVE_URL}" in
|
||||||
|
https://*) ;;
|
||||||
|
*)
|
||||||
|
echo "RustFS CLI archive URL must use HTTPS" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
EXPECTED_ARCHIVE_SHA256="$(printf '%s' "${RUSTFS_RC_ARCHIVE_SHA256}" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
EXPECTED_RC_SHA256="$(printf '%s' "${RUSTFS_EXPECTED_RC_SHA256}" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
if ! [[ "${EXPECTED_ARCHIVE_SHA256}" =~ ^[0-9a-f]{64}$ ]]; then
|
||||||
|
echo "invalid RustFS CLI archive SHA-256" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! [[ "${EXPECTED_RC_SHA256}" =~ ^[0-9a-f]{64}$ ]]; then
|
||||||
|
echo "invalid RustFS CLI binary SHA-256" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
RC_ROOT="${RUNNER_TEMP}/rustfs-tier-rc-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
RC_ARCHIVE="${RC_ROOT}/rustfs-cli.tar.gz"
|
||||||
|
RC_BIN="${RC_ROOT}/rc"
|
||||||
|
if ! mkdir -- "${RC_ROOT}"; then
|
||||||
|
echo "refusing to reuse RustFS CLI directory: ${RC_ROOT}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl --fail --location --retry 3 --retry-all-errors \
|
||||||
|
--connect-timeout 15 --max-time 180 \
|
||||||
|
--proto '=https' --proto-redir '=https' \
|
||||||
|
--output "${RC_ARCHIVE}" "${RUSTFS_RC_ARCHIVE_URL}"
|
||||||
|
RC_ARCHIVE_SIZE="$(wc -c < "${RC_ARCHIVE}" | tr -d '[:space:]')"
|
||||||
|
if [ "${RC_ARCHIVE_SIZE}" -eq 0 ] || [ "${RC_ARCHIVE_SIZE}" -gt 33554432 ]; then
|
||||||
|
echo "RustFS CLI archive size is outside the accepted range: ${RC_ARCHIVE_SIZE}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! ACTUAL_ARCHIVE_SHA256="$(openssl dgst -sha256 -r "${RC_ARCHIVE}" | awk '{print $1}')"; then
|
||||||
|
echo "failed to calculate RustFS CLI archive SHA-256" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "${ACTUAL_ARCHIVE_SHA256}" != "${EXPECTED_ARCHIVE_SHA256}" ]; then
|
||||||
|
echo "RustFS CLI archive SHA-256 mismatch: expected ${EXPECTED_ARCHIVE_SHA256}, got ${ACTUAL_ARCHIVE_SHA256}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ARCHIVE_MEMBERS="$(tar -tzf "${RC_ARCHIVE}")"
|
||||||
|
if ! grep -Fxq 'rc' <<< "${ARCHIVE_MEMBERS}"; then
|
||||||
|
echo "RustFS CLI archive does not contain the rc entry" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! tar -xOzf "${RC_ARCHIVE}" rc > "${RC_BIN}"; then
|
||||||
|
echo "failed to extract the RustFS CLI binary" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
chmod 0700 "${RC_BIN}"
|
||||||
|
if ! ACTUAL_RC_SHA256="$(openssl dgst -sha256 -r "${RC_BIN}" | awk '{print $1}')"; then
|
||||||
|
echo "failed to calculate RustFS CLI binary SHA-256" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "${ACTUAL_RC_SHA256}" != "${EXPECTED_RC_SHA256}" ]; then
|
||||||
|
echo "RustFS CLI binary SHA-256 mismatch: expected ${EXPECTED_RC_SHA256}, got ${ACTUAL_RC_SHA256}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! RC_VERSION_OUTPUT="$(timeout 30 "${RC_BIN}" --version 2>&1)"; then
|
||||||
|
echo "failed to execute the pinned RustFS CLI" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
RC_VERSION="${RC_VERSION_OUTPUT%%$'\n'*}"
|
||||||
|
if [ -z "${RC_VERSION}" ]; then
|
||||||
|
echo "pinned RustFS CLI returned an empty version" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
jq -n \
|
||||||
|
--arg schema_version '1' \
|
||||||
|
--arg generated_at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
||||||
|
--arg archive_url "${RUSTFS_RC_ARCHIVE_URL}" \
|
||||||
|
--arg archive_sha256 "${ACTUAL_ARCHIVE_SHA256}" \
|
||||||
|
--arg archive_size "${RC_ARCHIVE_SIZE}" \
|
||||||
|
--arg path "${RC_BIN}" \
|
||||||
|
--arg version "${RC_VERSION}" \
|
||||||
|
--arg sha256 "${ACTUAL_RC_SHA256}" \
|
||||||
|
'{
|
||||||
|
schema_version: ($schema_version | tonumber),
|
||||||
|
generated_at: $generated_at,
|
||||||
|
archive: {
|
||||||
|
url: $archive_url,
|
||||||
|
sha256: $archive_sha256,
|
||||||
|
size: ($archive_size | tonumber)
|
||||||
|
},
|
||||||
|
binary: {
|
||||||
|
path: $path,
|
||||||
|
version: $version,
|
||||||
|
sha256: $sha256
|
||||||
|
}
|
||||||
|
}' > "${TIER_ARTIFACTS_DIR}/rc-bootstrap.json"
|
||||||
|
printf 'path=%s\n' "${RC_BIN}" >> "${GITHUB_OUTPUT}"
|
||||||
|
echo "RustFS CLI ready: ${RC_VERSION} (${ACTUAL_RC_SHA256})"
|
||||||
|
|
||||||
- name: Show environment
|
- name: Show environment
|
||||||
run: |
|
run: |
|
||||||
uname -a
|
uname -a
|
||||||
@@ -146,12 +261,12 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
PACKAGE_URL_INPUT: ${{ inputs.package_url }}
|
PACKAGE_URL_INPUT: ${{ inputs.package_url }}
|
||||||
|
RC_BIN: ${{ steps.rc.outputs.path }}
|
||||||
RUSTFS_VERSION_INPUT: ${{ inputs.rustfs_version }}
|
RUSTFS_VERSION_INPUT: ${{ inputs.rustfs_version }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
LOG_FILE="${TIER_ARTIFACTS_DIR}/rustfs-tier.log"
|
LOG_FILE="${TIER_ARTIFACTS_DIR}/rustfs-tier.log"
|
||||||
chmod +x auto-testing/rustfs-tier-test.sh
|
chmod +x auto-testing/rustfs-tier-test.sh
|
||||||
RC_BIN="$(command -v rc)"
|
|
||||||
PACKAGE_URL="${PACKAGE_URL_INPUT}"
|
PACKAGE_URL="${PACKAGE_URL_INPUT}"
|
||||||
RUSTFS_VERSION="${RUSTFS_VERSION_INPUT}"
|
RUSTFS_VERSION="${RUSTFS_VERSION_INPUT}"
|
||||||
ARGS=(
|
ARGS=(
|
||||||
@@ -208,6 +323,11 @@ jobs:
|
|||||||
else
|
else
|
||||||
PACKAGE_SOURCE="${RUSTFS_NIGHTLY_PACKAGE_URL}"
|
PACKAGE_SOURCE="${RUSTFS_NIGHTLY_PACKAGE_URL}"
|
||||||
fi
|
fi
|
||||||
|
if RC_BOOTSTRAP_SUMMARY="$(jq -r '.binary | "\(.version) / \(.sha256)"' "${TIER_ARTIFACTS_DIR}/rc-bootstrap.json" 2>/dev/null)"; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
RC_BOOTSTRAP_SUMMARY="missing or invalid"
|
||||||
|
fi
|
||||||
set +e
|
set +e
|
||||||
python3 auto-testing/rustfs_tier_report.py \
|
python3 auto-testing/rustfs_tier_report.py \
|
||||||
--results-dir "${TIER_ARTIFACTS_DIR}/cases" \
|
--results-dir "${TIER_ARTIFACTS_DIR}/cases" \
|
||||||
@@ -229,6 +349,7 @@ jobs:
|
|||||||
echo "- Run: ${RUN_URL}"
|
echo "- Run: ${RUN_URL}"
|
||||||
echo "- Trigger: ${TRIGGER_NAME}"
|
echo "- Trigger: ${TRIGGER_NAME}"
|
||||||
echo "- Package: ${PACKAGE_SOURCE}"
|
echo "- Package: ${PACKAGE_SOURCE}"
|
||||||
|
echo "- Client bootstrap: ${RC_BOOTSTRAP_SUMMARY}"
|
||||||
echo "- Test Step Outcome: ${TEST_OUTCOME}"
|
echo "- Test Step Outcome: ${TEST_OUTCOME}"
|
||||||
echo "- Structured Gate Exit: ${CASE_GATE_RC}"
|
echo "- Structured Gate Exit: ${CASE_GATE_RC}"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -256,17 +377,22 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
DATE="$(date -u +%Y-%m-%d)"
|
DATE="$(date -u +%Y-%m-%d)"
|
||||||
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
||||||
CONTENT="$(python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}")"
|
# Base64-encode the report into a temp file and feed it to jq via
|
||||||
|
# --rawfile: large reports (e.g. pool) exceed the OS argv limit and
|
||||||
|
# make `jq --arg content "${CONTENT}"` fail with "Argument list too long".
|
||||||
|
B64_FILE="$(mktemp)"
|
||||||
|
python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}" > "${B64_FILE}"
|
||||||
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
||||||
if [ -n "${SHA}" ]; then
|
if [ -n "${SHA}" ]; then
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" --arg sha "${SHA}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" --arg sha "${SHA}" \
|
||||||
'{message:$msg, content:$content, sha:$sha}' \
|
'{message:$msg, content:($content|rtrimstr("\n")), sha:$sha}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
else
|
else
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" \
|
||||||
'{message:$msg, content:$content}' \
|
'{message:$msg, content:($content|rtrimstr("\n"))}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
fi
|
fi
|
||||||
|
rm -f "${B64_FILE}"
|
||||||
|
|
||||||
- name: Verify required tier evidence
|
- name: Verify required tier evidence
|
||||||
id: evidence_verify
|
id: evidence_verify
|
||||||
@@ -279,6 +405,7 @@ jobs:
|
|||||||
rustfs-tier-report.md \
|
rustfs-tier-report.md \
|
||||||
rustfs-tier-cases.md \
|
rustfs-tier-cases.md \
|
||||||
rustfs-tier-gate.rc \
|
rustfs-tier-gate.rc \
|
||||||
|
rc-bootstrap.json \
|
||||||
provenance.json; do
|
provenance.json; do
|
||||||
if [ ! -s "${TIER_ARTIFACTS_DIR}/${name}" ]; then
|
if [ ! -s "${TIER_ARTIFACTS_DIR}/${name}" ]; then
|
||||||
echo "required tier evidence is missing or empty: ${name}" >&2
|
echo "required tier evidence is missing or empty: ${name}" >&2
|
||||||
@@ -326,6 +453,16 @@ jobs:
|
|||||||
'
|
'
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- name: Cleanup pinned RustFS CLI
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
RC_ROOT="${RUNNER_TEMP}/rustfs-tier-rc-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
rm -f -- "${RC_ROOT}/rustfs-cli.tar.gz" "${RC_ROOT}/rc"
|
||||||
|
if [ -d "${RC_ROOT}" ]; then
|
||||||
|
rmdir -- "${RC_ROOT}"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Enforce tier suite result
|
- name: Enforce tier suite result
|
||||||
id: gate
|
id: gate
|
||||||
if: always()
|
if: always()
|
||||||
@@ -439,7 +576,7 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
if [ -z "${{GH_TOKEN:-}}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -448,31 +585,31 @@ jobs:
|
|||||||
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
||||||
-f event_type='rustfs-chain-storage' \
|
-f event_type='rustfs-chain-storage' \
|
||||||
-F 'client_payload[from_suite]=tier'; then
|
-F 'client_payload[from_suite]=tier'; then
|
||||||
echo "dispatched next suite Storage engine (attempt ${{attempt}})"
|
echo "dispatched next suite Storage engine (attempt ${attempt})"
|
||||||
DISPATCHED=1
|
DISPATCHED=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "dispatch attempt ${{attempt}} failed; retrying in ${{attempt}}0s" >&2
|
echo "dispatch attempt ${attempt} failed; retrying in ${attempt}0s" >&2
|
||||||
sleep "${{attempt}}0"
|
sleep "${attempt}0"
|
||||||
done
|
done
|
||||||
if [ "${{DISPATCHED:-0}}" -ne 1 ]; then
|
if [ "${DISPATCHED:-0}" -ne 1 ]; then
|
||||||
echo "ERROR: functional chain stalled: could not dispatch Storage engine after 3 attempts" >&2
|
echo "ERROR: functional chain stalled: could not dispatch Storage engine after 3 attempts" >&2
|
||||||
TITLE="[functional][chain] stalled after tier (run ${{GITHUB_RUN_ID}})"
|
TITLE="[functional][chain] stalled after tier (run ${GITHUB_RUN_ID})"
|
||||||
BODY_FILE="$(mktemp)"
|
BODY_FILE="$(mktemp)"
|
||||||
{
|
{
|
||||||
echo "The functional chain could not hand off from **tier** to **Storage engine** after 3 attempts."
|
echo "The functional chain could not hand off from **tier** to **Storage engine** after 3 attempts."
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Failed suite job: ${{GITHUB_SERVER_URL}}/${{GITHUB_REPOSITORY}}/actions/runs/${{GITHUB_RUN_ID}}"
|
echo "- Failed suite job: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||||
echo "- Expected next event: `rustfs-chain-storage`"
|
echo "- Expected next event: 'rustfs-chain-storage'"
|
||||||
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
||||||
echo "- Recovery: re-dispatch manually with"
|
echo "- Recovery: re-dispatch manually with"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-storage'"
|
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-storage'"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
} > "${{BODY_FILE}}"
|
} > "${BODY_FILE}"
|
||||||
gh issue create -R rustfs/backlog --title "${{TITLE}}" \
|
gh issue create -R rustfs/backlog --title "${TITLE}" \
|
||||||
--body-file "${{BODY_FILE}}" --label functional-test \
|
--body-file "${BODY_FILE}" --label functional-test \
|
||||||
|| gh issue create -R rustfs/backlog --title "${{TITLE}}" --body-file "${{BODY_FILE}}" \
|
|| gh issue create -R rustfs/backlog --title "${TITLE}" --body-file "${BODY_FILE}" \
|
||||||
|| echo "could not file the stall alert issue either; check the token" >&2
|
|| echo "could not file the stall alert issue either; check the token" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -18,15 +18,15 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
from_version:
|
from_version:
|
||||||
description: 'OLD RustFS release tag (e.g. 1.0.0-rc.4-preview.1)'
|
description: 'OLD RustFS release tag, e.g. 1.0.0-rc.3 (its release must ship a .deb asset). Leave empty for the default.'
|
||||||
required: false
|
required: false
|
||||||
default: '1.0.0-rc.4-preview.1'
|
default: '1.0.0-rc.3'
|
||||||
from_url:
|
from_url:
|
||||||
description: 'OLD .deb URL. Overrides from_version.'
|
description: 'OLD .deb URL. Overrides from_version.'
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
to_version:
|
to_version:
|
||||||
description: 'NEW RustFS release tag (leave empty for latest nightly)'
|
description: 'NEW RustFS release tag, e.g. 1.0.0-rc.5 (any version with a .deb asset). Leave empty for latest nightly.'
|
||||||
required: false
|
required: false
|
||||||
to_url:
|
to_url:
|
||||||
description: 'NEW .deb URL. Overrides to_version / nightly default.'
|
description: 'NEW .deb URL. Overrides to_version / nightly default.'
|
||||||
@@ -79,10 +79,28 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
upgrade-test:
|
upgrade-test:
|
||||||
runs-on: smoke-testing
|
runs-on: smoke-testing
|
||||||
continue-on-error: true
|
|
||||||
timeout-minutes: 420
|
timeout-minutes: 420
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout repository (for report parser)
|
||||||
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Initialize functional evidence
|
||||||
|
id: evidence
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
umask 077
|
||||||
|
FUNCTIONAL_ARTIFACTS_DIR="${RUNNER_TEMP}/rustfs-upgrade-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
mkdir -- "${FUNCTIONAL_ARTIFACTS_DIR}" "${FUNCTIONAL_ARTIFACTS_DIR}-scratch"
|
||||||
|
{
|
||||||
|
printf 'FUNCTIONAL_ARTIFACTS_DIR=%s\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'LOG_FILE=%s/suite.log\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'REPORT_FILE=%s/report.md\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
printf 'TMPDIR=%s-scratch\n' "${FUNCTIONAL_ARTIFACTS_DIR}"
|
||||||
|
} >> "${GITHUB_ENV}"
|
||||||
|
|
||||||
# auto-testing is private: clone it with the dedicated PF token (not
|
# auto-testing is private: clone it with the dedicated PF token (not
|
||||||
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
# GITHUB_TOKEN) and retry transient GitHub/network failures.
|
||||||
- name: Checkout auto-testing scripts (with retry)
|
- name: Checkout auto-testing scripts (with retry)
|
||||||
@@ -142,9 +160,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Run upgrade compatibility suite
|
- name: Run upgrade compatibility suite
|
||||||
id: test
|
id: test
|
||||||
continue-on-error: true
|
|
||||||
env:
|
env:
|
||||||
LOG_FILE: /tmp/rustfs-upgrade.log
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
chmod +x auto-testing/rustfs-upgrade-test.sh
|
chmod +x auto-testing/rustfs-upgrade-test.sh
|
||||||
@@ -175,13 +192,33 @@ jobs:
|
|||||||
else
|
else
|
||||||
ARGS+=(--to-url "${RUSTFS_NIGHTLY_PACKAGE_URL}")
|
ARGS+=(--to-url "${RUSTFS_NIGHTLY_PACKAGE_URL}")
|
||||||
fi
|
fi
|
||||||
|
# Fail fast with a clear message when a requested release tag has
|
||||||
|
# no .deb asset (e.g. 1.0.0-rc.4 ships only zips), instead of
|
||||||
|
# letting the suite die mid-run on a 404.
|
||||||
|
check_release_asset() {
|
||||||
|
local version="$1" tag asset url
|
||||||
|
[ -n "${version}" ] && [ "${version}" != "null" ] || return 0
|
||||||
|
tag="${version#v}"
|
||||||
|
asset="rustfs_${tag//-/.}_amd64.deb"
|
||||||
|
url="https://github.com/rustfs/rustfs/releases/download/${tag}/${asset}"
|
||||||
|
if ! gh api "repos/rustfs/rustfs/releases/tags/${tag}" --jq '.assets[].name' 2>/dev/null | grep -qxF "${asset}"; then
|
||||||
|
echo "ERROR: release ${tag} has no downloadable asset ${asset}:" >&2
|
||||||
|
echo " ${url}" >&2
|
||||||
|
echo "Pick a tag whose release ships a .deb (check its release assets)." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "resolved ${tag} -> ${url}"
|
||||||
|
}
|
||||||
|
if [ -z "${FROM_URL}" ]; then
|
||||||
|
check_release_asset "${FROM_VERSION}"
|
||||||
|
fi
|
||||||
|
if [ -z "${TO_URL}" ]; then
|
||||||
|
check_release_asset "${TO_VERSION}"
|
||||||
|
fi
|
||||||
./auto-testing/rustfs-upgrade-test.sh "${ARGS[@]}"
|
./auto-testing/rustfs-upgrade-test.sh "${ARGS[@]}"
|
||||||
|
|
||||||
- name: Generate report
|
- name: Generate report
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
env:
|
|
||||||
LOG_FILE: /tmp/rustfs-upgrade.log
|
|
||||||
REPORT_FILE: /tmp/rustfs-upgrade-report.md
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
FROM_URL='${{ inputs.from_url }}'
|
FROM_URL='${{ inputs.from_url }}'
|
||||||
@@ -202,80 +239,47 @@ jobs:
|
|||||||
else
|
else
|
||||||
TO_SOURCE="${RUSTFS_NIGHTLY_PACKAGE_URL}"
|
TO_SOURCE="${RUSTFS_NIGHTLY_PACKAGE_URL}"
|
||||||
fi
|
fi
|
||||||
CASE_TABLE="/tmp/rustfs-upgrade-cases.md"
|
CASE_TABLE="${FUNCTIONAL_ARTIFACTS_DIR}/cases.md"
|
||||||
python3 - "${LOG_FILE}" "${CASE_TABLE}" <<'PY'
|
MATRIX_TABLE="${FUNCTIONAL_ARTIFACTS_DIR}/matrix.md"
|
||||||
import re
|
CASE_RESULT=success
|
||||||
import sys
|
python3 scripts/functional_case_report.py "${LOG_FILE}" "${CASE_TABLE}" "${MATRIX_TABLE}" || CASE_RESULT=failure
|
||||||
|
RESULT=failure
|
||||||
log_file, out_file = sys.argv[1], sys.argv[2]
|
if [ '${{ steps.test.outcome }}' = 'success' ] && [ "${CASE_RESULT}" = 'success' ]; then
|
||||||
ansi = re.compile(r'\x1b\[[0-9;]*m')
|
RESULT=success
|
||||||
start_re = re.compile(r'^---\s+([A-Z]+-[0-9]+)\s+(.+?)\s+---$')
|
fi
|
||||||
done_re = re.compile(r'^\[(PASS|FAIL|UNSUPPORTED)\]\s+([A-Z]+-[0-9]+)\b')
|
|
||||||
|
|
||||||
rows = []
|
|
||||||
index = {}
|
|
||||||
try:
|
|
||||||
with open(log_file, 'r', encoding='utf-8', errors='replace') as fh:
|
|
||||||
for raw in fh:
|
|
||||||
line = ansi.sub('', raw).strip()
|
|
||||||
m = start_re.match(line)
|
|
||||||
if m:
|
|
||||||
case_id, name = m.group(1), m.group(2)
|
|
||||||
if case_id not in index:
|
|
||||||
index[case_id] = len(rows)
|
|
||||||
rows.append([case_id, name, 'RUNNING'])
|
|
||||||
continue
|
|
||||||
m = done_re.match(line)
|
|
||||||
if m:
|
|
||||||
status, case_id = m.group(1), m.group(2)
|
|
||||||
if case_id in index:
|
|
||||||
rows[index[case_id]][2] = status
|
|
||||||
else:
|
|
||||||
rows.append([case_id, case_id, status])
|
|
||||||
index[case_id] = len(rows) - 1
|
|
||||||
except FileNotFoundError:
|
|
||||||
rows = []
|
|
||||||
|
|
||||||
counts = {'PASS': 0, 'FAIL': 0, 'UNSUPPORTED': 0, 'RUNNING': 0}
|
|
||||||
for _, _, status in rows:
|
|
||||||
counts[status] = counts.get(status, 0) + 1
|
|
||||||
|
|
||||||
with open(out_file, 'w', encoding='utf-8') as out:
|
|
||||||
out.write('## Case Summary\n\n')
|
|
||||||
out.write(f"- Total: {len(rows)}\\n")
|
|
||||||
out.write(f"- PASS: {counts.get('PASS', 0)}\\n")
|
|
||||||
out.write(f"- FAIL: {counts.get('FAIL', 0)}\\n")
|
|
||||||
out.write(f"- UNSUPPORTED: {counts.get('UNSUPPORTED', 0)}\\n")
|
|
||||||
out.write('\\n')
|
|
||||||
out.write('| Case | Name | Status |\\n')
|
|
||||||
out.write('| --- | --- | --- |\\n')
|
|
||||||
for case_id, name, status in rows:
|
|
||||||
out.write(f'| {case_id} | {name} | {status} |\\n')
|
|
||||||
PY
|
|
||||||
{
|
{
|
||||||
echo "# RustFS upgrade compatibility report"
|
echo "# RustFS upgrade compatibility report"
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
echo "- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
echo "- Trigger: ${{ github.event_name }}"
|
echo "- Trigger: ${{ github.event_name }}"
|
||||||
echo "- From: ${FROM_SOURCE}"
|
echo "- From: ${FROM_SOURCE}"
|
||||||
echo "- To: ${TO_SOURCE}"
|
echo "- To: ${TO_SOURCE}"
|
||||||
echo "- Test Step Outcome: ${{ steps.test.outcome }}"
|
echo "- Test Step Outcome: ${RESULT}"
|
||||||
|
echo "- Suite Step Outcome: ${{ steps.test.outcome }}"
|
||||||
echo ""
|
echo ""
|
||||||
cat "${CASE_TABLE}" || true
|
if [ "${RESULT}" = "success" ]; then
|
||||||
echo ""
|
cat "${MATRIX_TABLE}"
|
||||||
echo "## Log tail"
|
echo ""
|
||||||
echo '```text'
|
cat "${CASE_TABLE}"
|
||||||
tail -n 200 "${LOG_FILE}" || true
|
echo ""
|
||||||
echo '```'
|
echo "## Log tail"
|
||||||
|
echo '```text'
|
||||||
|
tail -n 200 "${LOG_FILE}"
|
||||||
|
echo '```'
|
||||||
|
else
|
||||||
|
echo "The suite or evidence validation failed. See this run's artifact for partial case results and suite.log."
|
||||||
|
fi
|
||||||
} | tee "${REPORT_FILE}"
|
} | tee "${REPORT_FILE}"
|
||||||
cat "${REPORT_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
cat "${REPORT_FILE}" >> "${GITHUB_STEP_SUMMARY}"
|
||||||
|
[ "${RESULT}" = "success" ]
|
||||||
|
|
||||||
- name: Upload functional report to dashboard
|
- name: Upload functional report to dashboard
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ env.PF_TESTING_GH_TOKEN }}
|
||||||
REPORT_FILE: /tmp/rustfs-upgrade-report.md
|
|
||||||
SUITE: upgrade
|
SUITE: upgrade
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -285,28 +289,32 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
DATE="$(date -u +%Y-%m-%d)"
|
DATE="$(date -u +%Y-%m-%d)"
|
||||||
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
REPORT_PATH="functional-reports/${SUITE}/${DATE}.md"
|
||||||
CONTENT="$(python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}")"
|
# Base64-encode the report into a temp file and feed it to jq via
|
||||||
|
# --rawfile: large reports (e.g. pool) exceed the OS argv limit and
|
||||||
|
# make `jq --arg content "${CONTENT}"` fail with "Argument list too long".
|
||||||
|
B64_FILE="$(mktemp)"
|
||||||
|
python3 -c 'import base64,sys;print(base64.b64encode(open(sys.argv[1],"rb").read()).decode())' "${REPORT_FILE}" > "${B64_FILE}"
|
||||||
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
SHA="$(gh api "repos/rustfs/dashboard/contents/${REPORT_PATH}" -q '.sha' 2>/dev/null || true)"
|
||||||
if [ -n "${SHA}" ]; then
|
if [ -n "${SHA}" ]; then
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" --arg sha "${SHA}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" --arg sha "${SHA}" \
|
||||||
'{message:$msg, content:$content, sha:$sha}' \
|
'{message:$msg, content:($content|rtrimstr("\n")), sha:$sha}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
else
|
else
|
||||||
jq -n --arg msg "report(${SUITE}): ${DATE}" --arg content "${CONTENT}" \
|
jq -n --arg msg "report(${SUITE}): ${DATE}" --rawfile content "${B64_FILE}" \
|
||||||
'{message:$msg, content:$content}' \
|
'{message:$msg, content:($content|rtrimstr("\n"))}' \
|
||||||
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
| gh api --method PUT "repos/rustfs/dashboard/contents/${REPORT_PATH}" --input - >/dev/null
|
||||||
fi
|
fi
|
||||||
|
rm -f "${B64_FILE}"
|
||||||
|
|
||||||
- name: File failure issue in rustfs/backlog
|
- name: File failure issue in rustfs/backlog
|
||||||
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
if: ${{ always() && (failure() || steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled') }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
|
EVIDENCE_OUTCOME: ${{ steps.evidence.outcome }}
|
||||||
SUITE: 'upgrade'
|
SUITE: 'upgrade'
|
||||||
SUITE_LABEL: 'Upgrade compatibility'
|
SUITE_LABEL: 'Upgrade compatibility'
|
||||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
REPORT_FILE: '/tmp/rustfs-upgrade-report.md'
|
|
||||||
LOG_FILE: '/tmp/rustfs-upgrade.log'
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
if [ -z "${GH_TOKEN:-}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
@@ -334,14 +342,16 @@ jobs:
|
|||||||
echo ""
|
echo ""
|
||||||
echo "- Suite: \`${SUITE}\`"
|
echo "- Suite: \`${SUITE}\`"
|
||||||
echo "- Run: ${RUN_URL}"
|
echo "- Run: ${RUN_URL}"
|
||||||
|
echo "- Attempt: ${GITHUB_RUN_ATTEMPT}"
|
||||||
|
echo "- Workflow Commit: ${GITHUB_SHA}"
|
||||||
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
echo "- Trigger: ${GITHUB_EVENT_NAME}"
|
||||||
echo "- Date: $(date -u +%Y-%m-%d)"
|
echo "- Date: $(date -u +%Y-%m-%d)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "## Report (errors and symptoms)"
|
echo "## Report (errors and symptoms)"
|
||||||
echo ""
|
echo ""
|
||||||
if [ -s "${REPORT_FILE}" ]; then
|
if [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${REPORT_FILE}" ]; then
|
||||||
redact < "${REPORT_FILE}"
|
redact < "${REPORT_FILE}"
|
||||||
elif [ -s "${LOG_FILE:-}" ]; then
|
elif [ "${EVIDENCE_OUTCOME}" = "success" ] && [ -s "${LOG_FILE:-}" ]; then
|
||||||
echo "(report file missing; log tail below)"
|
echo "(report file missing; log tail below)"
|
||||||
echo ""
|
echo ""
|
||||||
tail -n 200 "${LOG_FILE}" | redact
|
tail -n 200 "${LOG_FILE}" | redact
|
||||||
@@ -357,14 +367,16 @@ jobs:
|
|||||||
echo "filed backlog issue for suite ${SUITE}"
|
echo "filed backlog issue for suite ${SUITE}"
|
||||||
|
|
||||||
- name: Upload report and logs
|
- name: Upload report and logs
|
||||||
if: always()
|
if: ${{ always() && steps.evidence.outcome == 'success' }}
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||||
with:
|
with:
|
||||||
name: rustfs-upgrade-test-${{ github.run_id }}
|
name: rustfs-upgrade-test-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
path: |
|
path: |
|
||||||
/tmp/rustfs-upgrade-report.md
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/report.md
|
||||||
/tmp/rustfs-upgrade.*/*
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/suite.log
|
||||||
if-no-files-found: ignore
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/cases.md
|
||||||
|
${{ env.FUNCTIONAL_ARTIFACTS_DIR }}/matrix.md
|
||||||
|
if-no-files-found: error
|
||||||
retention-days: 3
|
retention-days: 3
|
||||||
|
|
||||||
- name: Cleanup environment (after)
|
- name: Cleanup environment (after)
|
||||||
@@ -397,7 +409,7 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.PF_TESTING_GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -uo pipefail
|
set -uo pipefail
|
||||||
if [ -z "${{GH_TOKEN:-}}" ]; then
|
if [ -z "${GH_TOKEN:-}" ]; then
|
||||||
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
echo "PF_TESTING_GH_TOKEN is not configured; cannot dispatch the next suite" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -406,31 +418,31 @@ jobs:
|
|||||||
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
if gh api --method POST repos/rustfs/rustfs/dispatches \
|
||||||
-f event_type='rustfs-chain-s3' \
|
-f event_type='rustfs-chain-s3' \
|
||||||
-F 'client_payload[from_suite]=upgrade'; then
|
-F 'client_payload[from_suite]=upgrade'; then
|
||||||
echo "dispatched next suite S3 compatibility (attempt ${{attempt}})"
|
echo "dispatched next suite S3 compatibility (attempt ${attempt})"
|
||||||
DISPATCHED=1
|
DISPATCHED=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "dispatch attempt ${{attempt}} failed; retrying in ${{attempt}}0s" >&2
|
echo "dispatch attempt ${attempt} failed; retrying in ${attempt}0s" >&2
|
||||||
sleep "${{attempt}}0"
|
sleep "${attempt}0"
|
||||||
done
|
done
|
||||||
if [ "${{DISPATCHED:-0}}" -ne 1 ]; then
|
if [ "${DISPATCHED:-0}" -ne 1 ]; then
|
||||||
echo "ERROR: functional chain stalled: could not dispatch S3 compatibility after 3 attempts" >&2
|
echo "ERROR: functional chain stalled: could not dispatch S3 compatibility after 3 attempts" >&2
|
||||||
TITLE="[functional][chain] stalled after upgrade (run ${{GITHUB_RUN_ID}})"
|
TITLE="[functional][chain] stalled after upgrade (run ${GITHUB_RUN_ID})"
|
||||||
BODY_FILE="$(mktemp)"
|
BODY_FILE="$(mktemp)"
|
||||||
{
|
{
|
||||||
echo "The functional chain could not hand off from **upgrade** to **S3 compatibility** after 3 attempts."
|
echo "The functional chain could not hand off from **upgrade** to **S3 compatibility** after 3 attempts."
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Failed suite job: ${{GITHUB_SERVER_URL}}/${{GITHUB_REPOSITORY}}/actions/runs/${{GITHUB_RUN_ID}}"
|
echo "- Failed suite job: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
||||||
echo "- Expected next event: `rustfs-chain-s3`"
|
echo "- Expected next event: 'rustfs-chain-s3'"
|
||||||
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
echo "- Likely cause: PF_TESTING_GH_TOKEN lacks contents:write on rustfs/rustfs, or the GitHub API was unavailable."
|
||||||
echo "- Recovery: re-dispatch manually with"
|
echo "- Recovery: re-dispatch manually with"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-s3'"
|
echo " gh api --method POST repos/rustfs/rustfs/dispatches -f event_type='rustfs-chain-s3'"
|
||||||
echo " ```"
|
FENCE="$(printf "\x60\x60\x60")"; echo " ${FENCE}"
|
||||||
} > "${{BODY_FILE}}"
|
} > "${BODY_FILE}"
|
||||||
gh issue create -R rustfs/backlog --title "${{TITLE}}" \
|
gh issue create -R rustfs/backlog --title "${TITLE}" \
|
||||||
--body-file "${{BODY_FILE}}" --label functional-test \
|
--body-file "${BODY_FILE}" --label functional-test \
|
||||||
|| gh issue create -R rustfs/backlog --title "${{TITLE}}" --body-file "${{BODY_FILE}}" \
|
|| gh issue create -R rustfs/backlog --title "${TITLE}" --body-file "${BODY_FILE}" \
|
||||||
|| echo "could not file the stall alert issue either; check the token" >&2
|
|| echo "could not file the stall alert issue either; check the token" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ jobs:
|
|||||||
- name: Check latest scheduled runs
|
- name: Check latest scheduled runs
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
RUSTFS_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
python3 scripts/check_scheduled_validation_freshness.py \
|
python3 scripts/check_scheduled_validation_freshness.py \
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ on:
|
|||||||
- "Continuous Integration"
|
- "Continuous Integration"
|
||||||
- "coverage"
|
- "coverage"
|
||||||
- "e2e-nightly"
|
- "e2e-nightly"
|
||||||
|
- "e2e-distributed"
|
||||||
- "e2e-s3tests"
|
- "e2e-s3tests"
|
||||||
- "Fuzz"
|
- "Fuzz"
|
||||||
- "mint"
|
- "mint"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: overtrue/repo-visuals-action@72f34d24769ff5d341956da2f23952594ef2f1e2 # v1.3.0
|
- uses: overtrue/repo-visuals-action@ee2c632f6ce617e851fb46ea935ee8af762ebb93 # v1.4.0
|
||||||
with:
|
with:
|
||||||
github-token: ${{ github.token }}
|
github-token: ${{ github.token }}
|
||||||
output-branch: star-history
|
output-branch: star-history
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ name: Windows Filesystem Tests
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main, release ]
|
||||||
paths:
|
paths:
|
||||||
- "crates/ecstore/src/disk/**"
|
- "crates/ecstore/src/disk/**"
|
||||||
- "crates/ecstore/src/store/init_format.rs"
|
- "crates/ecstore/src/store/init_format.rs"
|
||||||
@@ -26,7 +26,7 @@ on:
|
|||||||
- ".github/actions/setup/**"
|
- ".github/actions/setup/**"
|
||||||
- ".github/workflows/windows-filesystem.yml"
|
- ".github/workflows/windows-filesystem.yml"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ main, release ]
|
||||||
paths:
|
paths:
|
||||||
- "crates/ecstore/src/disk/**"
|
- "crates/ecstore/src/disk/**"
|
||||||
- "crates/ecstore/src/store/init_format.rs"
|
- "crates/ecstore/src/store/init_format.rs"
|
||||||
|
|||||||
+6
-3
@@ -33,6 +33,7 @@ profile.json
|
|||||||
*.zst
|
*.zst
|
||||||
.secrets
|
.secrets
|
||||||
*.go
|
*.go
|
||||||
|
!crates/zip/tests/fixtures/snowball/**/generate/*.go
|
||||||
*.pb
|
*.pb
|
||||||
*.svg
|
*.svg
|
||||||
deploy/logs/*.log.*
|
deploy/logs/*.log.*
|
||||||
@@ -51,15 +52,15 @@ docs
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
!docs/
|
!docs/
|
||||||
docs/*
|
docs/*
|
||||||
|
!docs/README.md
|
||||||
!docs/architecture/
|
!docs/architecture/
|
||||||
!docs/architecture/**
|
!docs/architecture/**
|
||||||
!docs/operations/
|
!docs/operations/
|
||||||
!docs/operations/**
|
!docs/operations/**
|
||||||
|
!docs/postmortems/
|
||||||
|
!docs/postmortems/**
|
||||||
!docs/testing/
|
!docs/testing/
|
||||||
!docs/testing/**
|
!docs/testing/**
|
||||||
docs/heal-scanner-logging-governance.md
|
|
||||||
docs/benchmark/rustfs-target-bench/
|
|
||||||
docs/benchmark/*.md
|
|
||||||
.codegraph/*
|
.codegraph/*
|
||||||
.docker/test/compat/data/*
|
.docker/test/compat/data/*
|
||||||
.docker/test/compat/kms/*
|
.docker/test/compat/kms/*
|
||||||
@@ -83,6 +84,8 @@ worktrees/*
|
|||||||
|
|
||||||
# Local AI-agent review artifacts (omo evidence dumps)
|
# Local AI-agent review artifacts (omo evidence dumps)
|
||||||
.omo/
|
.omo/
|
||||||
|
# Legacy per-tool skill dir; skills live in .agents/skills (shared by all agents)
|
||||||
|
.mimocode/
|
||||||
|
|
||||||
# insta scratch files; the accepted .snap files ARE the assertions and are committed
|
# insta scratch files; the accepted .snap files ARE the assertions and are committed
|
||||||
*.snap.new
|
*.snap.new
|
||||||
|
|||||||
@@ -1,116 +0,0 @@
|
|||||||
---
|
|
||||||
name: issue-triage
|
|
||||||
description: Triage a GitHub issue — determine if it is already fixed, needs implementation, or should be closed. Searches related commits and PRs, verifies implementation status, and posts a triage comment or closes the issue. Use when the user provides an issue URL and asks whether it can be closed or needs work.
|
|
||||||
---
|
|
||||||
|
|
||||||
# Issue Triage
|
|
||||||
|
|
||||||
Use this skill when the user provides a GitHub issue URL and asks "can this be closed?", "is this already implemented?", "check completion status", or similar triage questions.
|
|
||||||
|
|
||||||
## Workflow
|
|
||||||
|
|
||||||
### 1. Fetch issue context
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gh issue view <N> --repo <owner/repo> --json title,body,state,comments,labels,updatedAt
|
|
||||||
```
|
|
||||||
|
|
||||||
Read the issue body to understand what was requested. Extract:
|
|
||||||
- The specific feature/fix/behavior described.
|
|
||||||
- Any linked PRs or commits mentioned in the body or comments.
|
|
||||||
- Any checklist items or sub-issues.
|
|
||||||
|
|
||||||
### 2. Search for related work
|
|
||||||
|
|
||||||
Search git history for commits referencing the issue:
|
|
||||||
```bash
|
|
||||||
git log --oneline --all --grep="<N>" | head -30
|
|
||||||
```
|
|
||||||
|
|
||||||
Search for related PRs:
|
|
||||||
```bash
|
|
||||||
gh pr list --search "fixes #<N> OR closes #<N> OR #<N>" --state all --json number,title,state,mergedAt
|
|
||||||
```
|
|
||||||
|
|
||||||
If the issue mentions specific PRs, check their status:
|
|
||||||
```bash
|
|
||||||
gh pr view <PR_N> --json state,mergedAt,title
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. Verify implementation
|
|
||||||
|
|
||||||
For each linked or related PR that is merged, verify the fix is actually present on the current main branch:
|
|
||||||
```bash
|
|
||||||
git log --oneline main | grep -i "<keyword>"
|
|
||||||
# or
|
|
||||||
git log --oneline main --grep="<PR_N>"
|
|
||||||
```
|
|
||||||
|
|
||||||
If the issue describes a specific defect, check the relevant code to confirm the fix is in place:
|
|
||||||
```bash
|
|
||||||
grep -n "<pattern>" crates/<relevant>/src/<file>.rs
|
|
||||||
```
|
|
||||||
|
|
||||||
For issues with checklists, verify each item individually. If sub-items are tracked as separate issues, check those too:
|
|
||||||
```bash
|
|
||||||
gh issue view <SUB_N> --repo <owner/repo> --json state
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. Determine verdict
|
|
||||||
|
|
||||||
- **All items fixed and merged**: Close with a summary comment listing what was fixed and which PRs.
|
|
||||||
- **Some items fixed, some remaining**: Comment with status of each item. Do not close.
|
|
||||||
- **Not yet implemented**: Comment with a summary of what remains. Do not close.
|
|
||||||
- **Superseded or no longer relevant**: Close with explanation.
|
|
||||||
|
|
||||||
### 5. Take action
|
|
||||||
|
|
||||||
Close with comment:
|
|
||||||
```bash
|
|
||||||
gh issue close <N> --repo <owner/repo> --comment "<body>"
|
|
||||||
```
|
|
||||||
|
|
||||||
Comment without closing:
|
|
||||||
```bash
|
|
||||||
gh issue comment <N> --repo <owner/repo> --body-file /tmp/triage.md
|
|
||||||
```
|
|
||||||
|
|
||||||
Update issue labels if needed:
|
|
||||||
```bash
|
|
||||||
gh issue edit <N> --repo <owner/repo> --add-label "completed" --remove-label "needs-triage"
|
|
||||||
```
|
|
||||||
|
|
||||||
Always use `--body-file` for multiline content, never inline `--body`.
|
|
||||||
|
|
||||||
### 6. Handle multi-issue batches
|
|
||||||
|
|
||||||
When the user asks to check multiple issues (e.g., "check all issues by user X" or "scan backlog for closable issues"):
|
|
||||||
1. List the issues: `gh issue list --repo <repo> --author <user> --state open --json number,title,updatedAt`
|
|
||||||
2. For each issue, run steps 1-5 above.
|
|
||||||
3. Report a summary table of all triaged issues with verdicts.
|
|
||||||
|
|
||||||
## Output format
|
|
||||||
|
|
||||||
### Issue Triage: #<N> — <title>
|
|
||||||
|
|
||||||
**State**: OPEN / CLOSED
|
|
||||||
**Linked PRs**: <list with merge status>
|
|
||||||
|
|
||||||
#### Assessment
|
|
||||||
<what was requested vs what is implemented>
|
|
||||||
|
|
||||||
#### Verdict
|
|
||||||
- Close — all items resolved by <PR list>
|
|
||||||
- Keep open — <remaining items>
|
|
||||||
- Not started — <what needs to be done>
|
|
||||||
|
|
||||||
#### Action taken
|
|
||||||
- Closed with comment / Commented / No action
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
- The user may ask in Chinese ("是否可以关闭", "检查完成情况"); respond in the same language.
|
|
||||||
- When closing, always include a summary of what was fixed and which PRs resolved it — this creates a useful audit trail.
|
|
||||||
- For issues in `rustfs/backlog`, use `--repo rustfs/backlog`.
|
|
||||||
- For issues in `rustfs/rustfs`, use `--repo rustfs/rustfs`.
|
|
||||||
- If the issue has sub-issues (GitHub sub-issues API), check each one's state before declaring the parent complete.
|
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
---
|
|
||||||
name: pr-review
|
|
||||||
description: Review a GitHub PR end-to-end from a URL or number — fetch metadata, inspect the diff, run multi-role adversarial review, check CI status, and post the review comment. Use when the user provides a PR link and asks to review it.
|
|
||||||
---
|
|
||||||
|
|
||||||
# PR Review
|
|
||||||
|
|
||||||
Use this skill when the user provides a GitHub PR URL or number and asks to review it. This covers the full review lifecycle: data gathering, code review, CI verification, and posting the result.
|
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
- Read `AGENTS.md` for the repository's adversarial validation policy and change-style rules.
|
|
||||||
- The `adversarial-validation` skill handles the review role playbooks; this skill orchestrates the workflow around it.
|
|
||||||
|
|
||||||
## Workflow
|
|
||||||
|
|
||||||
### 1. Gather PR context
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gh pr view <N> --json title,author,state,body,additions,deletions,changedFiles,commits,baseRefName,headRefName
|
|
||||||
gh pr diff <N> --name-only
|
|
||||||
```
|
|
||||||
|
|
||||||
Read the PR body and linked issues to understand the change's purpose. If the PR references an issue, fetch that too:
|
|
||||||
```bash
|
|
||||||
gh issue view <ISSUE> --json title,body,state
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Fetch the diff and classify the change
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git fetch origin pull/<N>/head:pr-<N>
|
|
||||||
git diff main...pr-<N> --stat
|
|
||||||
```
|
|
||||||
|
|
||||||
Classify the change by risk tier (per AGENTS.md):
|
|
||||||
- **Exempt**: docs/comments/instruction-only, formatting, typos.
|
|
||||||
- **Mechanical**: renames, file moves, test-only or tooling changes.
|
|
||||||
- **Standard** (default): any behavior change.
|
|
||||||
- **High risk**: locking, erasure coding, quorum/heal, replication, multipart, RPC, lifecycle/tiering, metadata formats, persistence/fsync, IAM/KMS/auth, on-disk/on-wire formats, S3 API-visible behavior.
|
|
||||||
|
|
||||||
### 3. Cluster changed files and delegate review
|
|
||||||
|
|
||||||
Group the changed files into logical clusters (by crate or functional area). For each cluster, spawn a subagent with a focused review prompt that includes:
|
|
||||||
- The cluster's changed files and their diffs.
|
|
||||||
- The applicable adversarial role probes (from the `adversarial-validation` skill).
|
|
||||||
- The repository's AGENTS.md rules relevant to that domain.
|
|
||||||
|
|
||||||
For standard-tier changes: correctness adversary + simplicity adversary + test-coverage skeptic, plus every role whose domain the diff touches.
|
|
||||||
For high-risk changes: run all seven roles.
|
|
||||||
|
|
||||||
Each subagent must produce findings (concrete failure scenario with file:line) or a null report ("attacked X, Y, Z — no break found").
|
|
||||||
|
|
||||||
### 4. Check CI status
|
|
||||||
|
|
||||||
```bash
|
|
||||||
gh pr checks <N>
|
|
||||||
```
|
|
||||||
|
|
||||||
If any checks fail, investigate:
|
|
||||||
```bash
|
|
||||||
gh run view --log-failed --job=<JOB_ID>
|
|
||||||
```
|
|
||||||
|
|
||||||
Determine whether failures are pre-existing (on main), flaky, or caused by the PR.
|
|
||||||
|
|
||||||
### 5. Synthesize findings
|
|
||||||
|
|
||||||
Combine all subagent findings into a structured review:
|
|
||||||
- **Summary**: one-paragraph overview of the change and overall assessment.
|
|
||||||
- **Findings**: each finding with severity (critical/major/minor/nit), file:line, concrete failure scenario, and suggested fix.
|
|
||||||
- **CI status**: pass/fail with notes on any failures.
|
|
||||||
- **Verdict**: APPROVE, REQUEST_CHANGES, or COMMENT.
|
|
||||||
|
|
||||||
### 6. Post the review
|
|
||||||
|
|
||||||
Write the review body to a temp file and post via CLI:
|
|
||||||
```bash
|
|
||||||
# Request changes
|
|
||||||
gh pr review <N> --request-changes --body-file /tmp/pr_review.md
|
|
||||||
|
|
||||||
# Approve
|
|
||||||
gh pr review <N> --approve --body-file /tmp/pr_review.md
|
|
||||||
|
|
||||||
# Comment only (no verdict)
|
|
||||||
gh pr review <N> --comment --body-file /tmp/pr_review.md
|
|
||||||
```
|
|
||||||
|
|
||||||
For inline comments on specific lines, use the GitHub API:
|
|
||||||
```bash
|
|
||||||
cat > /tmp/pr_review.json <<'EOF'
|
|
||||||
{
|
|
||||||
"body": "review body",
|
|
||||||
"event": "REQUEST_CHANGES",
|
|
||||||
"comments": [
|
|
||||||
{
|
|
||||||
"path": "crates/foo/src/bar.rs",
|
|
||||||
"line": 42,
|
|
||||||
"body": "finding description"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
gh api --method POST /repos/{owner}/{repo}/pulls/<N>/reviews --input /tmp/pr_review.json
|
|
||||||
```
|
|
||||||
|
|
||||||
Always use `--body-file` or `--input`, never inline multiline `--body`.
|
|
||||||
|
|
||||||
### 7. Handle follow-up
|
|
||||||
|
|
||||||
If the review requests changes:
|
|
||||||
- Monitor for new commits: `gh pr view <N> --json commits`
|
|
||||||
- Re-review changed files only: `git diff pr-<N>..origin/pull/<N>/head`
|
|
||||||
- Update the review when findings are addressed.
|
|
||||||
|
|
||||||
If CI was failing due to pre-existing main breakage:
|
|
||||||
- Comment on the PR noting the failure is pre-existing.
|
|
||||||
- Suggest updating the branch: `gh pr update-branch <N>`
|
|
||||||
|
|
||||||
## Output format
|
|
||||||
|
|
||||||
### PR Review: #<N> — <title>
|
|
||||||
|
|
||||||
**Author**: <author>
|
|
||||||
**Risk tier**: exempt | mechanical | standard | high-risk
|
|
||||||
**Changed files**: <count> across <cluster count> clusters
|
|
||||||
|
|
||||||
#### Summary
|
|
||||||
<one-paragraph overview>
|
|
||||||
|
|
||||||
#### Findings
|
|
||||||
| Severity | Location | Finding |
|
|
||||||
|----------|----------|---------|
|
|
||||||
| critical | file:line | concrete failure scenario |
|
|
||||||
|
|
||||||
#### CI Status
|
|
||||||
- All checks pass / Failing: <details>
|
|
||||||
|
|
||||||
#### Verdict
|
|
||||||
APPROVE / REQUEST_CHANGES / COMMENT
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
- The user may ask for review in Chinese; respond in the same language but keep the review body in English per AGENTS.md rules.
|
|
||||||
- When the user asks for "多角色对抗 review", run the full adversarial validation protocol — this skill's step 3 covers that.
|
|
||||||
- If the PR is from a fork, check `maintainerCanModify` before attempting to push fixes.
|
|
||||||
- For very large PRs (>50 files), cluster aggressively and delegate in parallel to keep review time reasonable.
|
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: rustfs-dev-check
|
- id: rustfs-fmt-check
|
||||||
name: rustfs dev-check
|
name: Rust formatting
|
||||||
entry: make dev-check
|
entry: cargo fmt --all --check
|
||||||
language: system
|
language: system
|
||||||
types: [rust]
|
types: [rust]
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
|||||||
@@ -7,8 +7,11 @@ This file contains repository-wide rules. Use the nearest subdirectory
|
|||||||
|
|
||||||
1. System/developer instructions.
|
1. System/developer instructions.
|
||||||
2. The current user request.
|
2. The current user request.
|
||||||
3. The nearest `AGENTS.md`.
|
3. Applicable `AGENTS.md` files, with the nearest file winning conflicts.
|
||||||
4. This file.
|
4. Selected skills and reference documents.
|
||||||
|
|
||||||
|
Nested instructions add to ancestor rules; they do not discard non-conflicting
|
||||||
|
rules. A skill cannot expand the user's requested scope or grant authorization.
|
||||||
|
|
||||||
## Operating Model
|
## Operating Model
|
||||||
|
|
||||||
@@ -21,63 +24,29 @@ This file contains repository-wide rules. Use the nearest subdirectory
|
|||||||
- Do not load every skill or inspect unrelated modules preemptively. Select a
|
- Do not load every skill or inspect unrelated modules preemptively. Select a
|
||||||
skill only when its description directly matches the request or changed
|
skill only when its description directly matches the request or changed
|
||||||
surface.
|
surface.
|
||||||
|
- Resolve repository workflow skills under `.agents/skills/` when a global
|
||||||
|
skill has the same name, unless the user explicitly selects another path.
|
||||||
- Avoid repeated reads and equivalent verification commands once enough
|
- Avoid repeated reads and equivalent verification commands once enough
|
||||||
evidence exists.
|
evidence exists.
|
||||||
|
- Search for relevant symbols/headings before reading long files; return only
|
||||||
|
matching ranges. If output is truncated, narrow the query instead of repeating
|
||||||
|
a full read. Keep reusable raw logs in task artifacts and report the evidence.
|
||||||
|
- Reuse authorization already given in the conversation. Resolve routine choices
|
||||||
|
within that scope and continue independent work while a material question is
|
||||||
|
pending. Before requesting missing approval, prepare the concrete result that
|
||||||
|
is already authorized; retain explicit merge and release gates.
|
||||||
|
|
||||||
## Worktree and Disk Hygiene
|
## Task-Specific Guidance
|
||||||
|
|
||||||
- Start implementation from the latest `origin/main` and confirm the requested
|
Read only the reference needed for the current task, once per unchanged context:
|
||||||
change is not already present.
|
|
||||||
- An existing clean, isolated task worktree is sufficient. Create another
|
|
||||||
worktree only when the current checkout is shared, dirty with unrelated work,
|
|
||||||
or belongs to another task.
|
|
||||||
- Never commit from a shared checkout.
|
|
||||||
- Use a task-specific branch named `<type>/<topic>`, such as `fix/...`,
|
|
||||||
`feat/...`, `test/...`, or `docs/...`, unless the user specifies a name.
|
|
||||||
- Do not include agent, tool, contributor, account, or organization names in
|
|
||||||
branch names.
|
|
||||||
- Push to the user-requested remote or the repository's configured push remote.
|
|
||||||
Do not hard-code or infer a remote from an account name.
|
|
||||||
- Check free space before artifact-heavy builds, tests, coverage, or downloads.
|
|
||||||
Re-check before a broad gate when space is tight.
|
|
||||||
- Remove only task-owned temporary/build artifacts. Never delete another task's
|
|
||||||
worktree or uncommitted data.
|
|
||||||
- At handoff, mention disk or cleanup details only when they affected execution
|
|
||||||
or artifacts/worktrees remain intentionally.
|
|
||||||
|
|
||||||
## Change Style
|
- Before code changes or artifact-heavy work, read [implementation rules](.agents/references/implementation.md).
|
||||||
|
For a read-only code review, use its change-style and boundary sections as needed.
|
||||||
- Preserve existing control flow unless changing it is required for correctness.
|
- Before commits, pushes, PR creation/updates, or posting to PRs/issues/discussions,
|
||||||
- Prefer a direct local edit over new files, wrappers, managers, or speculative
|
read [Git and PR rules](.agents/references/pull-requests.md).
|
||||||
abstractions.
|
Reuse existing authorization; a reference does not authorize posting, merging, or publishing.
|
||||||
- Add a helper only when it removes current duplication, names a real domain
|
- Preserve unrelated work. Never commit from a shared checkout or delete another task's artifacts.
|
||||||
boundary, or isolates a non-trivial invariant.
|
- Source comments, commits, PR titles, and PR bodies are in English.
|
||||||
- Remove an in-scope path superseded by the change. If compatibility requires it,
|
|
||||||
adapt at the boundary to one canonical core and use the repository's
|
|
||||||
`RUSTFS_COMPAT_TODO` policy.
|
|
||||||
- Comments explain non-obvious invariants or reasons. Do not narrate code or
|
|
||||||
record change history.
|
|
||||||
- Mention unrelated problems when useful; do not fix them in a narrow task.
|
|
||||||
|
|
||||||
## Reuse and Boundary Rules
|
|
||||||
|
|
||||||
- Before adding helpers, constants, fixtures, or wrappers, search the touched
|
|
||||||
crate, the domain-owning crate, `crates/utils`, `crates/common`, and relevant
|
|
||||||
direct dependencies.
|
|
||||||
- Reuse requires matching semantics: normalization, error types, deadlines,
|
|
||||||
durability, and compatibility must fit the call site. A narrowly named local
|
|
||||||
helper is better than forced reuse with different semantics.
|
|
||||||
- Validate untrusted input at its trust boundary, then trust the validated type.
|
|
||||||
Values crossing disk, RPC, persistence, or version boundaries remain
|
|
||||||
untrusted at every consumer.
|
|
||||||
- Re-check boundary values immediately before destructive actions such as
|
|
||||||
delete, overwrite, or quorum decisions.
|
|
||||||
- Every new branch needs a concrete triggering input/state. For decoded or peer
|
|
||||||
data, corruption and mixed-version input are valid triggers.
|
|
||||||
- Required values must return a typed error when absent or corrupt; do not use a
|
|
||||||
default that converts corruption into a plausible result.
|
|
||||||
- Attach error context once where it is actionable. Do not erase typed errors
|
|
||||||
below aggregation or quorum layers.
|
|
||||||
|
|
||||||
## Sources of Truth
|
## Sources of Truth
|
||||||
|
|
||||||
@@ -86,6 +55,7 @@ This file contains repository-wide rules. Use the nearest subdirectory
|
|||||||
- CI gates: `.github/workflows/ci.yml`.
|
- CI gates: `.github/workflows/ci.yml`.
|
||||||
- PR format: `.github/pull_request_template.md`.
|
- PR format: `.github/pull_request_template.md`.
|
||||||
- Architecture routing: `ARCHITECTURE.md` and `docs/architecture/README.md`.
|
- Architecture routing: `ARCHITECTURE.md` and `docs/architecture/README.md`.
|
||||||
|
- Knowledge-base index and documentation rules: `docs/architecture/README.md`.
|
||||||
- Agent skills: `.agents/skills/*/SKILL.md`.
|
- Agent skills: `.agents/skills/*/SKILL.md`.
|
||||||
|
|
||||||
Do not commit one-shot plans, trackers, migration ledgers, benchmark snapshots,
|
Do not commit one-shot plans, trackers, migration ledgers, benchmark snapshots,
|
||||||
@@ -146,67 +116,25 @@ requested adversarial/design reviews, and agent-instruction changes that alter
|
|||||||
execution. Ordinary questions, diagnoses, status reports, non-adversarial code
|
execution. Ordinary questions, diagnoses, status reports, non-adversarial code
|
||||||
reviews, and low-risk planning do not trigger it.
|
reviews, and low-risk planning do not trigger it.
|
||||||
|
|
||||||
Risk and review shape:
|
For applicable work and substantial PR reviews, read the [risk tiers and review shape](.agents/references/adversarial-validation.md).
|
||||||
|
Load only the matching domain probes; ordinary reviews do not become adversarial
|
||||||
|
merely because this reference exists.
|
||||||
|
|
||||||
- **Exempt:** documentation, comments, formatting, or typos with no runtime,
|
A review has no finding quota; `No findings` is a complete outcome. A request to
|
||||||
build, test, or agent-execution effect.
|
find problems is not evidence that a defect exists. Before reporting a candidate,
|
||||||
- **Mechanical:** renames, moves, test/tooling-only changes, and agent-rule
|
check callers, invariants, and existing tests for evidence that disproves it.
|
||||||
changes. Run correctness and simplicity lenses.
|
Findings need `file:line` and a concrete failure or violation of an explicit
|
||||||
- **Standard:** localized behavior changes. Run one integrated final-diff pass
|
requirement. Missing required tests/checks are verification gaps, not proof of a
|
||||||
covering correctness, simplicity, and test coverage; add only domain lenses
|
runtime bug; name the unprotected behavior or unmet gate. Keep optional style or
|
||||||
matched by the diff.
|
refactoring preferences out of defect findings unless that review was requested.
|
||||||
- **High risk / substantial PR review:** high risk includes locking,
|
|
||||||
erasure/quorum/heal, replication, multipart, RPC, lifecycle/tiering,
|
|
||||||
persistence/fsync, IAM/KMS/auth, cryptography, on-disk/on-wire formats, and
|
|
||||||
S3-visible semantics. Cover all applicable lenses using exactly two
|
|
||||||
independent reviewers when delegation is explicitly authorized. Split the
|
|
||||||
lenses between them. Otherwise perform two fresh sequential passes.
|
|
||||||
|
|
||||||
Available domain lenses are security, concurrency/durability, compatibility,
|
Fix or rebut supported findings within the authorized scope. Once the required
|
||||||
and performance. Select `.agents/skills/adversarial-validation/SKILL.md` for an
|
passes are complete, stop. Reopen only for changed code, new evidence, an
|
||||||
explicit adversarial request, a high-risk change, or a substantial PR review;
|
unresolved finding, or an explicit re-review request; an unchanged diff does not
|
||||||
then read only its matching role references. A routine standard pass does not
|
need another pass at every conversation turn or workflow handoff.
|
||||||
load the playbook unless the reviewer needs a RustFS-specific probe.
|
|
||||||
|
|
||||||
A finding must name a concrete input/state/interleaving and wrong outcome, or a
|
|
||||||
specific missing regression check, with `file:line`. Resolve it by fixing the
|
|
||||||
diff or rebutting it with code-path/test/invariant evidence. After a non-trivial
|
|
||||||
fix, rerun only affected lenses.
|
|
||||||
|
|
||||||
For high-risk PRs, record one concise verdict per covered lens in the PR body.
|
For high-risk PRs, record one concise verdict per covered lens in the PR body.
|
||||||
|
|
||||||
## Pull Request Lifecycle
|
|
||||||
|
|
||||||
- Creating or updating a PR includes one immediate snapshot of checks,
|
|
||||||
mergeability, reviews, and unresolved threads.
|
|
||||||
- Unless the user explicitly requests monitoring, a release workflow requires
|
|
||||||
it, or an automation already owns it, hand off after the PR is open with the
|
|
||||||
current state and next event to watch. Do not delay ordinary handoff with
|
|
||||||
fixed quiet-period sleeps.
|
|
||||||
- For requested monitoring, use event-driven or bounded waits. Report only state
|
|
||||||
changes, actionable failures, or a meaningful prolonged delay.
|
|
||||||
- Investigate failures/comments before changing code. Fix task-attributable
|
|
||||||
issues, rerun affected verification, push, reply or resolve the thread, then
|
|
||||||
resume the requested monitor.
|
|
||||||
- Never merge without required reviewer approval or explicit authority.
|
|
||||||
- After an observed merge, verify the commit reached the base, then clean the
|
|
||||||
task worktree/branch when safe. Preserve unmerged work for closed PRs unless
|
|
||||||
deletion was explicitly authorized.
|
|
||||||
|
|
||||||
## Git and PR Baseline
|
|
||||||
|
|
||||||
- Follow Conventional Commits; keep the subject at most 72 characters.
|
|
||||||
- Source comments, commits, PR titles, and PR bodies are in English.
|
|
||||||
- Keep every heading from `.github/pull_request_template.md`; use `N/A` where
|
|
||||||
needed and include commands actually run.
|
|
||||||
- Use `--body-file` for multiline `gh pr create`/`gh pr edit` content.
|
|
||||||
- PR/issue/discussion content must not contain the literal sequence `\n` or
|
|
||||||
hard-wrapped prose paragraphs.
|
|
||||||
- Do not include local absolute paths or tool-specific labels/prefixes in GitHub
|
|
||||||
content.
|
|
||||||
- Resolve review threads after the underlying issue is fixed. If declining a
|
|
||||||
suggestion, reply with a short evidence-based reason.
|
|
||||||
|
|
||||||
## Security Baseline
|
## Security Baseline
|
||||||
|
|
||||||
- Never commit secrets, credentials, or key material.
|
- Never commit secrets, credentials, or key material.
|
||||||
@@ -243,12 +171,6 @@ Use `.agents/skills/rustfs-logging-governance/SKILL.md` for logging changes.
|
|||||||
- `DataUsageCacheInfo` and `DataUsageEntry` keep their hand-written map
|
- `DataUsageCacheInfo` and `DataUsageEntry` keep their hand-written map
|
||||||
serialization and new fields remain `#[serde(default)]` for older readers.
|
serialization and new fields remain `#[serde(default)]` for older readers.
|
||||||
|
|
||||||
## Naming
|
|
||||||
|
|
||||||
Use Rust API naming: `SCREAMING_SNAKE_CASE` constants/statics, `snake_case`
|
|
||||||
functions/variables, and `PascalCase` types. Do not rename unrelated existing
|
|
||||||
violations.
|
|
||||||
|
|
||||||
## Scoped Guidance
|
## Scoped Guidance
|
||||||
|
|
||||||
Before editing, locate the nearest instructions with:
|
Before editing, locate the nearest instructions with:
|
||||||
@@ -258,4 +180,4 @@ git ls-files '*AGENTS.md'
|
|||||||
```
|
```
|
||||||
|
|
||||||
The nearest file wins for domain invariants. Keep generic workflow and
|
The nearest file wins for domain invariants. Keep generic workflow and
|
||||||
validation policy in this root file.
|
validation policy in this root file and its task-specific references.
|
||||||
|
|||||||
+3
-3
@@ -62,7 +62,7 @@ rustfs/ # Workspace root (virtual manifest)
|
|||||||
│ ├── utils/ # Pure utility functions
|
│ ├── utils/ # Pure utility functions
|
||||||
│ ├── ... # (see "Crate Reference" below)
|
│ ├── ... # (see "Crate Reference" below)
|
||||||
│ └── e2e_test/ # End-to-end integration tests
|
│ └── e2e_test/ # End-to-end integration tests
|
||||||
└── docs/ # Design documents and analysis
|
└── docs/ # Agent knowledge base: contracts, runbooks, testing rules (index: docs/architecture/README.md)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Main Crate Layers (`rustfs/src/`)
|
### Main Crate Layers (`rustfs/src/`)
|
||||||
@@ -92,7 +92,7 @@ refactors.
|
|||||||
|
|
||||||
| Domain | Current workspace crates | Responsibility |
|
| Domain | Current workspace crates | Responsibility |
|
||||||
|--------|--------------------------|----------------|
|
|--------|--------------------------|----------------|
|
||||||
| Foundation | `checksums`, `common`, `config`, `data-usage`, `heal-contracts`, `scanner-contracts`, `utils` | Shared configuration, data-usage models, heal/scanner domain contracts, utilities, and checksums. |
|
| Foundation | `checksums`, `common`, `config`, `data-usage`, `heal-contracts`, `scanner-metrics`, `utils` | Shared configuration, data-usage models, heal domain contracts, scanner telemetry types, utilities, and checksums. |
|
||||||
| I/O and storage | `concurrency`, `ecstore`, `filemeta`, `heal`, `io-core`, `io-metrics`, `lifecycle`, `lock`, `object-capacity`, `object-data-cache`, `replication`, `rio`, `rio-v2`, `s3-client`, `scanner`, `storage-api` | Erasure-coded object storage, metadata, recovery, lifecycle, replication, locking, cache, I/O pipelines, and the engine-side S3 client for remote tier/transition targets. |
|
| I/O and storage | `concurrency`, `ecstore`, `filemeta`, `heal`, `io-core`, `io-metrics`, `lifecycle`, `lock`, `object-capacity`, `object-data-cache`, `replication`, `rio`, `rio-v2`, `s3-client`, `scanner`, `storage-api` | Erasure-coded object storage, metadata, recovery, lifecycle, replication, locking, cache, I/O pipelines, and the engine-side S3 client for remote tier/transition targets. |
|
||||||
| Security and identity | `credentials`, `crypto`, `iam`, `keystone`, `kms`, `policy`, `security-governance`, `signer`, `tls-runtime`, `trusted-proxies` | Credentials, authentication, authorization, encryption, key management, TLS, and security contracts. |
|
| Security and identity | `credentials`, `crypto`, `iam`, `keystone`, `kms`, `policy`, `security-governance`, `signer`, `tls-runtime`, `trusted-proxies` | Credentials, authentication, authorization, encryption, key management, TLS, and security contracts. |
|
||||||
| Protocols and contracts | `extension-schema`, `madmin`, `protos`, `protocols`, `s3-ops`, `s3-types`, `s3select-api`, `s3select-query` | Admin, inter-node, S3, S3 Select, and optional protocol contracts. |
|
| Protocols and contracts | `extension-schema`, `madmin`, `protos`, `protocols`, `s3-ops`, `s3-types`, `s3select-api`, `s3select-query` | Admin, inter-node, S3, S3 Select, and optional protocol contracts. |
|
||||||
@@ -135,7 +135,7 @@ default build (lifecycle:
|
|||||||
`crates/ecstore/src/bucket/replication/replication_state.rs`) — a naming
|
`crates/ecstore/src/bucket/replication/replication_state.rs`) — a naming
|
||||||
collision, not copies; renaming is tracked in rustfs/backlog#1847.
|
collision, not copies; renaming is tracked in rustfs/backlog#1847.
|
||||||
- `LastMinuteLatency` has two deliberately different implementations: the
|
- `LastMinuteLatency` has two deliberately different implementations: the
|
||||||
per-second bucketed accumulator in `crates/scanner-contracts/src/last_minute.rs` and
|
per-second bucketed accumulator in `crates/scanner-metrics/src/last_minute.rs` and
|
||||||
the in-memory endpoint-health sample tracker in
|
the in-memory endpoint-health sample tracker in
|
||||||
`crates/ecstore/src/bucket/bucket_target_sys.rs` (its doc comment explains
|
`crates/ecstore/src/bucket/bucket_target_sys.rs` (its doc comment explains
|
||||||
why it stays local).
|
why it stays local).
|
||||||
|
|||||||
@@ -7,11 +7,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Replication
|
||||||
|
|
||||||
|
- Object Lock replication PUTs now carry a required integrity header, fixing target rejection introduced by the plain-payload default ([#7097](https://github.com/rustfs/rustfs/pull/7097)). This changes the default outbound request for locked objects but adds no persisted format.
|
||||||
|
- Multipart source objects stay on the multipart transport even when their checksum record is a whole-object checksum, so objects above the single-PUT limit remain replicable ([#7047](https://github.com/rustfs/rustfs/pull/7047)).
|
||||||
|
- Targets that mint their own version IDs now use a per-target version ledger for tag, retention, legal-hold, and permanent-delete mutations; ambiguous pre-ledger matches fail with backoff instead of guessing ([#7368](https://github.com/rustfs/rustfs/pull/7368)). This adds dual-prefixed internal metadata keys that older readers ignore.
|
||||||
|
- Single-part source checksums are forwarded as `x-amz-checksum-*` headers instead of user metadata, so the replica preserves checksum responses ([#7313](https://github.com/rustfs/rustfs/pull/7313)). This changes the default outbound headers for checksummed objects.
|
||||||
|
- Site-replication outage recovery now uses a bounded 30-second retry drain plus the 600-second full reconciliation pass, persists destructive liabilities before local deletion, and fences replay settlement and peer edits ([#7148](https://github.com/rustfs/rustfs/pull/7148)). Persisted additions are optional and ignored by older readers.
|
||||||
|
- IAM snapshot/deletion replay, target-assigned delete-marker purges, timestamp ordering, and best-effort peer broadcast now close the control-plane gaps found by the R6 review ([#7195](https://github.com/rustfs/rustfs/pull/7195)).
|
||||||
|
- Upgrade and rollback: upgrade every node in one site consecutively and verify reconciliation before moving to the next site; do not intentionally run a site mixed-version. Target-version ledger keys are harmless on rollback, although old code cannot use their routing. Before rolling back past [#7307](https://github.com/rustfs/rustfs/pull/7307), drain or repair every pending version purge: older code can free a retained version's data directory before its remote purge is acknowledged. See `docs/operations/site-replication-operations.md`.
|
||||||
|
|
||||||
|
### Security
|
||||||
|
- **Presigned URLs honour only signed headers** (GHSA-g8w9-qw9q-fghr): a SigV4 presigned request that carries an `x-amz-*` request header not listed in `X-Amz-SignedHeaders` is now rejected with `403 AccessDenied` ("There were headers present in the request which were not signed"), matching AWS S3. Previously the holder of a presigned `PutObject` URL could add unsigned `x-amz-tagging`, `x-amz-storage-class`, `x-amz-website-redirect-location`, ACL, metadata, Object Lock or SSE headers and have them applied. Presigners that intend a property must set it before signing so the SDK lists the header in `SignedHeaders`; `x-amz-cf-id` (CloudFront) remains tolerated unsigned. Header-signed SigV4 and SigV2 requests are unchanged.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- **Fresh multi-pool bootstrap with distinct format creators**: a new deployment whose pools have their first endpoint on different nodes (for example two single-node pools) could never publish its initial `pool.bin`: each node held fresh-bootstrap proof only for the pool it formatted, the deployment-wide proof collapsed to none, and every node died with `pool metadata recovery required: no durable bootstrap identity or pool.bin replica is available` after the startup retry budget. The first pool's creator now mints the pending cluster identity on its own pool, every other creator copies that nonce-bound identity onto the pool it formatted first-hand, and the elected writer publishes `pool.bin` once every pool replica carries the same pending identity. Corrupt or disagreeing replicas, pools that merely have a format, expansion pools joining an initialized deployment, and restarts without first-hand proof still fail closed. Non-elected nodes that start before `pool.bin` exists, and the elected writer while it waits for the other creators, no longer latch their pool-metadata write gate for the life of the process. Refs rustfs/backlog#2338, rustfs/backlog#2375.
|
||||||
|
- **Lock RPC timeout storms** (#7363): the remote lock client no longer evicts and re-dials the shared internode HTTP/2 channel on every request deadline. A timeout evicts only when the peer has not completed any lock RPC for two deadlines, evictions and transport-failure re-dials are rate limited per peer (`RUSTFS_OBJECT_LOCK_RPC_EVICTION_COOLDOWN_MS`, default 5 s), and a timed-out request is left running instead of being reset (bounded per peer by `RUSTFS_OBJECT_LOCK_RPC_DETACHED_LIMIT`, default 256), so a slow lock endpoint can no longer drive the `RST_STREAM`/`GOAWAY too_many_resets`/reconnect loop. A lock granted after its caller timed out is released immediately, and unlocks that fail the quick retries continue on a deferred 1/2/4/8/16 s schedule before the server lease reclaims them. New `rustfs_remote_lock_*` metrics cover timeouts, evictions, suppressed evictions, detached streams, late completions and late releases per peer. Operator guide at `docs/operations/lock-rpc-storm-protection.md`.
|
||||||
|
- **KMS failures on the S3 data path carry an actionable status**: only "key not found" and a backend outage were classified; every other KMS failure — a disabled or pending-deletion key, a denied KMS grant, an encryption-context mismatch, an unsupported algorithm, a credential or timeout failure, a capability the backend does not have — collapsed onto `500 InternalError`. SDKs therefore applied exponential backoff to configuration errors that no retry can fix, and monitoring filed every one of them as a server fault. Unusable-key and request-side failures now return `400`, a denied grant `403`, transient backend failures `503` — including a key store the backend could not read, so an outage stays distinguishable from a missing key all the way to the client — and a missing backend capability `501`. Damaged or unreadable key material still returns `500`, which is what it is.
|
||||||
|
- **SSE-C on buckets with default encryption**: a `PutObject` carrying a valid SSE-C header triple on a bucket that has default encryption configured no longer fails with `400 InvalidArgument` ("The SSE-C and managed server-side encryption headers cannot be used together"). PUT and the POST-object/extract path resolved the bucket default with a hard-coded "no explicit SSE-C" flag, so the default was layered onto the request and then tripped the request's own mutual-exclusion check; an SSE-C request now suppresses the bucket default on all three write paths, matching COPY and AWS S3. Every bucket with default encryption previously refused SSE-C single PUTs outright, while `CreateMultipartUpload` on the same bucket succeeded.
|
||||||
|
- **Explicit SSE-S3 on SSE-KMS-default buckets**: `x-amz-server-side-encryption: AES256` against a bucket whose default is `aws:kms` no longer fails with `400 InvalidArgument`. The bucket default's KMS key id was inherited independently of the effective algorithm, producing a self-contradictory `AES256` + key-id pair; the key id is now inherited only when the effective algorithm is `aws:kms`. `PutBucketEncryption` fills in a default key id automatically, so this affected nearly every SSE-KMS-default bucket.
|
||||||
|
- **Restore of encrypted or compressed multipart objects (silent data corruption)**: restoring a multipart object from a remote tier addressed the tier in *plaintext* coordinates while the copy-back reads the *stored* representation. Every part received a misaligned slice of the remote object whose length still satisfied the range, the hash reader and the completion size check, so the restore reported success and replaced the object's bytes. Restore now accumulates stored part sizes, passes the stored length to the hash reader alongside the plaintext length, and validates against the stored size. Objects restored by an affected release must be re-restored from the tier or recovered from a backup — this release does not detect or repair them retroactively.
|
||||||
|
- **Restore no longer drifts the object ETag**: the copy-back digests stored (encrypted or compressed) bytes, so the recomputed MD5 is not the object's public ETag. Single-part and multipart restores now preserve the original object ETag, and each restored part keeps its own recorded part ETag.
|
||||||
|
- **ILM archive no longer forwards encryption metadata to the tier**: transition requests carried the object's SSE headers and the RustFS-wrapped data key as request headers. Any S3 target rejected an SSE-C archive outright (`400`, no key supplied), an SSE-KMS archive asked the target to encrypt a second time under a key id it does not own, and the wrapped DEK left the cluster. The archive request now strips every SSE header and encryption marker using the same predicate the replication path uses; the local `xl.meta` keeps all of it, so read-through and restore are unaffected.
|
||||||
|
- **KMS reload is no longer a no-op on a node whose KMS failed to start**: `POST /rustfs/admin/v3/kms/reload` short-circuited whenever the persisted configuration matched the in-memory one byte for byte. A node whose KMS failed to start (for example Vault briefly unreachable during a rolling restart) keeps that configuration and sits in `Error`, so the documented recovery call returned "reloaded successfully" while leaving the node down — and did the same on every peer through the reload broadcast. Reload now short-circuits only for a service that is actually running, and otherwise reconfigures, which starts the service.
|
||||||
|
- **AWS KMS capability reporting**: the AWS backend no longer advertises `versioning` support through `GET /rustfs/admin/v3/kms/status`. AWS KMS key versions are not enumerable through this backend, as the backend documentation already stated.
|
||||||
|
- **Multipart admission queue**: an `UploadPart` waiting for a foreground write permit now waits at most 10 s by default (`RUSTFS_PUT_MULTIPART_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS`, previously 30 s), so a queued part returns S3 `SlowDown` before the client's socket write timeout drops the connection. Separately, the API listener no longer forces a 4 MiB `SO_RCVBUF` on every accepted socket (kernel autotuning applies; `RUSTFS_HTTP_SOCKET_RECV_BUFFER_BYTES` restores a fixed size), so a queued part no longer lets up to 8 MiB of unread body accumulate in kernel memory per connection, which is what throttled whole nodes under SDK-default multipart concurrency. Fixes #7385.
|
||||||
- **Helm Ingress**: `customAnnotations` are now merged with class-specific annotations (nginx/traefik) instead of being ignored when `ingress.className` is set.
|
- **Helm Ingress**: `customAnnotations` are now merged with class-specific annotations (nginx/traefik) instead of being ignored when `ingress.className` is set.
|
||||||
- **Per-pool erasure parity**: Erasure parity (STANDARD and reduced-redundancy) is now resolved independently for every pool instead of reusing the first pool's value. A heterogeneous topology — for example a 4-drive pool plus a 2-drive pool created during expansion — previously inherited the first pool's parity and could resolve to zero data shards in the smaller pool, panicking Reed-Solomon construction on write. Automatic parity now resolves per pool (for example `2+2` in the 4-drive pool and `1+1` in the 2-drive pool). Fixes #4801.
|
- **Per-pool erasure parity**: Erasure parity (STANDARD and reduced-redundancy) is now resolved independently for every pool instead of reusing the first pool's value. A heterogeneous topology — for example a 4-drive pool plus a 2-drive pool created during expansion — previously inherited the first pool's parity and could resolve to zero data shards in the smaller pool, panicking Reed-Solomon construction on write. Automatic parity now resolves per pool (for example `2+2` in the 4-drive pool and `1+1` in the 2-drive pool). Fixes #4801.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- **On-Demand Migration**: Lazy, pull-style migration of an existing S3-compatible bucket into RustFS. A local bucket is attached to an external source bucket; a GET for a key that does not exist locally fetches it from the source, streams it to the client, and stores it locally in the same pass, so every later read is served locally. The module is on by default; set `RUSTFS_ON_DEMAND_MIGRATION_ENABLED=false` on every node to turn it off. A bucket with no source configured behaves exactly as before — the runtime never intervenes on its reads and makes no outbound call. Operator guide at `docs/operations/on-demand-migration.md`.
|
||||||
|
- Per-bucket configuration persisted as `on-demand-migration.json` in the bucket metadata: source provider (`s3`, `aws`, `minio`, `rustfs`, `r2`, `gcs`), endpoint, region, addressing style, credentials and TLS material, an optional key-prefix filter and source-prefix rewrite, and a policy block covering the inline size threshold, multipart part size, concurrency, queue capacity, timeouts, bandwidth limit and negative-cache TTL
|
||||||
|
- Admin routes under `/rustfs/admin/v3/on-demand-migration/{bucket}`: `PUT` (with `?dry-run=true` to validate and probe the source without saving), `GET`, `DELETE`, `GET .../status`, plus `POST .../backfill?op=start|cancel` and `GET .../backfill` for the background full-backfill job with its resumable checkpoint. Authorized by the new `admin:GetBucketOnDemandMigration` and `admin:SetBucketOnDemandMigration` actions; every response redacts `secret_key` and `session_token`
|
||||||
|
- Read paths: an object at or below `policy.inline_max_bytes` (16 MiB by default) is teed to the client and to the local store in a single source read; a larger object or a Range read streams through and a background pull stores the whole object. A HEAD miss is proxied to the source and stores nothing (`policy.head = local_only` disables it). Every source-backed response carries `x-rustfs-on-demand-migration: source`
|
||||||
|
- Protections: a per-source circuit breaker, a per-key negative cache, singleflight per key, a concurrency limit and a bounded pull queue shared by the inline and background paths, an optional bandwidth limit, an anti-loop request marker, and the shared outbound-endpoint (SSRF) policy
|
||||||
|
- Metrics under `rustfs_on_demand_migration_*` (`requests_total`, `pulled_bytes_total`, `pulled_objects_total`, `pull_failures_total`, `inflight_pulls`, `queue_depth`, `source_latency_seconds_*`, `breaker_state`), mirrored per node by the admin status route
|
||||||
|
- Listings: `ListObjects` v1 remains local with ordinary key markers. `ListObjectsV2` can merge source objects when `policy.list_through = true`; this is off by default
|
||||||
|
- Upgrade and rollback: finish upgrading every node before enabling ODM. An rc.5 node that writes bucket configuration drops the ODM fields from metadata; neither a later restart nor moving the service out of ECStore recovers them. Before rollback, disable ODM and securely retain the original full configuration and credentials. After every node returns to a compatible version, restore and validate that configuration. Redacted exports cannot replace the credential backup; source-only objects are unavailable through RustFS while ODM is disabled. See the upgrade and rollback section of `docs/operations/on-demand-migration.md`
|
||||||
|
- Optional Google dependencies: default and `full` server builds retain native GCS support. `cargo build -p rustfs --no-default-features --features ftps,webdav` excludes Google SDKs while preserving configuration decoding and redaction; native GCS ODM and tier operations require the `gcs` feature. Do not use that build with existing GCS-tiered data
|
||||||
|
- Limitations: PUT and DELETE never reach the source; a source object updated after it was pulled is not re-fetched; SSE-C source objects are unsupported and answer 424; `Last-Modified` on a pulled object is the local write time, with the source timestamp kept in metadata
|
||||||
- **NATS JetStream Publish Path**: Opt-in at-least-once delivery for the NATS notify and audit targets. A NATS Core publish flushes to the connection without awaiting a broker acknowledgement, so an event can be lost across a broker restart or a reconnect after the send queue has already cleared it. A queued event now clears only after the JetStream `PublishAck`, so bucket notifications survive those interruptions. Off by default and byte-identical to the NATS Core path when disabled.
|
- **NATS JetStream Publish Path**: Opt-in at-least-once delivery for the NATS notify and audit targets. A NATS Core publish flushes to the connection without awaiting a broker acknowledgement, so an event can be lost across a broker restart or a reconnect after the send queue has already cleared it. A queued event now clears only after the JetStream `PublishAck`, so bucket notifications survive those interruptions. Off by default and byte-identical to the NATS Core path when disabled.
|
||||||
- Three configuration keys per target: `JETSTREAM_ENABLE`, `JETSTREAM_STREAM_NAME`, and `JETSTREAM_ACK_TIMEOUT_SECS`, under the `RUSTFS_NOTIFY_NATS_` and `RUSTFS_AUDIT_NATS_` prefixes
|
- Three configuration keys per target: `JETSTREAM_ENABLE`, `JETSTREAM_STREAM_NAME`, and `JETSTREAM_ACK_TIMEOUT_SECS`, under the `RUSTFS_NOTIFY_NATS_` and `RUSTFS_AUDIT_NATS_` prefixes
|
||||||
- Durable store-and-forward with a stable dedup id sent as the `Nats-Msg-Id` header, so a replay after a crash is collapsed by the server duplicate window
|
- Durable store-and-forward with a stable dedup id sent as the `Nats-Msg-Id` header, so a replay after a crash is collapsed by the server duplicate window
|
||||||
@@ -38,6 +72,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Four-layer regression-prevention tests guard against silent feature deletion: compile-time module assertion, module-presence unit test, cross-module `Protocol` enum assertion, end-to-end SSH banner test against the running binary
|
- Four-layer regression-prevention tests guard against silent feature deletion: compile-time module assertion, module-presence unit test, cross-module `Protocol` enum assertion, end-to-end SSH banner test against the running binary
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- **Encryption and KMS work merged since `1.0.0-rc.5`** (entries were missing from this section):
|
||||||
|
- **Persisted KMS configuration secrets** are sealed field-by-field with `RUSTFS_KMS_CONFIG_SECRET`. **When the variable is unset the secrets are persisted in cleartext and the server only warns** (`persisted KMS configuration carries cleartext secrets`); it never refuses the write. Set it, identically, on every node, and re-save the configuration to seal an existing one.
|
||||||
|
- **New v2 ciphertext frame format** with per-frame index binding and final-frame authentication. Its write switch `RUSTFS_ENCRYPTION_FRAME_V2` is **off by default**: v2 frames are unreadable by nodes without v2 read support, and encrypted ciphertext travels verbatim through transition, decommission and SSE-C replication passthrough, so turn it on only after every node — and every RustFS warm/replication target that receives raw ciphertext — runs a release with v2 read support. Reading v2 objects needs no switch.
|
||||||
|
- **Per-key SSE-KMS authorization** (`RUSTFS_KMS_ENFORCE_SSE_KEY_POLICY`, default `false`). With it on, anonymous callers hold no KMS grants, so **a public bucket serving SSE-KMS objects is an incompatible combination** and those reads return `AccessDenied`.
|
||||||
|
- Envelope context binding as KMS AAD (`ENV_KMS_ENVELOPE_AAD`, off by default; a node that predates the field cannot open bound envelopes).
|
||||||
|
- Vault custom CA and mutual TLS; object-level DEK rewrap plus a batch rekey admin API; a backend-locality runtime signal on `kms/status`.
|
||||||
|
- Single-pass decryption for encrypted GET, and encrypted single-part closed-range seek — the latter is now **on by default** (`RUSTFS_ENCRYPTED_RANGE_SEEK`, default `true`; the switch remains as a kill switch).
|
||||||
|
- **Vault static tokens are now tracked and renewed**: with `Token` authentication RustFS hard-coded "this token has no lease", so the renewal task never started and no remaining-TTL gauge was published. `vault token create` grants a 768-hour TTL by default, which turned a healthy-looking cluster into one where every KMS call returned 403 about a month later, with no self-healing short of a restart or reconfigure. RustFS now calls `auth/token/lookup-self` at login and adopts what Vault reports: a non-expiring token behaves exactly as before, an expiring renewable one is renewed at half TTL like the other auth methods, and an expiring non-renewable one logs `vault_static_token_not_renewable` and publishes its remaining TTL. The probe never fails the login: a token whose policy omits `lookup-self` (Vault's `default` policy grants it), or a Vault that is unreachable at that moment, logs `vault_static_token_lookup_failed` and falls back to the previous no-lease behaviour, so no deployment that works today stops working.
|
||||||
|
- **SSE-C over a plaintext transport is reported**: AWS S3 and MinIO refuse an SSE-C request that did not arrive over TLS, because the customer key travels in a request header. RustFS accepted them on any transport and still does by default — flipping to a rejection inside a release window would break plaintext staging and test deployments. Each such request now increments `rustfs_ssec_plaintext_requests_total` and logs one `ssec_request_without_tls` warning per process, and `RUSTFS_SSE_C_REQUIRE_TLS=true` opts into the AWS `400` now. The default is expected to flip in a later release; confirm the counter reads zero first. The verdict is per connection: a TLS listener satisfies it, and so does an `https` protocol forwarded by a proxy the trusted-proxy configuration accepts.
|
||||||
|
- **Local KMS backend on a distributed deployment says what actually breaks**: the backend keeps key material and its Argon2id salt on each node's own disk, so two nodes derive different keys from the same `master_key` and an object encrypted on one node cannot be decrypted on another — intermittent 500s behind a load balancer. Configuring it while the deployment is distributed now logs `kms_node_local_backend_in_distributed_deployment` and appends that consequence to the `kms/configure` response, instead of only the generic "development only" positioning warning. It remains a warning, not a gate.
|
||||||
|
- **SSE-KMS is refused when no KMS is running (breaking)**: a write requesting `x-amz-server-side-encryption: aws:kms` on a node with no KMS service no longer succeeds. Earlier releases wrapped the data key with the node-local `RUSTFS_SSE_S3_MASTER_KEY` while still writing `aws:kms` and the requested key id into the object metadata — metadata that claimed a KMS protection the object never had, under a key that was never consulted. Such a request now returns `400 InvalidRequest` when KMS was never configured and `503` when a configured service is not running; the refusal is evaluated after the per-key authorization gate, so an unauthorized caller still receives `403 AccessDenied`. **Upgrade note:** a deployment that relied on this write succeeding will start receiving 4xx/503. Either configure a KMS, or request `AES256` and keep the documented SSE-S3 local-master-key fallback, which is unchanged. Objects already written this way remain readable.
|
||||||
|
- **Legacy ciphertext nonce layouts are now locked per segment**: while decrypting a v1 segment, the reader locks onto whichever of the three historical nonce layouts decoded the segment's first non-zero-index frame and rejects any later frame that needs a different one. Because a frame encrypted at block index zero authenticates under the pre-`1.0.0-alpha.91` reused-part-nonce layout at any position, an attacker able to rewrite the underlying shards could previously replay it and have the forged plaintext returned with `200`. New `RUSTFS_ENCRYPTION_LEGACY_NONCE_FALLBACK` (default `true`) drops that third layout entirely when set to `false`, which closes the residual case of a stream built purely from repeats of frame zero. Turn it off only after migrating pre-alpha.91 encrypted objects (rewrite in place with CopyObject); see [KMS backend security properties](docs/operations/kms-backend-security.md) for what the v1 frame layout does and does not authenticate.
|
||||||
- **HTTP Server Stack**: Integrated `KeystoneAuthLayer` middleware from `rustfs-keystone` crate into service stack (positioned after ReadinessGateLayer)
|
- **HTTP Server Stack**: Integrated `KeystoneAuthLayer` middleware from `rustfs-keystone` crate into service stack (positioned after ReadinessGateLayer)
|
||||||
- **Storage-class validation on startup (upgrade note)**: A persisted explicit storage class (`RUSTFS_STORAGE_CLASS_STANDARD` / `RUSTFS_STORAGE_CLASS_RRS`, for example `EC:2`) is now validated against the actual per-pool drive counts at startup and rejected when a pool cannot satisfy it. This is fail-closed and correct, but a cluster that persisted a storage class larger than a small or heterogeneous pool can hold (for example `EC:2` alongside a 2-drive pool), which earlier releases accepted and silently resolved to an invalid layout, will now refuse to start after upgrade. To recover, unset `RUSTFS_STORAGE_CLASS_STANDARD` so the server derives a valid per-pool default automatically, or set it to a value every pool can satisfy.
|
- **Storage-class validation on startup (upgrade note)**: A persisted explicit storage class (`RUSTFS_STORAGE_CLASS_STANDARD` / `RUSTFS_STORAGE_CLASS_RRS`, for example `EC:2`) is now validated against the actual per-pool drive counts at startup and rejected when a pool cannot satisfy it. This is fail-closed and correct, but a cluster that persisted a storage class larger than a small or heterogeneous pool can hold (for example `EC:2` alongside a 2-drive pool), which earlier releases accepted and silently resolved to an invalid layout, will now refuse to start after upgrade. To recover, unset `RUSTFS_STORAGE_CLASS_STANDARD` so the server derives a valid per-pool default automatically, or set it to a value every pool can satisfy.
|
||||||
- **IAMAuth**: Enhanced `get_secret_key()` to return empty secret for Keystone credentials (bypasses signature validation)
|
- **IAMAuth**: Enhanced `get_secret_key()` to return empty secret for Keystone credentials (bypasses signature validation)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ what Claude Code needs on top: commands and pointers.
|
|||||||
cargo build --release --bin rustfs # production binary
|
cargo build --release --bin rustfs # production binary
|
||||||
cargo check -p <crate> # fast type-check one crate
|
cargo check -p <crate> # fast type-check one crate
|
||||||
cargo test -p <crate> # test one crate
|
cargo test -p <crate> # test one crate
|
||||||
cargo fmt --all # format (required before PR)
|
cargo fmt --all --check # for Rust changes; see AGENTS.md verification tiers
|
||||||
make pre-commit # fast gate: fmt + arch checks + quick-check (NO clippy/tests)
|
make pre-commit # fast gate: fmt + arch checks + quick-check (NO clippy/tests)
|
||||||
make pre-pr # optional full gate for broad cross-module changes
|
make pre-pr # optional full gate for broad cross-module changes
|
||||||
make build-docker BUILD_OS=ubuntu22.04
|
make build-docker BUILD_OS=ubuntu22.04
|
||||||
@@ -27,6 +27,7 @@ make build-docker BUILD_OS=ubuntu22.04
|
|||||||
|
|
||||||
## Where to look (do not duplicate here)
|
## Where to look (do not duplicate here)
|
||||||
|
|
||||||
|
- Agent knowledge base index and doc-writing rules: [docs/architecture/README.md](docs/architecture/README.md)
|
||||||
- Crate membership: `Cargo.toml` `[workspace].members`
|
- Crate membership: `Cargo.toml` `[workspace].members`
|
||||||
- Architecture, layering, crate map: [ARCHITECTURE.md](ARCHITECTURE.md)
|
- Architecture, layering, crate map: [ARCHITECTURE.md](ARCHITECTURE.md)
|
||||||
- Migration guardrails & readiness contracts: [docs/architecture/](docs/architecture/README.md)
|
- Migration guardrails & readiness contracts: [docs/architecture/](docs/architecture/README.md)
|
||||||
@@ -41,5 +42,5 @@ make build-docker BUILD_OS=ubuntu22.04
|
|||||||
|
|
||||||
Repo-wide domain invariants (dual internal metadata keys, defensive UUID
|
Repo-wide domain invariants (dual internal metadata keys, defensive UUID
|
||||||
reads, unversioned tier buckets) live in [AGENTS.md](AGENTS.md) under
|
reads, unversioned tier buckets) live in [AGENTS.md](AGENTS.md) under
|
||||||
"Cross-Cutting Domain Invariants" — read them before touching metadata or
|
"Cross-Cutting Storage Invariants" — read them before touching metadata or
|
||||||
tiering code.
|
tiering code.
|
||||||
|
|||||||
+11
-37
@@ -109,24 +109,17 @@ affected boundaries and risks. CI still runs its configured repository gates.
|
|||||||
|
|
||||||
### 🔒 Git Pre-commit Hooks (optional)
|
### 🔒 Git Pre-commit Hooks (optional)
|
||||||
|
|
||||||
Git hooks are **not** versioned in this repository, so a fresh clone has no
|
The optional hook uses the checked-in `.pre-commit-config.yaml`. Install [pre-commit](https://pre-commit.com/#installation), then run this from the checkout or a linked worktree:
|
||||||
active pre-commit hook. If you add your own `.git/hooks/pre-commit` (a good
|
|
||||||
choice is a one-liner that runs `make pre-commit`), you can mark it executable
|
|
||||||
with:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make setup-hooks
|
make setup-hooks
|
||||||
```
|
```
|
||||||
|
|
||||||
Or manually:
|
The hook runs `cargo fmt --all --check` when staged files include Rust source. It does not compile the workspace or run tests. Fix formatting with `cargo fmt --all`, inspect and stage the result, then commit again.
|
||||||
|
|
||||||
```bash
|
`pre-commit install` resolves Git's hook directory for linked worktrees and preserves an existing hook in migration mode. If you use `core.hooksPath`, keep that hook manager and integrate `pre-commit run` there; the installer refuses to silently replace that configuration.
|
||||||
chmod +x .git/hooks/pre-commit
|
|
||||||
```
|
|
||||||
|
|
||||||
With or without a hook, follow the verification tiers in `AGENTS.md`. Run the
|
A local hook provides early formatting feedback. With or without it, follow the verification tiers in `AGENTS.md`, run relevant behavioral tests, and satisfy the CI merge gates. `make pre-commit` and `make dev-check` remain explicit broader commands.
|
||||||
applicable scoped checks, and reserve `make pre-pr` for broad cross-module
|
|
||||||
changes whose impact cannot be bounded by those checks.
|
|
||||||
|
|
||||||
### 📝 Formatting Configuration
|
### 📝 Formatting Configuration
|
||||||
|
|
||||||
@@ -138,31 +131,11 @@ fn_call_width = 90
|
|||||||
single_line_let_else_max_width = 100
|
single_line_let_else_max_width = 100
|
||||||
```
|
```
|
||||||
|
|
||||||
### 🚫 Commit Prevention
|
|
||||||
|
|
||||||
If you set up a pre-commit hook and your code doesn't meet the formatting requirements, the hook will:
|
|
||||||
|
|
||||||
1. **Block the commit** and show clear error messages
|
|
||||||
2. **Provide exact commands** to fix the issues
|
|
||||||
3. **Guide you through** the resolution process
|
|
||||||
|
|
||||||
Example output when formatting fails:
|
|
||||||
|
|
||||||
```
|
|
||||||
❌ Code formatting check failed!
|
|
||||||
💡 Please run 'cargo fmt --all' to format your code before committing.
|
|
||||||
|
|
||||||
🔧 Quick fix:
|
|
||||||
cargo fmt --all
|
|
||||||
git add .
|
|
||||||
git commit
|
|
||||||
```
|
|
||||||
|
|
||||||
### 🔄 Development Workflow
|
### 🔄 Development Workflow
|
||||||
|
|
||||||
1. **Make your changes**
|
1. **Make your changes**
|
||||||
2. **Format your code**: `make fmt` or `cargo fmt --all`
|
2. **Format your code**: `make fmt` or `cargo fmt --all`
|
||||||
3. **Run the fast gate**: `make pre-commit` (no clippy, no tests)
|
3. **Select relevant checks** using the validation tier in `AGENTS.md`; use `make pre-commit` when its broader fast gate adds useful coverage
|
||||||
4. **Commit your changes**: `git commit -m "your message"`
|
4. **Commit your changes**: `git commit -m "your message"`
|
||||||
5. **Complete the applicable multi-role adversarial review** for non-exempt changes (see `AGENTS.md`)
|
5. **Complete the applicable multi-role adversarial review** for non-exempt changes (see `AGENTS.md`)
|
||||||
6. **Run applicable scoped checks before opening/updating a PR**; consider
|
6. **Run applicable scoped checks before opening/updating a PR**; consider
|
||||||
@@ -206,11 +179,12 @@ Configure your IDE to:
|
|||||||
#### Pre-commit hook not running?
|
#### Pre-commit hook not running?
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check if hook is executable
|
pre-commit validate-config
|
||||||
ls -la .git/hooks/pre-commit
|
pre-commit run --all-files
|
||||||
|
# Inspect any configured hook manager; do not overwrite it.
|
||||||
# Make it executable if needed
|
git config --get core.hooksPath
|
||||||
chmod +x .git/hooks/pre-commit
|
# Install if no separate hook manager is configured.
|
||||||
|
make setup-hooks
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Formatting issues?
|
#### Formatting issues?
|
||||||
|
|||||||
Generated
+537
-276
File diff suppressed because it is too large
Load Diff
+35
-29
@@ -52,7 +52,7 @@ members = [
|
|||||||
"crates/s3select-api", # S3 Select API interface
|
"crates/s3select-api", # S3 Select API interface
|
||||||
"crates/s3select-query", # S3 Select query engine
|
"crates/s3select-query", # S3 Select query engine
|
||||||
"crates/scanner", # Scanner for data integrity checks and health monitoring
|
"crates/scanner", # Scanner for data integrity checks and health monitoring
|
||||||
"crates/scanner-contracts", # Scanner metrics and cycle contracts
|
"crates/scanner-metrics", # Scanner metrics and cycle telemetry
|
||||||
"crates/security-governance", # Security governance contracts
|
"crates/security-governance", # Security governance contracts
|
||||||
"crates/extension-schema", # Extension schema contracts
|
"crates/extension-schema", # Extension schema contracts
|
||||||
"crates/signer", # client signer
|
"crates/signer", # client signer
|
||||||
@@ -93,7 +93,7 @@ redundant_clone = "warn"
|
|||||||
rustfs = { path = "./rustfs", version = "1.0.0-rc.5" }
|
rustfs = { path = "./rustfs", version = "1.0.0-rc.5" }
|
||||||
rustfs-heal = { path = "crates/heal", version = "1.0.0-rc.5" }
|
rustfs-heal = { path = "crates/heal", version = "1.0.0-rc.5" }
|
||||||
rustfs-heal-contracts = { path = "crates/heal-contracts", version = "1.0.0-rc.5" }
|
rustfs-heal-contracts = { path = "crates/heal-contracts", version = "1.0.0-rc.5" }
|
||||||
rustfs-scanner-contracts = { path = "crates/scanner-contracts", version = "1.0.0-rc.5" }
|
rustfs-scanner-metrics = { path = "crates/scanner-metrics", version = "1.0.0-rc.5" }
|
||||||
rustfs-audit = { path = "crates/audit", version = "1.0.0-rc.5" }
|
rustfs-audit = { path = "crates/audit", version = "1.0.0-rc.5" }
|
||||||
rustfs-checksums = { path = "crates/checksums", version = "1.0.0-rc.5" }
|
rustfs-checksums = { path = "crates/checksums", version = "1.0.0-rc.5" }
|
||||||
rustfs-common = { path = "crates/common", version = "1.0.0-rc.5" }
|
rustfs-common = { path = "crates/common", version = "1.0.0-rc.5" }
|
||||||
@@ -145,7 +145,7 @@ rustfs-zip = { path = "./crates/zip", version = "1.0.0-rc.5" }
|
|||||||
async-channel = "2.5.0"
|
async-channel = "2.5.0"
|
||||||
async_zip = { default-features = false, version = "0.0.19" }
|
async_zip = { default-features = false, version = "0.0.19" }
|
||||||
mysql_async = { default-features = false, version = "0.37.1" }
|
mysql_async = { default-features = false, version = "0.37.1" }
|
||||||
async-compression = { version = "0.4.43" }
|
async-compression = { version = "0.4.44" }
|
||||||
async-recursion = "1.1.1"
|
async-recursion = "1.1.1"
|
||||||
async-trait = "0.1.92"
|
async-trait = "0.1.92"
|
||||||
async-nats = { version = "0.50.0", default-features = false }
|
async-nats = { version = "0.50.0", default-features = false }
|
||||||
@@ -165,10 +165,10 @@ http-body = "1.1.0"
|
|||||||
http-body-util = "0.1.5"
|
http-body-util = "0.1.5"
|
||||||
minlz = "1.2.3"
|
minlz = "1.2.3"
|
||||||
reqwest = "0.13.4"
|
reqwest = "0.13.4"
|
||||||
rustfs-kafka-async = { version = "1.2.0" }
|
rustfs-kafka-async = { version = "1.3.1" }
|
||||||
socket2 = { version = "0.6.5" }
|
socket2 = { version = "0.6.5" }
|
||||||
tokio = { version = "1.53.1" }
|
tokio = { version = "1.53.1" }
|
||||||
tokio-rustls = { default-features = false, version = "0.26.4" }
|
tokio-rustls = { default-features = false, version = "0.26.5" }
|
||||||
tokio-stream = { version = "0.1.19" }
|
tokio-stream = { version = "0.1.19" }
|
||||||
tokio-test = "0.4.5"
|
tokio-test = "0.4.5"
|
||||||
tokio-util = { version = "0.7.19" }
|
tokio-util = { version = "0.7.19" }
|
||||||
@@ -191,6 +191,7 @@ rmp = { version = "0.8.15" }
|
|||||||
rmp-serde = { version = "1.3.1" }
|
rmp-serde = { version = "1.3.1" }
|
||||||
serde = { version = "1.0.229" }
|
serde = { version = "1.0.229" }
|
||||||
serde_ignored = { version = "0.1" }
|
serde_ignored = { version = "0.1" }
|
||||||
|
serde_with = { version = "3", default-features = false, features = ["macros", "std"] }
|
||||||
serde_json = { version = "1.0.151" }
|
serde_json = { version = "1.0.151" }
|
||||||
serde_urlencoded = "0.7.1"
|
serde_urlencoded = "0.7.1"
|
||||||
|
|
||||||
@@ -199,10 +200,10 @@ serde_urlencoded = "0.7.1"
|
|||||||
# matching stable releases are not available yet, while previous stable lines
|
# matching stable releases are not available yet, while previous stable lines
|
||||||
# have incompatible APIs. Keep them exact-pinned and monitor upstream for stable
|
# have incompatible APIs. Keep them exact-pinned and monitor upstream for stable
|
||||||
# releases.
|
# releases.
|
||||||
aes-gcm = { version = "=0.11.1" }
|
aes-gcm = { version = "0.11.1" }
|
||||||
argon2 = { version = "=0.6.0" }
|
argon2 = { version = "0.6.0" }
|
||||||
blake2 = "=0.11.0"
|
blake2 = "0.11.0"
|
||||||
chacha20poly1305 = { version = "=0.11.0" }
|
chacha20poly1305 = { version = "0.11.0" }
|
||||||
crc-fast = "1.10.0"
|
crc-fast = "1.10.0"
|
||||||
hmac = { version = "0.13.0" }
|
hmac = { version = "0.13.0" }
|
||||||
jsonwebtoken = { version = "11.0.0" }
|
jsonwebtoken = { version = "11.0.0" }
|
||||||
@@ -234,28 +235,32 @@ tokio-postgres-rustls = "0.14.0"
|
|||||||
# Utilities and Tools
|
# Utilities and Tools
|
||||||
anyhow = "1.0.104"
|
anyhow = "1.0.104"
|
||||||
arc-swap = "1.9.2"
|
arc-swap = "1.9.2"
|
||||||
# RUSTFS_COMPAT_TODO(tokio-tar-extension-limits): keep the fork pin until every parser hardening used by Snowball is released upstream. Remove after astral-sh/tokio-tar#118 is merged and a published release includes extension, physical-entry, and sparse limits, cancellation-safe sparse parsing, and error-fused entry streams.
|
# RUSTFS_COMPAT_TODO(tokio-tar-extension-limits): keep the fork pin while Snowball and Swift still depend on it. Remove after Snowball uses a released tar-codec/tar-framing API that exposes precedence-resolved MinIO vendor records, RustFS preserves cancellation-safe ownership of large streamed members, footerless minio-go input is accepted only at an authenticated complete request boundary, the existing resource-limit, cancellation, and error-fuse regressions pass, and Swift no longer needs this fork.
|
||||||
astral-tokio-tar = { git = "https://github.com/cxymds/tokio-tar.git", rev = "603756478b7668436e464519c77ccac22a99ba96" }
|
astral-tokio-tar = { git = "https://github.com/cxymds/tokio-tar.git", rev = "603756478b7668436e464519c77ccac22a99ba96" }
|
||||||
|
# Candidate Snowball parser versions exercised by rustfs-zip compatibility fixtures.
|
||||||
|
tar-codec = "0.0.14"
|
||||||
|
tar-framing = "0.0.14"
|
||||||
atoi = "3.1.0"
|
atoi = "3.1.0"
|
||||||
atomic_enum = "0.3.0"
|
atomic_enum = "0.3.0"
|
||||||
aws-config = { version = "1.11.0" }
|
aws-config = { version = "1.12.0" }
|
||||||
aws-credential-types = { version = "1.3.0" }
|
aws-credential-types = { version = "1.3.0" }
|
||||||
aws-sdk-kms = { default-features = false, version = "1.117.0" }
|
aws-sdk-kms = { default-features = false, version = "1.118.0" }
|
||||||
aws-sdk-s3 = { default-features = false, version = "1.144.0" }
|
aws-sdk-s3 = { default-features = false, version = "1.145.0" }
|
||||||
aws-sdk-sts = { default-features = false, version = "1.113.0" }
|
aws-sdk-sts = { default-features = false, version = "1.114.0" }
|
||||||
|
aws-smithy-async = { version = "1.3.0" }
|
||||||
aws-smithy-http-client = { default-features = false, version = "1.4.0" }
|
aws-smithy-http-client = { default-features = false, version = "1.4.0" }
|
||||||
aws-smithy-runtime-api = { version = "1.15.0" }
|
aws-smithy-runtime-api = { version = "1.16.0" }
|
||||||
aws-smithy-types = { version = "1.6.2" }
|
aws-smithy-types = { version = "1.6.3" }
|
||||||
base64-simd = "0.8.0"
|
base64-simd = "0.8.0"
|
||||||
brotli = "8.0.4"
|
brotli = "9.0.0"
|
||||||
clap = { version = "4.6.6" }
|
clap = { version = "4.6.6" }
|
||||||
const-str = { version = "1.1.0" }
|
const-str = { version = "1.1.0" }
|
||||||
convert_case = "0.12.0"
|
convert_case = "0.12.0"
|
||||||
criterion = { version = "0.8" }
|
criterion = { version = "0.8" }
|
||||||
crossbeam-queue = "0.3.13"
|
crossbeam-queue = "0.3.14"
|
||||||
crossbeam-channel = "0.5.16"
|
crossbeam-channel = "0.5.17"
|
||||||
crossbeam-deque = "0.8.7"
|
crossbeam-deque = "0.8.8"
|
||||||
crossbeam-utils = "0.8.22"
|
crossbeam-utils = "0.8.23"
|
||||||
datafusion = { default-features = false, version = "55.0.0" }
|
datafusion = { default-features = false, version = "55.0.0" }
|
||||||
derive_builder = "0.20.2"
|
derive_builder = "0.20.2"
|
||||||
enumset = "1.1.14"
|
enumset = "1.1.14"
|
||||||
@@ -298,20 +303,20 @@ pretty_assertions = "1.4.1"
|
|||||||
rand = { version = "0.10.2" }
|
rand = { version = "0.10.2" }
|
||||||
ratelimit = "2.0.0"
|
ratelimit = "2.0.0"
|
||||||
rayon = "1.12.0"
|
rayon = "1.12.0"
|
||||||
reed-solomon-erasure = { package = "rustfs-erasure-codec", version = "8.0.2" }
|
rustfs-erasure-codec = { version = "8.0.2" }
|
||||||
reed-solomon-simd = "3.1.0"
|
reed-solomon-simd = "3.1.0"
|
||||||
regex = { version = "1.13.1" }
|
regex = { version = "1.13.1" }
|
||||||
rumqttc = { package = "rumqttc-next", version = "0.34.0" }
|
rumqttc = { package = "rumqttc-next", version = "0.34.0" }
|
||||||
redis = { version = "1.6.0" }
|
redis = { version = "1.7.0" }
|
||||||
rustify = { version = "0.7", default-features = false }
|
rustify = { version = "0.7", default-features = false }
|
||||||
rustix = { version = "1.1.4" }
|
rustix = { version = "1.1.4" }
|
||||||
rust-embed = { version = "8.12.0" }
|
rust-embed = { version = "8.12.0" }
|
||||||
rustc-hash = { version = "2.1.3" }
|
rustc-hash = { version = "2.1.3" }
|
||||||
s3s = { git = "https://github.com/rustfs/s3s.git", rev = "28e9ebb23dd2fb7d667084f34121b4aa4807a5c6", version = "0.15.0", features = ["minio"] }
|
s3s = { git = "https://github.com/rustfs/s3s.git", rev = "bdcb6259339c41369f9f1c60e3a42b5ab8da607b", version = "0.15.0", features = ["minio"] }
|
||||||
serial_test = "4.0.1"
|
serial_test = "4.0.1"
|
||||||
shadow-rs = { default-features = false, version = "2.0.0" }
|
shadow-rs = { default-features = false, version = "2.0.0" }
|
||||||
siphasher = "1.0.3"
|
siphasher = "1.0.3"
|
||||||
smallvec = { version = "1.15.2" }
|
smallvec = { version = "1.16.0" }
|
||||||
compact_str = "0.10.0"
|
compact_str = "0.10.0"
|
||||||
snap = "1.1.2"
|
snap = "1.1.2"
|
||||||
starshard = { version = "2.3.0" }
|
starshard = { version = "2.3.0" }
|
||||||
@@ -339,7 +344,7 @@ windows = { version = "0.62.2" }
|
|||||||
windows-sys = "0.61.2"
|
windows-sys = "0.61.2"
|
||||||
xxhash-rust = { version = "0.8.18" }
|
xxhash-rust = { version = "0.8.18" }
|
||||||
zip = "8.6.0"
|
zip = "8.6.0"
|
||||||
zstd = "0.13.3"
|
zstd = "0.14.0"
|
||||||
|
|
||||||
# Observability and Metrics
|
# Observability and Metrics
|
||||||
metrics = "0.24.6"
|
metrics = "0.24.6"
|
||||||
@@ -359,15 +364,16 @@ libunftp = { version = "0.23.0" }
|
|||||||
unftp-core = "0.1.0"
|
unftp-core = "0.1.0"
|
||||||
suppaftp = { version = "11.0.0" }
|
suppaftp = { version = "11.0.0" }
|
||||||
rcgen = { version = "0.14.10", default-features = false, features = ["aws_lc_rs", "crypto", "pem"] }
|
rcgen = { version = "0.14.10", default-features = false, features = ["aws_lc_rs", "crypto", "pem"] }
|
||||||
russh = { version = "0.63.1" }
|
russh = { version = "0.63.2" }
|
||||||
russh-sftp = "2.4.0"
|
russh-sftp = "2.4.0"
|
||||||
|
|
||||||
# WebDAV
|
# WebDAV
|
||||||
dav-server = "0.11.0"
|
dav-server = "0.11.0"
|
||||||
|
|
||||||
# Performance Analysis and Memory Profiling
|
# Performance Analysis and Memory Profiling
|
||||||
rustfs-mimalloc = { version = "0.5.1" }
|
rustfs-mimalloc = { version = "0.5.3" }
|
||||||
hotpath = { version = "0.24.0", default-features = false }
|
# Preserve Unicode focus filters until rustfs/backlog#2302 is resolved.
|
||||||
|
hotpath = { version = "=0.25.0", default-features = false }
|
||||||
# Snapshot testing for output format regression detection
|
# Snapshot testing for output format regression detection
|
||||||
insta = { version = "1.48" }
|
insta = { version = "1.48" }
|
||||||
|
|
||||||
|
|||||||
@@ -48,16 +48,33 @@ Unlike other storage systems, RustFS is released under the permissible Apache 2.
|
|||||||
- **Open Source**: Licensed under Apache 2.0, encouraging unrestricted community contributions and commercial usage.
|
- **Open Source**: Licensed under Apache 2.0, encouraging unrestricted community contributions and commercial usage.
|
||||||
- **User-Friendly**: Designed with simplicity in mind for easy deployment and management.
|
- **User-Friendly**: Designed with simplicity in mind for easy deployment and management.
|
||||||
|
|
||||||
| Feature | Status | Feature | Status |
|
Status legend: ✅ Available — shipped and covered by CI gates; 🧪 Preview — shipped behind an opt-in flag or with a bounded compatibility claim.
|
||||||
| :---------------------- | :----------- | :----------------------- | :--------------- |
|
|
||||||
| **S3 Core Features** | ✅ Available | **Bitrot Protection** | ✅ Available |
|
| Feature | Status | Feature | Status |
|
||||||
| **Upload / Download** | ✅ Available | **Single Node Mode** | ✅ Available |
|
| :------------------------------- | :----------- | :--------------------------------- | :----------- |
|
||||||
| **Versioning** | ✅ Available | **Bucket Replication** | ✅ Available |
|
| **S3 Core Features** | ✅ Available | **Distributed Mode** | ✅ Available |
|
||||||
| **Logging** | ✅ Available | **Lifecycle Management** | 🚧 Under Testing |
|
| **Upload / Download** | ✅ Available | **Single Node Mode** | ✅ Available |
|
||||||
| **Event Notifications** | ✅ Available | **Distributed Mode** | 🚧 Under Testing |
|
| **Versioning** | ✅ Available | **Bitrot Protection** | ✅ Available |
|
||||||
| **K8s Helm Charts** | ✅ Available | **RustFS KMS** | 🚧 Under Testing |
|
| **Object Lock (WORM)** | ✅ Available | **Healing & Scanner** | ✅ Available |
|
||||||
| **Keystone Auth** | ✅ Available | **Multi-Tenancy** | ✅ Available |
|
| **Server-Side Encryption** | ✅ Available | **Pool Expansion / Decommission** | ✅ Available |
|
||||||
| **Swift API** | ✅ Available | **Swift Metadata Ops** | 🚧 Partial |
|
| **RustFS KMS** | ✅ Available | **Bucket Replication** | ✅ Available |
|
||||||
|
| **Lifecycle Management (ILM)** | ✅ Available | **Site Replication** | ✅ Available |
|
||||||
|
| **ILM Tiering (Remote S3)** | ✅ Available | **Bucket Quota** | ✅ Available |
|
||||||
|
| **S3 Select** | ✅ Available | **Event Notifications** | ✅ Available |
|
||||||
|
| **S3 Tables (Iceberg REST)** | 🧪 Preview | **Audit Logging** | ✅ Available |
|
||||||
|
| **IAM / Policies** | ✅ Available | **Logging & Observability** | ✅ Available |
|
||||||
|
| **OIDC / SSO** | ✅ Available | **Web Console** | ✅ Available |
|
||||||
|
| **Keystone Auth** | ✅ Available | **K8s Helm Charts** | ✅ Available |
|
||||||
|
| **Swift API** | ✅ Available | **FTPS / WebDAV** | ✅ Available |
|
||||||
|
| **Multi-Tenancy** | ✅ Available | **SFTP** | ✅ Available |
|
||||||
|
| **MinIO On-Disk Compatibility** | 🧪 Preview | | |
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
|
||||||
|
- **RustFS KMS**: Vault (KV2 / Transit) and AWS KMS backends are supported for production. The `Local` and `Static` backends are for development and testing only. See [KMS backend security properties](docs/operations/kms-backend-security.md).
|
||||||
|
- **Swift API / SFTP**: opt-in cargo features (`--features swift`, `--features sftp`, or `full`). FTPS and WebDAV are enabled in the default build.
|
||||||
|
- **S3 Tables**: ships as an Iceberg REST Catalog with automated PyIceberg and DuckDB coverage; other engines and vendor profiles carry bounded claims listed in the [S3 Tables support matrix](docs/architecture/s3-tables-support-matrix.md).
|
||||||
|
- **MinIO On-Disk Compatibility**: gated behind the `rio-v2` feature and not part of the default build. Objects MinIO encrypted are not readable by RustFS. See [MinIO file-format interoperability](docs/architecture/minio-file-format-compat.md).
|
||||||
|
|
||||||
## RustFS vs MinIO Performance
|
## RustFS vs MinIO Performance
|
||||||
|
|
||||||
@@ -92,6 +109,15 @@ Star RustFS on GitHub and be instantly notified of new releases.
|
|||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> **Pool expansion notice:**
|
||||||
|
>
|
||||||
|
> - A single-node single-drive (SNSD) deployment is supported only as a standalone local path. It cannot expand in place or be added as a Pool. To move to a multi-drive topology, create a new deployment and migrate data through S3.
|
||||||
|
> - Keep an existing multi-drive Pool's endpoints and Erasure Set width unchanged; expand by appending a new Pool. With ellipsis-based expansion, every Pool argument must contain an ellipsis expression and expand to at least two drive endpoints.
|
||||||
|
> - Single-node multi-drive Pools and multi-node Pools with one drive per node are allowed, subject to valid Erasure Set geometry and EC settings; acceptance does not guarantee host-failure tolerance.
|
||||||
|
>
|
||||||
|
> These topology rules follow MinIO, but automatic parity selection differs between the projects. See the [Pool layout compatibility and regression tests](docs/testing/pool-layout-compatibility.md) before expanding a deployment.
|
||||||
|
|
||||||
To get started with RustFS, follow these steps:
|
To get started with RustFS, follow these steps:
|
||||||
|
|
||||||
### 1. One-click Installation (Option 1)
|
### 1. One-click Installation (Option 1)
|
||||||
@@ -185,7 +211,10 @@ For developers who want to build RustFS Docker images from source with multi-arc
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Build multi-architecture images locally
|
# Build multi-architecture images locally
|
||||||
./docker-buildx.sh --build-arg RELEASE=latest
|
./docker-buildx.sh
|
||||||
|
|
||||||
|
# Build a single-platform image locally
|
||||||
|
./docker-buildx.sh -p linux/amd64
|
||||||
|
|
||||||
# Build and push to registry
|
# Build and push to registry
|
||||||
./docker-buildx.sh --push
|
./docker-buildx.sh --push
|
||||||
|
|||||||
+38
-9
@@ -46,14 +46,31 @@ RustFS 是一个基于 Rust 构建的高性能分布式对象存储系统。Rust
|
|||||||
- **完全开源**:采用 Apache 2.0 许可证,鼓励社区贡献和商业使用。
|
- **完全开源**:采用 Apache 2.0 许可证,鼓励社区贡献和商业使用。
|
||||||
- **简单易用**:设计简洁,易于部署和管理。
|
- **简单易用**:设计简洁,易于部署和管理。
|
||||||
|
|
||||||
| 功能 | 状态 | 功能 | 状态 |
|
状态说明:✅ 可用 —— 已发布并有 CI 门禁覆盖;🧪 预览 —— 已发布但需显式开关,或兼容性承诺有边界。
|
||||||
| :----------------- | :------ | :---------------------- | :-------- |
|
|
||||||
| **S3 核心功能** | ✅ 可用 | **Bitrot (防数据腐烂)** | ✅ 可用 |
|
| 功能 | 状态 | 功能 | 状态 |
|
||||||
| **上传 / 下载** | ✅ 可用 | **单机模式** | ✅ 可用 |
|
| :-------------------------- | :------ | :----------------------- | :------ |
|
||||||
| **版本控制** | ✅ 可用 | **存储桶复制** | ✅ 可用 |
|
| **S3 核心功能** | ✅ 可用 | **分布式模式** | ✅ 可用 |
|
||||||
| **日志功能** | ✅ 可用 | **生命周期管理** | 🚧 测试中 |
|
| **上传 / 下载** | ✅ 可用 | **单机模式** | ✅ 可用 |
|
||||||
| **事件通知** | ✅ 可用 | **分布式模式** | 🚧 测试中 |
|
| **版本控制** | ✅ 可用 | **Bitrot (防数据腐烂)** | ✅ 可用 |
|
||||||
| **K8s Helm Chart** | ✅ 可用 | **OPA (策略引擎)** | 🚧 测试中 |
|
| **对象锁定 (WORM)** | ✅ 可用 | **修复与扫描器** | ✅ 可用 |
|
||||||
|
| **服务端加密 (SSE)** | ✅ 可用 | **存储池扩容 / 下线** | ✅ 可用 |
|
||||||
|
| **RustFS KMS** | ✅ 可用 | **存储桶复制** | ✅ 可用 |
|
||||||
|
| **生命周期管理 (ILM)** | ✅ 可用 | **站点复制** | ✅ 可用 |
|
||||||
|
| **ILM 分层 (远端 S3)** | ✅ 可用 | **存储桶配额** | ✅ 可用 |
|
||||||
|
| **S3 Select** | ✅ 可用 | **事件通知** | ✅ 可用 |
|
||||||
|
| **S3 Tables (Iceberg REST)**| 🧪 预览 | **审计日志** | ✅ 可用 |
|
||||||
|
| **IAM / 策略** | ✅ 可用 | **日志与可观测性** | ✅ 可用 |
|
||||||
|
| **OIDC / SSO** | ✅ 可用 | **Web 控制台** | ✅ 可用 |
|
||||||
|
| **Keystone 认证** | ✅ 可用 | **K8s Helm Chart** | ✅ 可用 |
|
||||||
|
| **Swift API** | ✅ 可用 | **FTPS / WebDAV** | ✅ 可用 |
|
||||||
|
| **多租户** | ✅ 可用 | **SFTP** | ✅ 可用 |
|
||||||
|
| **MinIO 磁盘格式兼容** | 🧪 预览 | | |
|
||||||
|
|
||||||
|
说明:
|
||||||
|
|
||||||
|
- **服务端加密**:支持 SSE-C、SSE-S3 与 SSE-KMS。SSE-KMS 必须先配置 KMS 服务;未配置 KMS 时请求 `aws:kms` 会被拒绝,不会降级到本地主密钥。
|
||||||
|
- **RustFS KMS**:生产环境支持 Vault(KV2 / Transit)与 AWS KMS 后端;`Local` 与 `Static` 后端仅供开发与测试使用,详见 [KMS 后端安全属性](docs/operations/kms-backend-security.md)。
|
||||||
|
|
||||||
## RustFS vs MinIO 性能对比
|
## RustFS vs MinIO 性能对比
|
||||||
|
|
||||||
@@ -89,6 +106,15 @@ RustFS 是一个基于 Rust 构建的高性能分布式对象存储系统。Rust
|
|||||||
|
|
||||||
## 快速开始
|
## 快速开始
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> **Pool 扩容 Notice:**
|
||||||
|
>
|
||||||
|
> - 单节点单盘(SNSD)部署仅支持使用本地路径独立运行,不支持原地扩容,也不能作为 Pool 加入集群。如需改为多盘拓扑,请创建新部署并通过 S3 迁移数据。
|
||||||
|
> - 已有多盘 Pool 的端点和 Erasure Set 宽度应保持不变,扩容应追加新的 Pool。使用省略号表达式扩容时,每个 Pool 参数都必须包含省略号表达式,并展开为至少两个磁盘端点。
|
||||||
|
> - 允许单节点多盘 Pool,也允许多节点、每节点一盘的 Pool,但必须满足 Erasure Set 布局和 EC 配置要求;配置合法不代表能够容忍整台主机故障。
|
||||||
|
>
|
||||||
|
> 这些拓扑规则与 MinIO 一致,但两者的默认 parity 选择方式存在差异。扩容前请阅读 [Pool 布局兼容性与回归测试说明](docs/testing/pool-layout-compatibility.md)。
|
||||||
|
|
||||||
请按照以下步骤快速上手 RustFS:
|
请按照以下步骤快速上手 RustFS:
|
||||||
|
|
||||||
### 1. 一键安装脚本 (选项 1)
|
### 1. 一键安装脚本 (选项 1)
|
||||||
@@ -141,7 +167,10 @@ docker compose -f docker-compose-simple.yml up -d
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 在本地构建多架构镜像
|
# 在本地构建多架构镜像
|
||||||
./docker-buildx.sh --build-arg RELEASE=latest
|
./docker-buildx.sh
|
||||||
|
|
||||||
|
# 在本地构建单平台镜像
|
||||||
|
./docker-buildx.sh -p linux/amd64
|
||||||
|
|
||||||
# 构建并推送到仓库
|
# 构建并推送到仓库
|
||||||
./docker-buildx.sh --push
|
./docker-buildx.sh --push
|
||||||
|
|||||||
+5
-2
@@ -33,8 +33,11 @@ Applies to all paths under `crates/`.
|
|||||||
|
|
||||||
## Type Casting
|
## Type Casting
|
||||||
|
|
||||||
- Never use `as` for numeric conversions that may truncate or overflow. Use `try_into()` with explicit error handling, or clamp with `value.max(0) as usize` when the domain is bounded.
|
- Never use `as` for numeric conversions that may truncate or overflow. Use
|
||||||
- `f64 as usize` saturates but is fragile; clamp to `[0, usize::MAX as f64]` first.
|
`try_into()` with typed error handling; clamp or saturate only when the domain
|
||||||
|
explicitly requires it.
|
||||||
|
- Before converting floating-point input to an integer, validate finiteness,
|
||||||
|
sign, and the destination range. A lower-bound clamp alone is insufficient.
|
||||||
- Treat every `as` cast in a PR review as a potential bug; require justification.
|
- Treat every `as` cast in a PR review as a potential bug; require justification.
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|||||||
@@ -90,6 +90,93 @@ pub struct MrfIntent {
|
|||||||
pub attempts: u8,
|
pub attempts: u8,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
|
pub struct MrfDurableRepairAnchor {
|
||||||
|
pub kind: MrfKind,
|
||||||
|
pub bucket: Arc<str>,
|
||||||
|
pub object: Arc<str>,
|
||||||
|
pub version_id: Option<[u8; 16]>,
|
||||||
|
pub scope: Option<MrfScope>,
|
||||||
|
pub lease: MrfIngressLease,
|
||||||
|
pub bucket_incarnation_id: Uuid,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl MrfDurableRepairAnchor {
|
||||||
|
/// Build a dischargeable anchor only when the caller supplies the storage
|
||||||
|
/// incarnation and the original ingress lease. Legacy replay records lack
|
||||||
|
/// both pieces and therefore remain fail-closed.
|
||||||
|
pub fn from_intent(intent: &MrfIntent, bucket_incarnation_id: Uuid) -> Option<Self> {
|
||||||
|
if bucket_incarnation_id.is_nil() {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
let lease = intent.lease?;
|
||||||
|
let (version_id, scope) = canonical_identity(intent.kind, intent.version_id, intent.scope);
|
||||||
|
Some(Self {
|
||||||
|
kind: intent.kind,
|
||||||
|
bucket: intent.bucket.clone(),
|
||||||
|
object: intent.object.clone(),
|
||||||
|
version_id,
|
||||||
|
scope,
|
||||||
|
lease,
|
||||||
|
bucket_incarnation_id,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn is_proven_by(&self, event: &MrfVerifiedRepairEvent) -> bool {
|
||||||
|
let Some(lease) = event.lease else {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
self.kind == event.kind
|
||||||
|
&& self.bucket == event.bucket
|
||||||
|
&& self.object == event.object
|
||||||
|
&& self.version_id == event.version_id
|
||||||
|
&& self.scope == event.scope
|
||||||
|
&& self.lease == lease
|
||||||
|
&& self.bucket_incarnation_id == event.bucket_incarnation_id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Consume only anchors proven by a complete verified-repair identity. The
|
||||||
|
/// caller remains responsible for persisting the resulting anchor set before
|
||||||
|
/// deleting older replay files.
|
||||||
|
pub fn consume_verified_mrf_repair_events(anchors: &mut Vec<MrfDurableRepairAnchor>, events: &[MrfVerifiedRepairEvent]) -> usize {
|
||||||
|
let before = anchors.len();
|
||||||
|
anchors.retain(|anchor| !events.iter().any(|event| anchor.is_proven_by(event)));
|
||||||
|
before.saturating_sub(anchors.len())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Consume recorded verified repairs for one bucket without draining
|
||||||
|
/// unrelated or still-unmatched proofs. If the caller crashes before
|
||||||
|
/// persisting the retained anchor set, the proof may be replayed by repair
|
||||||
|
/// instead of silently deleting the old responsibility.
|
||||||
|
pub fn consume_recorded_verified_mrf_repair_events_for(bucket: &str, anchors: &mut Vec<MrfDurableRepairAnchor>) -> usize {
|
||||||
|
let Some(registry) = MRF_VERIFIED_REPAIR_EVENTS.get() else {
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
|
let Ok(mut events) = registry.lock() else {
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
|
let before = anchors.len();
|
||||||
|
let mut retained = std::collections::VecDeque::with_capacity(events.len());
|
||||||
|
while let Some(event) = events.pop_front() {
|
||||||
|
if event.bucket.as_ref() != bucket {
|
||||||
|
retained.push_back(event);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
let mut matched = false;
|
||||||
|
anchors.retain(|anchor| {
|
||||||
|
let proven = anchor.is_proven_by(&event);
|
||||||
|
matched |= proven;
|
||||||
|
!proven
|
||||||
|
});
|
||||||
|
if !matched {
|
||||||
|
retained.push_back(event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*events = retained;
|
||||||
|
before.saturating_sub(anchors.len())
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
pub struct MrfScope {
|
pub struct MrfScope {
|
||||||
pub pool_index: u32,
|
pub pool_index: u32,
|
||||||
@@ -386,6 +473,27 @@ pub fn try_send_mrf_intent_typed(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Acquire a fresh process-local lease for one durable replay record.
|
||||||
|
///
|
||||||
|
/// Journal records deliberately do not persist leases. A replay consumer must
|
||||||
|
/// call this before submitting the record so a later verified repair event can
|
||||||
|
/// identify the exact replay admission. Replay does not reserve the live
|
||||||
|
/// producer coalescer key: the replay queue first deduplicates legacy records,
|
||||||
|
/// then manager admission owns task-level deduplication with live producers.
|
||||||
|
pub fn try_rearm_mrf_replay_intent(intent: &mut MrfIntent) -> MrfIngressResult {
|
||||||
|
if intent.lease.is_some() {
|
||||||
|
return MrfIngressResult::Enqueued;
|
||||||
|
}
|
||||||
|
if intent.bucket.len() > MRF_MAX_IDENTITY_COMPONENT || intent.object.len() > MRF_MAX_IDENTITY_COMPONENT {
|
||||||
|
return MrfIngressResult::Dropped(MrfDropReason::OversizedIdentity);
|
||||||
|
}
|
||||||
|
let (version_id, scope) = canonical_identity(intent.kind, intent.version_id, intent.scope);
|
||||||
|
intent.version_id = version_id;
|
||||||
|
intent.scope = scope;
|
||||||
|
intent.lease = Some(MrfIngressLease::new(NEXT_MRF_LEASE.fetch_add(1, Ordering::Relaxed)));
|
||||||
|
MrfIngressResult::Enqueued
|
||||||
|
}
|
||||||
|
|
||||||
/// Release the ingress key once the consumer owns the intent.
|
/// Release the ingress key once the consumer owns the intent.
|
||||||
pub fn release_mrf_intent(intent: &MrfIntent) {
|
pub fn release_mrf_intent(intent: &MrfIntent) {
|
||||||
release_mrf_identity(intent.kind, &intent.bucket, &intent.object, intent.version_id, intent.scope, intent.lease);
|
release_mrf_identity(intent.kind, &intent.bucket, &intent.object, intent.version_id, intent.scope, intent.lease);
|
||||||
@@ -422,9 +530,9 @@ fn unix_now_ms() -> u64 {
|
|||||||
.unwrap_or(0)
|
.unwrap_or(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A repair the MRF consumer landed, fanned out so retry ledgers can drop
|
/// Legacy, unverified repair notice. Its identity lacks kind, set scope,
|
||||||
/// entries the journal no longer tracks (backlog#1894 axis B). The payload
|
/// bucket incarnation and responsibility generation. Consumers must not use
|
||||||
/// mirrors the intent identity so consumers match without re-parsing.
|
/// it to discharge persisted repair responsibility.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
pub struct MrfRepairedEvent {
|
pub struct MrfRepairedEvent {
|
||||||
pub bucket: Arc<str>,
|
pub bucket: Arc<str>,
|
||||||
@@ -432,15 +540,36 @@ pub struct MrfRepairedEvent {
|
|||||||
pub version_id: Option<[u8; 16]>,
|
pub version_id: Option<[u8; 16]>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
|
pub enum MrfVerifiedRepairDisposition {
|
||||||
|
Repaired,
|
||||||
|
VerifiedHealthy,
|
||||||
|
AuthoritativelyAbsent,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
pub struct MrfVerifiedRepairEvent {
|
||||||
|
pub kind: MrfKind,
|
||||||
|
pub bucket: Arc<str>,
|
||||||
|
pub object: Arc<str>,
|
||||||
|
pub version_id: Option<[u8; 16]>,
|
||||||
|
pub scope: Option<MrfScope>,
|
||||||
|
pub lease: Option<MrfIngressLease>,
|
||||||
|
pub bucket_incarnation_id: Uuid,
|
||||||
|
pub disposition: MrfVerifiedRepairDisposition,
|
||||||
|
}
|
||||||
|
|
||||||
/// Bound on the repaired-event backlog. Notices are best-effort hints; when
|
/// Bound on the repaired-event backlog. Notices are best-effort hints; when
|
||||||
/// the ring is full the oldest are dropped and the affected ledger entries
|
/// the ring is full the oldest are dropped and the affected ledger entries
|
||||||
/// simply expire through their own attempts/age limits.
|
/// simply expire through their own attempts/age limits.
|
||||||
const MRF_REPAIRED_EVENT_CAP: usize = 4096;
|
const MRF_REPAIRED_EVENT_CAP: usize = 4096;
|
||||||
|
|
||||||
static MRF_REPAIRED_EVENTS: OnceLock<std::sync::Mutex<std::collections::VecDeque<MrfRepairedEvent>>> = OnceLock::new();
|
static MRF_REPAIRED_EVENTS: OnceLock<std::sync::Mutex<std::collections::VecDeque<MrfRepairedEvent>>> = OnceLock::new();
|
||||||
|
static MRF_VERIFIED_REPAIR_EVENTS: OnceLock<std::sync::Mutex<std::collections::VecDeque<MrfVerifiedRepairEvent>>> =
|
||||||
|
OnceLock::new();
|
||||||
|
|
||||||
/// Record that the MRF consumer landed a repair. Never blocks: the critical
|
/// Record a legacy notification for compatibility. This is not an
|
||||||
/// section is a deque push under a std mutex.
|
/// acknowledgement of storage verification or durable repair completion.
|
||||||
pub fn note_mrf_repaired(bucket: &str, object: &str, version_id: Option<[u8; 16]>) {
|
pub fn note_mrf_repaired(bucket: &str, object: &str, version_id: Option<[u8; 16]>) {
|
||||||
let registry = MRF_REPAIRED_EVENTS.get_or_init(|| std::sync::Mutex::new(std::collections::VecDeque::new()));
|
let registry = MRF_REPAIRED_EVENTS.get_or_init(|| std::sync::Mutex::new(std::collections::VecDeque::new()));
|
||||||
let Ok(mut events) = registry.lock() else {
|
let Ok(mut events) = registry.lock() else {
|
||||||
@@ -478,6 +607,43 @@ pub fn take_mrf_repaired_events_for(bucket: &str) -> Vec<MrfRepairedEvent> {
|
|||||||
taken
|
taken
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Record a storage-owned MRF completion proof. Unlike the legacy repaired
|
||||||
|
/// event, this identity is complete enough for future durable ledgers to make
|
||||||
|
/// an exact responsibility decision.
|
||||||
|
pub fn note_mrf_verified_repair(event: MrfVerifiedRepairEvent) {
|
||||||
|
let registry = MRF_VERIFIED_REPAIR_EVENTS.get_or_init(|| std::sync::Mutex::new(std::collections::VecDeque::new()));
|
||||||
|
let Ok(mut events) = registry.lock() else {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
if events.len() >= MRF_REPAIRED_EVENT_CAP {
|
||||||
|
events.pop_front();
|
||||||
|
}
|
||||||
|
events.push_back(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Take verified repair events recorded for `bucket`, leaving other buckets'
|
||||||
|
/// proofs in place. Consumers still have to match kind, object, version, scope
|
||||||
|
/// lease and incarnation before discharging durable responsibility.
|
||||||
|
pub fn take_mrf_verified_repair_events_for(bucket: &str) -> Vec<MrfVerifiedRepairEvent> {
|
||||||
|
let Some(registry) = MRF_VERIFIED_REPAIR_EVENTS.get() else {
|
||||||
|
return Vec::new();
|
||||||
|
};
|
||||||
|
let Ok(mut events) = registry.lock() else {
|
||||||
|
return Vec::new();
|
||||||
|
};
|
||||||
|
let mut taken = Vec::new();
|
||||||
|
let mut retained = std::collections::VecDeque::with_capacity(events.len());
|
||||||
|
while let Some(event) = events.pop_front() {
|
||||||
|
if event.bucket.as_ref() == bucket {
|
||||||
|
taken.push(event);
|
||||||
|
} else {
|
||||||
|
retained.push_back(event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*events = retained;
|
||||||
|
taken
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
@@ -515,6 +681,9 @@ mod tests {
|
|||||||
}
|
}
|
||||||
coalescer_release(&key, Some(lease));
|
coalescer_release(&key, Some(lease));
|
||||||
let retry_lease = coalescer_admit(key.clone()).expect("released identity must admit a retry");
|
let retry_lease = coalescer_admit(key.clone()).expect("released identity must admit a retry");
|
||||||
|
assert_ne!(lease, retry_lease);
|
||||||
|
coalescer_release(&key, Some(lease));
|
||||||
|
assert_eq!(coalescer_admit(key.clone()), Err(MrfIngressResult::Coalesced));
|
||||||
coalescer_release(&key, Some(retry_lease));
|
coalescer_release(&key, Some(retry_lease));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -543,6 +712,212 @@ mod tests {
|
|||||||
assert_eq!(metadata_scope, None);
|
assert_eq!(metadata_scope, None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn durable_repair_anchor_requires_lease_and_bucket_incarnation() {
|
||||||
|
let mut intent = MrfIntent {
|
||||||
|
bucket: Arc::from("durable-anchor-bucket"),
|
||||||
|
object: Arc::from("object"),
|
||||||
|
version_id: Some([0; 16]),
|
||||||
|
kind: MrfKind::PartialWrite,
|
||||||
|
scope: Some(MrfScope {
|
||||||
|
pool_index: 1,
|
||||||
|
set_index: 2,
|
||||||
|
}),
|
||||||
|
lease: None,
|
||||||
|
enqueued_at_ms: 0,
|
||||||
|
attempts: 0,
|
||||||
|
};
|
||||||
|
assert!(
|
||||||
|
MrfDurableRepairAnchor::from_intent(&intent, Uuid::new_v4()).is_none(),
|
||||||
|
"legacy replay records without the ingress lease must remain anchored"
|
||||||
|
);
|
||||||
|
|
||||||
|
intent.lease = Some(MrfIngressLease::new(7));
|
||||||
|
assert!(
|
||||||
|
MrfDurableRepairAnchor::from_intent(&intent, Uuid::nil()).is_none(),
|
||||||
|
"nil bucket incarnation cannot prove durable successor ownership"
|
||||||
|
);
|
||||||
|
|
||||||
|
let anchor = MrfDurableRepairAnchor::from_intent(&intent, Uuid::new_v4())
|
||||||
|
.expect("complete identity should create a durable repair anchor");
|
||||||
|
assert_eq!(anchor.version_id, None, "nil UUID is canonicalized before matching");
|
||||||
|
assert_eq!(
|
||||||
|
anchor.scope,
|
||||||
|
Some(MrfScope {
|
||||||
|
pool_index: 1,
|
||||||
|
set_index: 2
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn durable_replay_rearm_assigns_a_fresh_dischargeable_lease() {
|
||||||
|
let unique = Uuid::new_v4();
|
||||||
|
let mut intent = MrfIntent {
|
||||||
|
bucket: Arc::from(format!("replay-{unique}")),
|
||||||
|
object: Arc::from("object"),
|
||||||
|
version_id: Some([0; 16]),
|
||||||
|
kind: MrfKind::PartialWrite,
|
||||||
|
scope: Some(MrfScope {
|
||||||
|
pool_index: 2,
|
||||||
|
set_index: 3,
|
||||||
|
}),
|
||||||
|
lease: None,
|
||||||
|
enqueued_at_ms: 1,
|
||||||
|
attempts: 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
assert_eq!(try_rearm_mrf_replay_intent(&mut intent), MrfIngressResult::Enqueued);
|
||||||
|
assert_eq!(intent.version_id, None, "nil versions remain canonical during replay");
|
||||||
|
assert!(intent.lease.is_some(), "replay admission must carry a fresh lease");
|
||||||
|
assert!(
|
||||||
|
MrfDurableRepairAnchor::from_intent(&intent, Uuid::new_v4()).is_some(),
|
||||||
|
"a rearmed replay record can participate in exact durable proof matching"
|
||||||
|
);
|
||||||
|
release_mrf_intent(&intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn verified_repair_events_consume_only_exact_durable_anchors() {
|
||||||
|
let bucket = Arc::<str>::from("proof-bucket");
|
||||||
|
let object = Arc::<str>::from("object");
|
||||||
|
let incarnation = Uuid::new_v4();
|
||||||
|
let lease = MrfIngressLease::new(11);
|
||||||
|
let anchor = MrfDurableRepairAnchor {
|
||||||
|
kind: MrfKind::PartialWrite,
|
||||||
|
bucket: bucket.clone(),
|
||||||
|
object: object.clone(),
|
||||||
|
version_id: Some([3; 16]),
|
||||||
|
scope: Some(MrfScope {
|
||||||
|
pool_index: 4,
|
||||||
|
set_index: 5,
|
||||||
|
}),
|
||||||
|
lease,
|
||||||
|
bucket_incarnation_id: incarnation,
|
||||||
|
};
|
||||||
|
let event = MrfVerifiedRepairEvent {
|
||||||
|
kind: anchor.kind,
|
||||||
|
bucket,
|
||||||
|
object,
|
||||||
|
version_id: anchor.version_id,
|
||||||
|
scope: anchor.scope,
|
||||||
|
lease: Some(lease),
|
||||||
|
bucket_incarnation_id: incarnation,
|
||||||
|
disposition: MrfVerifiedRepairDisposition::Repaired,
|
||||||
|
};
|
||||||
|
|
||||||
|
for rejected in [
|
||||||
|
MrfVerifiedRepairEvent {
|
||||||
|
lease: None,
|
||||||
|
..event.clone()
|
||||||
|
},
|
||||||
|
MrfVerifiedRepairEvent {
|
||||||
|
lease: Some(MrfIngressLease::new(12)),
|
||||||
|
..event.clone()
|
||||||
|
},
|
||||||
|
MrfVerifiedRepairEvent {
|
||||||
|
bucket_incarnation_id: Uuid::new_v4(),
|
||||||
|
..event.clone()
|
||||||
|
},
|
||||||
|
MrfVerifiedRepairEvent {
|
||||||
|
version_id: Some([4; 16]),
|
||||||
|
..event.clone()
|
||||||
|
},
|
||||||
|
MrfVerifiedRepairEvent {
|
||||||
|
scope: Some(MrfScope {
|
||||||
|
pool_index: 4,
|
||||||
|
set_index: 6,
|
||||||
|
}),
|
||||||
|
..event.clone()
|
||||||
|
},
|
||||||
|
MrfVerifiedRepairEvent {
|
||||||
|
kind: MrfKind::DecodeFailure,
|
||||||
|
..event.clone()
|
||||||
|
},
|
||||||
|
MrfVerifiedRepairEvent {
|
||||||
|
bucket: Arc::from("other-bucket"),
|
||||||
|
..event.clone()
|
||||||
|
},
|
||||||
|
MrfVerifiedRepairEvent {
|
||||||
|
object: Arc::from("other"),
|
||||||
|
..event.clone()
|
||||||
|
},
|
||||||
|
] {
|
||||||
|
let mut retained = vec![anchor.clone()];
|
||||||
|
assert_eq!(consume_verified_mrf_repair_events(&mut retained, &[rejected]), 0);
|
||||||
|
assert_eq!(retained, vec![anchor.clone()]);
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut retained = vec![anchor];
|
||||||
|
assert_eq!(consume_verified_mrf_repair_events(&mut retained, &[event]), 1);
|
||||||
|
assert!(retained.is_empty());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn recorded_verified_repair_consumer_retains_unmatched_proofs() {
|
||||||
|
let bucket = Arc::<str>::from(format!("recorded-proof-{}", Uuid::new_v4()));
|
||||||
|
let other_bucket = Arc::<str>::from(format!("recorded-proof-other-{}", Uuid::new_v4()));
|
||||||
|
let incarnation = Uuid::new_v4();
|
||||||
|
let lease = MrfIngressLease::new(21);
|
||||||
|
let retained_anchor = MrfDurableRepairAnchor {
|
||||||
|
kind: MrfKind::PartialWrite,
|
||||||
|
bucket: bucket.clone(),
|
||||||
|
object: Arc::from("retained"),
|
||||||
|
version_id: Some([7; 16]),
|
||||||
|
scope: Some(MrfScope {
|
||||||
|
pool_index: 1,
|
||||||
|
set_index: 2,
|
||||||
|
}),
|
||||||
|
lease,
|
||||||
|
bucket_incarnation_id: incarnation,
|
||||||
|
};
|
||||||
|
let waiting_anchor = MrfDurableRepairAnchor {
|
||||||
|
object: Arc::from("waiting"),
|
||||||
|
lease: MrfIngressLease::new(22),
|
||||||
|
..retained_anchor.clone()
|
||||||
|
};
|
||||||
|
let matched_event = MrfVerifiedRepairEvent {
|
||||||
|
kind: retained_anchor.kind,
|
||||||
|
bucket: bucket.clone(),
|
||||||
|
object: retained_anchor.object.clone(),
|
||||||
|
version_id: retained_anchor.version_id,
|
||||||
|
scope: retained_anchor.scope,
|
||||||
|
lease: Some(retained_anchor.lease),
|
||||||
|
bucket_incarnation_id: retained_anchor.bucket_incarnation_id,
|
||||||
|
disposition: MrfVerifiedRepairDisposition::Repaired,
|
||||||
|
};
|
||||||
|
let same_bucket_unmatched = MrfVerifiedRepairEvent {
|
||||||
|
object: Arc::from("future"),
|
||||||
|
lease: Some(MrfIngressLease::new(23)),
|
||||||
|
..matched_event.clone()
|
||||||
|
};
|
||||||
|
let other_bucket_event = MrfVerifiedRepairEvent {
|
||||||
|
bucket: other_bucket.clone(),
|
||||||
|
..matched_event.clone()
|
||||||
|
};
|
||||||
|
|
||||||
|
note_mrf_verified_repair(matched_event);
|
||||||
|
note_mrf_verified_repair(same_bucket_unmatched.clone());
|
||||||
|
note_mrf_verified_repair(other_bucket_event.clone());
|
||||||
|
|
||||||
|
let mut anchors = vec![retained_anchor, waiting_anchor.clone()];
|
||||||
|
assert_eq!(consume_recorded_verified_mrf_repair_events_for(&bucket, &mut anchors), 1);
|
||||||
|
assert_eq!(anchors, vec![waiting_anchor]);
|
||||||
|
|
||||||
|
let remaining_bucket_events = take_mrf_verified_repair_events_for(&bucket);
|
||||||
|
assert_eq!(
|
||||||
|
remaining_bucket_events,
|
||||||
|
vec![same_bucket_unmatched],
|
||||||
|
"same-bucket proofs without a retained anchor must remain available"
|
||||||
|
);
|
||||||
|
let remaining_other_events = take_mrf_verified_repair_events_for(&other_bucket);
|
||||||
|
assert_eq!(
|
||||||
|
remaining_other_events,
|
||||||
|
vec![other_bucket_event],
|
||||||
|
"proofs for other buckets must not be drained by this consumer"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn try_send_delivers_and_respects_capacity() {
|
async fn try_send_delivers_and_respects_capacity() {
|
||||||
let mut receiver = init_mrf_channel().expect("first initialization should succeed");
|
let mut receiver = init_mrf_channel().expect("first initialization should succeed");
|
||||||
@@ -607,4 +982,32 @@ mod tests {
|
|||||||
assert_eq!(flooded.len(), MRF_REPAIRED_EVENT_CAP);
|
assert_eq!(flooded.len(), MRF_REPAIRED_EVENT_CAP);
|
||||||
assert_eq!(flooded[0].object.as_ref(), "object-9", "the oldest notices past the cap are dropped");
|
assert_eq!(flooded[0].object.as_ref(), "object-9", "the oldest notices past the cap are dropped");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn verified_repair_events_preserve_full_identity_and_bucket_scope() {
|
||||||
|
let bucket_incarnation_id = Uuid::new_v4();
|
||||||
|
let event = MrfVerifiedRepairEvent {
|
||||||
|
kind: MrfKind::PartialWrite,
|
||||||
|
bucket: Arc::from("verified-bucket-a"),
|
||||||
|
object: Arc::from("object-a"),
|
||||||
|
version_id: Some([4u8; 16]),
|
||||||
|
scope: Some(MrfScope {
|
||||||
|
pool_index: 2,
|
||||||
|
set_index: 3,
|
||||||
|
}),
|
||||||
|
lease: Some(MrfIngressLease::new(42)),
|
||||||
|
bucket_incarnation_id,
|
||||||
|
disposition: MrfVerifiedRepairDisposition::Repaired,
|
||||||
|
};
|
||||||
|
note_mrf_verified_repair(event.clone());
|
||||||
|
note_mrf_verified_repair(MrfVerifiedRepairEvent {
|
||||||
|
bucket: Arc::from("verified-bucket-b"),
|
||||||
|
..event.clone()
|
||||||
|
});
|
||||||
|
|
||||||
|
let taken = take_mrf_verified_repair_events_for("verified-bucket-a");
|
||||||
|
assert_eq!(taken, vec![event]);
|
||||||
|
assert!(take_mrf_verified_repair_events_for("verified-bucket-a").is_empty());
|
||||||
|
assert_eq!(take_mrf_verified_repair_events_for("verified-bucket-b").len(), 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,11 @@ Current guidance:
|
|||||||
|
|
||||||
- `RUSTFS_BROWSER_REDIRECT_URL` sets the externally reachable browser origin used for OIDC callback, console success redirect, and logout fallback URLs. Configure it to the public scheme and authority without a path, for example `https://console.example.com`. In load-balancer deployments, keep OIDC authorize and callback requests on the same backend node because the in-flight OIDC `state` is local to the RustFS node.
|
- `RUSTFS_BROWSER_REDIRECT_URL` sets the externally reachable browser origin used for OIDC callback, console success redirect, and logout fallback URLs. Configure it to the public scheme and authority without a path, for example `https://console.example.com`. In load-balancer deployments, keep OIDC authorize and callback requests on the same backend node because the in-flight OIDC `state` is local to the RustFS node.
|
||||||
|
|
||||||
|
## S3 API environment variables
|
||||||
|
|
||||||
|
- `RUSTFS_API_OBJECT_MAX_VERSIONS` caps the number of retained versions for a single object. It defaults to `9223372036854775807`, matching MinIO's practical-unlimited default. Set a positive integer to enforce a lower per-object metadata bound.
|
||||||
|
- `MINIO_API_OBJECT_MAX_VERSIONS` is accepted as a compatibility alias when the canonical RustFS variable is not set.
|
||||||
|
|
||||||
## Distributed endpoint locality
|
## Distributed endpoint locality
|
||||||
|
|
||||||
- `RUSTFS_LOCAL_ENDPOINT_HOST` identifies this server's host in a distributed `RUSTFS_VOLUMES` topology without resolving every peer during startup. Set it to exactly one host, without a scheme, port, or path. It is accepted only for orchestrated URL topologies and must match at least one endpoint on the RustFS server port; invalid or unmatched values fail startup. Leave it unset to retain DNS-based locality discovery.
|
- `RUSTFS_LOCAL_ENDPOINT_HOST` identifies this server's host in a distributed `RUSTFS_VOLUMES` topology without resolving every peer during startup. Set it to exactly one host, without a scheme, port, or path. It is accepted only for orchestrated URL topologies and must match at least one endpoint on the RustFS server port; invalid or unmatched values fail startup. Leave it unset to retain DNS-based locality discovery.
|
||||||
@@ -130,6 +135,62 @@ Scanner cycle budget controls:
|
|||||||
- timeout returns S3 `SlowDown`, so clients should use normal SDK retry handling.
|
- timeout returns S3 `SlowDown`, so clients should use normal SDK retry handling.
|
||||||
- this is not a fdatasync or group-commit switch. Track fdatasync batching separately with `rustfs_s3_put_object_rename_fdatasync_batch_files`.
|
- this is not a fdatasync or group-commit switch. Track fdatasync batching separately with `rustfs_s3_put_object_rename_fdatasync_batch_files`.
|
||||||
|
|
||||||
|
## Foreground write admission environment variables
|
||||||
|
|
||||||
|
Large direct `PutObject` requests and multipart `UploadPart` requests share one
|
||||||
|
per-process permit pool that bounds how many bodies are ingested and written
|
||||||
|
concurrently. Small direct PUTs stay on the legacy path.
|
||||||
|
|
||||||
|
- `RUSTFS_PUT_LARGE_FOREGROUND_ADMISSION_ENABLE`
|
||||||
|
- enables the default-on pool; `false` keeps only the soft request counter.
|
||||||
|
- default is `true`.
|
||||||
|
- `RUSTFS_PUT_LARGE_FOREGROUND_ADMISSION_LIMIT`
|
||||||
|
- permits in the pool; `0` derives half of `RUSTFS_OBJECT_MAX_CONCURRENT_DISK_READS`, clamped to `32`.
|
||||||
|
- default is `0` (32 permits at stock settings).
|
||||||
|
- `RUSTFS_PUT_LARGE_FOREGROUND_ADMISSION_MIN_SIZE_BYTES`
|
||||||
|
- smallest direct `PutObject` that takes a permit; unknown-size requests always do.
|
||||||
|
- default is `33554432` (32 MiB).
|
||||||
|
- `RUSTFS_PUT_LARGE_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS`
|
||||||
|
- how long a direct `PutObject` waits for a permit before returning S3 `SlowDown`.
|
||||||
|
- default is `250`.
|
||||||
|
- `RUSTFS_PUT_MULTIPART_FOREGROUND_ADMISSION_MIN_SIZE_BYTES`
|
||||||
|
- smallest `UploadPart` that takes a permit; `0` gates every part.
|
||||||
|
- default is `0`.
|
||||||
|
- `RUSTFS_PUT_MULTIPART_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS`
|
||||||
|
- how long an `UploadPart` waits in the bounded queue for a permit before returning S3 `SlowDown`; `0` rejects immediately when the pool is full.
|
||||||
|
- default is `10000`. Parts wait before body ingest, so SDK-default clients that send every part of an upload concurrently drain through the pool instead of failing on a full pool.
|
||||||
|
- RustFS does not read the request body while a part is queued, so the client's socket write stalls for the whole wait and whatever timeout the client or an intermediary has configured competes with this value. Keep it with margin below the shortest such timeout in use (botocore applies its 60 s `connect_timeout` to the body write; the AWS SDK for Java v2 has a 30 s socket write timeout; reverse proxies add their own body timeouts); a wait that outlives the client timeout surfaces as a dropped connection instead of `SlowDown`.
|
||||||
|
- `RUSTFS_PUT_MULTIPART_FOREGROUND_ADMISSION_MAX_PENDING`
|
||||||
|
- maximum `UploadPart` requests waiting for a permit at once; parts beyond it return `SlowDown` without waiting.
|
||||||
|
- default is `0`, which derives 16 times the permit limit (512 at stock settings).
|
||||||
|
- each queued HTTP/1 part holds whatever unread body the client already pushed into the connection's kernel receive buffer (an HTTP/2 part holds up to its flow-control window in process memory), so this depth also bounds that memory. RustFS leaves the receive buffer to kernel autotuning (see `RUSTFS_HTTP_SOCKET_RECV_BUFFER_BYTES` below), which keeps an unread connection at the kernel's initial size (128 KiB on current Linux).
|
||||||
|
- `RUSTFS_PUT_FOREGROUND_ADMISSION_ENABLE`, `RUSTFS_PUT_FOREGROUND_ADMISSION_LIMIT`, `RUSTFS_PUT_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS`
|
||||||
|
- experimental strict gate that applies to every foreground write regardless of size and replaces the pool above when enabled.
|
||||||
|
- default is disabled; enabling it with limit `0` disables foreground write admission entirely.
|
||||||
|
|
||||||
|
## HTTP listener socket environment variables
|
||||||
|
|
||||||
|
- `RUSTFS_HTTP_SOCKET_RECV_BUFFER_BYTES`
|
||||||
|
- fixed `SO_RCVBUF` for the API listener, inherited by every accepted socket; `0` leaves the receive buffer to kernel autotuning.
|
||||||
|
- default is `0`. Earlier releases hard-coded 4 MiB, which Linux doubles to 8 MiB and which disables autotuning, so every connection whose body was not being read yet (a multipart part queued for a foreground write permit) could accumulate up to 8 MiB of unread body in kernel memory; at SDK-default multipart concurrency that was enough to push a node into TCP memory pressure.
|
||||||
|
- with autotuning the per-connection receive ceiling is the kernel's (`net.ipv4.tcp_rmem` max, 6 MiB on stock Linux) instead of the former fixed 8 MiB, so a single very high-bandwidth-delay connection may see a somewhat lower ceiling; raise `net.ipv4.tcp_rmem` first, and set this variable only on kernels without receive-buffer autotuning (illumos/Solaris) or where the sysctl cannot be changed.
|
||||||
|
- the send buffer stays fixed at 4 MiB because the stock Linux send autotuning ceiling (`net.ipv4.tcp_wmem` max, 4 MiB) is lower than a GB-level response stream needs.
|
||||||
|
|
||||||
|
## Remote tier timeout environment variables
|
||||||
|
|
||||||
|
- `RUSTFS_TIER_REMOTE_CONNECT_TIMEOUT_SECS`
|
||||||
|
- remote tier TCP connect timeout.
|
||||||
|
- default is `10`.
|
||||||
|
- must be positive; zero fails tier client initialization, while an invalid integer is logged and falls back to the default.
|
||||||
|
- `RUSTFS_TIER_REMOTE_REQUEST_TIMEOUT_SECS`
|
||||||
|
- remote tier request timeout through response headers.
|
||||||
|
- default is `86400` so large transition uploads keep a production-safe budget.
|
||||||
|
- must be positive; zero fails tier client initialization, while an invalid integer is logged and falls back to the default. Very large values are accepted and act as a correspondingly long budget.
|
||||||
|
- `RUSTFS_TIER_REMOTE_RESPONSE_BODY_IDLE_TIMEOUT_SECS`
|
||||||
|
- maximum idle time between remote tier response-body chunks.
|
||||||
|
- default is `60`; the timer resets only when non-empty body data keeps progressing.
|
||||||
|
- must be positive; zero fails tier client initialization, while an invalid integer is logged and falls back to the default.
|
||||||
|
|
||||||
## Drive timeout environment variables
|
## Drive timeout environment variables
|
||||||
|
|
||||||
- `RUSTFS_DRIVE_METADATA_TIMEOUT_SECS`
|
- `RUSTFS_DRIVE_METADATA_TIMEOUT_SECS`
|
||||||
@@ -157,6 +218,14 @@ Drive timeout profile preset:
|
|||||||
- Then `RUSTFS_DRIVE_MAX_TIMEOUT_DURATION` legacy fallback.
|
- Then `RUSTFS_DRIVE_MAX_TIMEOUT_DURATION` legacy fallback.
|
||||||
- Then the profile-derived default (`default` or `high_latency`).
|
- Then the profile-derived default (`default` or `high_latency`).
|
||||||
|
|
||||||
|
## Admin peer probe timeout
|
||||||
|
|
||||||
|
- `RUSTFS_ADMIN_PEER_PROBE_TIMEOUT_SECS`
|
||||||
|
- total per-peer budget for the `server_info`/`storage_info` admin probe round; `server_info` may reconnect once and `storage_info` remains a single attempt.
|
||||||
|
- default is `10` seconds, preserving the previous two-attempt worst-case budget.
|
||||||
|
- values must be positive; `0` or an invalid value falls back to the default, and values above `60` are clamped to `60`.
|
||||||
|
- the setting is read by the aggregating node only; it does not change the internode RPC wire contract. Any retry shares one round deadline rather than receiving a fresh timeout.
|
||||||
|
|
||||||
## Startup filesystem boundary policy
|
## Startup filesystem boundary policy
|
||||||
|
|
||||||
- `RUSTFS_UNSUPPORTED_FS_POLICY` controls startup behavior when RustFS detects local endpoint filesystems that are outside the supported production boundary.
|
- `RUSTFS_UNSUPPORTED_FS_POLICY` controls startup behavior when RustFS detects local endpoint filesystems that are outside the supported production boundary.
|
||||||
|
|||||||
@@ -90,3 +90,20 @@ pub const ENV_API_MAX_CONNECTIONS: &str = "RUSTFS_API_MAX_CONNECTIONS";
|
|||||||
|
|
||||||
/// Default for `RUSTFS_API_MAX_CONNECTIONS` (`0` = unlimited).
|
/// Default for `RUSTFS_API_MAX_CONNECTIONS` (`0` = unlimited).
|
||||||
pub const DEFAULT_API_MAX_CONNECTIONS: usize = 0;
|
pub const DEFAULT_API_MAX_CONNECTIONS: usize = 0;
|
||||||
|
|
||||||
|
/// Maximum retained versions per object.
|
||||||
|
///
|
||||||
|
/// The default follows MinIO and is effectively unlimited for practical
|
||||||
|
/// deployments. Operators can lower it to bound per-object metadata growth.
|
||||||
|
/// Environment variable: RUSTFS_API_OBJECT_MAX_VERSIONS
|
||||||
|
/// MinIO-compatible alias: MINIO_API_OBJECT_MAX_VERSIONS
|
||||||
|
/// Example: RUSTFS_API_OBJECT_MAX_VERSIONS=50000
|
||||||
|
pub const ENV_API_OBJECT_MAX_VERSIONS: &str = "RUSTFS_API_OBJECT_MAX_VERSIONS";
|
||||||
|
|
||||||
|
/// Default and maximum accepted value for `RUSTFS_API_OBJECT_MAX_VERSIONS`.
|
||||||
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
pub const DEFAULT_API_OBJECT_MAX_VERSIONS: usize = 9_223_372_036_854_775_807;
|
||||||
|
|
||||||
|
/// Default and maximum accepted value for `RUSTFS_API_OBJECT_MAX_VERSIONS`.
|
||||||
|
#[cfg(not(target_pointer_width = "64"))]
|
||||||
|
pub const DEFAULT_API_OBJECT_MAX_VERSIONS: usize = usize::MAX;
|
||||||
|
|||||||
@@ -39,6 +39,15 @@ pub const DEFAULT_INTERNODE_HTTP2_KEEPALIVE_TIMEOUT_SECS: u64 = 20;
|
|||||||
pub const ENV_INTERNODE_RPC_TIMEOUT_SECS: &str = "RUSTFS_INTERNODE_RPC_TIMEOUT_SECS";
|
pub const ENV_INTERNODE_RPC_TIMEOUT_SECS: &str = "RUSTFS_INTERNODE_RPC_TIMEOUT_SECS";
|
||||||
pub const DEFAULT_INTERNODE_RPC_TIMEOUT_SECS: u64 = 30;
|
pub const DEFAULT_INTERNODE_RPC_TIMEOUT_SECS: u64 = 30;
|
||||||
|
|
||||||
|
/// Total budget for one admin peer probe round, including any reconnect retry.
|
||||||
|
///
|
||||||
|
/// This is intentionally separate from the transport-level RPC timeout: admin
|
||||||
|
/// probes may retry once, but the retry must consume the same round budget.
|
||||||
|
pub const ENV_ADMIN_PEER_PROBE_TIMEOUT_SECS: &str = "RUSTFS_ADMIN_PEER_PROBE_TIMEOUT_SECS";
|
||||||
|
pub const DEFAULT_ADMIN_PEER_PROBE_TIMEOUT_SECS: u64 = 10;
|
||||||
|
pub const MAX_ADMIN_PEER_PROBE_TIMEOUT_SECS: u64 = 60;
|
||||||
|
const _: () = assert!(DEFAULT_ADMIN_PEER_PROBE_TIMEOUT_SECS <= MAX_ADMIN_PEER_PROBE_TIMEOUT_SECS);
|
||||||
|
|
||||||
// ── Client-side internode gRPC channel tuning (P0) ──
|
// ── Client-side internode gRPC channel tuning (P0) ──
|
||||||
// These mirror the server-side HTTP/2 transport tuning in `rustfs/src/server/http.rs`
|
// These mirror the server-side HTTP/2 transport tuning in `rustfs/src/server/http.rs`
|
||||||
// on the *client* `tonic` `Endpoint` used for internode control-plane RPCs. Prior to
|
// on the *client* `tonic` `Endpoint` used for internode control-plane RPCs. Prior to
|
||||||
@@ -312,6 +321,7 @@ mod tests {
|
|||||||
assert_eq!(DEFAULT_INTERNODE_HTTP2_KEEPALIVE_INTERVAL_SECS, 5);
|
assert_eq!(DEFAULT_INTERNODE_HTTP2_KEEPALIVE_INTERVAL_SECS, 5);
|
||||||
assert_eq!(DEFAULT_INTERNODE_HTTP2_KEEPALIVE_TIMEOUT_SECS, 20);
|
assert_eq!(DEFAULT_INTERNODE_HTTP2_KEEPALIVE_TIMEOUT_SECS, 20);
|
||||||
assert_eq!(DEFAULT_INTERNODE_RPC_TIMEOUT_SECS, 30);
|
assert_eq!(DEFAULT_INTERNODE_RPC_TIMEOUT_SECS, 30);
|
||||||
|
assert_eq!(DEFAULT_ADMIN_PEER_PROBE_TIMEOUT_SECS, 10);
|
||||||
assert_eq!(DEFAULT_INTERNODE_HTTP_TUNING_PROFILE, "legacy");
|
assert_eq!(DEFAULT_INTERNODE_HTTP_TUNING_PROFILE, "legacy");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,6 +422,7 @@ mod tests {
|
|||||||
"RUSTFS_INTERNODE_HTTP2_KEEPALIVE_TIMEOUT_SECS"
|
"RUSTFS_INTERNODE_HTTP2_KEEPALIVE_TIMEOUT_SECS"
|
||||||
);
|
);
|
||||||
assert_eq!(ENV_INTERNODE_RPC_TIMEOUT_SECS, "RUSTFS_INTERNODE_RPC_TIMEOUT_SECS");
|
assert_eq!(ENV_INTERNODE_RPC_TIMEOUT_SECS, "RUSTFS_INTERNODE_RPC_TIMEOUT_SECS");
|
||||||
|
assert_eq!(ENV_ADMIN_PEER_PROBE_TIMEOUT_SECS, "RUSTFS_ADMIN_PEER_PROBE_TIMEOUT_SECS");
|
||||||
assert_eq!(ENV_INTERNODE_HTTP_TUNING_PROFILE, "RUSTFS_INTERNODE_HTTP_TUNING_PROFILE");
|
assert_eq!(ENV_INTERNODE_HTTP_TUNING_PROFILE, "RUSTFS_INTERNODE_HTTP_TUNING_PROFILE");
|
||||||
assert_eq!(ENV_INTERNODE_HTTP_POOL_MAX_IDLE_PER_HOST, "RUSTFS_INTERNODE_HTTP_POOL_MAX_IDLE_PER_HOST");
|
assert_eq!(ENV_INTERNODE_HTTP_POOL_MAX_IDLE_PER_HOST, "RUSTFS_INTERNODE_HTTP_POOL_MAX_IDLE_PER_HOST");
|
||||||
assert_eq!(ENV_INTERNODE_HTTP_POOL_IDLE_TIMEOUT_SECS, "RUSTFS_INTERNODE_HTTP_POOL_IDLE_TIMEOUT_SECS");
|
assert_eq!(ENV_INTERNODE_HTTP_POOL_IDLE_TIMEOUT_SECS, "RUSTFS_INTERNODE_HTTP_POOL_IDLE_TIMEOUT_SECS");
|
||||||
|
|||||||
@@ -137,6 +137,28 @@ pub const DEFAULT_TIER_REMOTE_VERSION_STATE_FLEET_CONFIRMED: bool = false;
|
|||||||
const _: () = assert!(!DEFAULT_TIER_REMOTE_VERSION_STATE_WRITE);
|
const _: () = assert!(!DEFAULT_TIER_REMOTE_VERSION_STATE_WRITE);
|
||||||
const _: () = assert!(!DEFAULT_TIER_REMOTE_VERSION_STATE_FLEET_CONFIRMED);
|
const _: () = assert!(!DEFAULT_TIER_REMOTE_VERSION_STATE_FLEET_CONFIRMED);
|
||||||
|
|
||||||
|
/// Environment variable for remote tier TCP connect timeout in seconds.
|
||||||
|
pub const ENV_TIER_REMOTE_CONNECT_TIMEOUT_SECS: &str = "RUSTFS_TIER_REMOTE_CONNECT_TIMEOUT_SECS";
|
||||||
|
/// Default remote tier TCP connect timeout in seconds.
|
||||||
|
pub const DEFAULT_TIER_REMOTE_CONNECT_TIMEOUT_SECS: u64 = 10;
|
||||||
|
|
||||||
|
/// Environment variable for the remote tier request timeout in seconds.
|
||||||
|
///
|
||||||
|
/// This bounds upload/download request progress through response headers. The
|
||||||
|
/// default is intentionally large so multi-TiB transition uploads keep their
|
||||||
|
/// previous production budget while black-hole remotes no longer wait forever.
|
||||||
|
pub const ENV_TIER_REMOTE_REQUEST_TIMEOUT_SECS: &str = "RUSTFS_TIER_REMOTE_REQUEST_TIMEOUT_SECS";
|
||||||
|
/// Default remote tier request timeout in seconds.
|
||||||
|
pub const DEFAULT_TIER_REMOTE_REQUEST_TIMEOUT_SECS: u64 = 24 * 60 * 60;
|
||||||
|
|
||||||
|
/// Environment variable for remote tier response-body idle timeout in seconds.
|
||||||
|
///
|
||||||
|
/// The timer is re-armed on every non-empty response-body chunk, so slow but
|
||||||
|
/// progressing remotes can continue while silent response bodies are cancelled.
|
||||||
|
pub const ENV_TIER_REMOTE_RESPONSE_BODY_IDLE_TIMEOUT_SECS: &str = "RUSTFS_TIER_REMOTE_RESPONSE_BODY_IDLE_TIMEOUT_SECS";
|
||||||
|
/// Default remote tier response-body idle timeout in seconds.
|
||||||
|
pub const DEFAULT_TIER_REMOTE_RESPONSE_BODY_IDLE_TIMEOUT_SECS: u64 = 60;
|
||||||
|
|
||||||
/// Request the object-transaction fencing contract used by storage-owned
|
/// Request the object-transaction fencing contract used by storage-owned
|
||||||
/// cleanup receipts and lock-window optimizations.
|
/// cleanup receipts and lock-window optimizations.
|
||||||
///
|
///
|
||||||
@@ -197,6 +219,27 @@ pub const DEFAULT_POOL_META_V3_FLEET_CONFIRMED: bool = false;
|
|||||||
const _: () = assert!(!DEFAULT_POOL_META_V3_WRITE);
|
const _: () = assert!(!DEFAULT_POOL_META_V3_WRITE);
|
||||||
const _: () = assert!(!DEFAULT_POOL_META_V3_FLEET_CONFIRMED);
|
const _: () = assert!(!DEFAULT_POOL_META_V3_FLEET_CONFIRMED);
|
||||||
|
|
||||||
|
/// Maximum unpacked size accepted for one Snowball archive member.
|
||||||
|
///
|
||||||
|
/// The value is expressed in bytes. Invalid values use the default, while
|
||||||
|
/// valid values are clamped to [`MAX_SNOWBALL_ENTRY_BYTES`].
|
||||||
|
pub const ENV_SNOWBALL_MAX_ENTRY_BYTES: &str = "RUSTFS_SNOWBALL_MAX_ENTRY_BYTES";
|
||||||
|
pub const DEFAULT_SNOWBALL_MAX_ENTRY_BYTES: u64 = 1024 * 1024 * 1024;
|
||||||
|
pub const MAX_SNOWBALL_ENTRY_BYTES: u64 = 1024 * DEFAULT_SNOWBALL_MAX_ENTRY_BYTES;
|
||||||
|
|
||||||
|
/// Maximum cumulative unpacked object bytes accepted from one Snowball
|
||||||
|
/// archive request.
|
||||||
|
///
|
||||||
|
/// This does not include tar headers or bounded PAX metadata. The value is
|
||||||
|
/// expressed in bytes and is clamped to
|
||||||
|
/// [`MAX_SNOWBALL_UNPACKED_BYTES`].
|
||||||
|
pub const ENV_SNOWBALL_MAX_UNPACKED_BYTES: &str = "RUSTFS_SNOWBALL_MAX_UNPACKED_BYTES";
|
||||||
|
pub const DEFAULT_SNOWBALL_MAX_UNPACKED_BYTES: u64 = 10 * 1024 * 1024 * 1024;
|
||||||
|
pub const MAX_SNOWBALL_UNPACKED_BYTES: u64 = 10 * 1024 * DEFAULT_SNOWBALL_MAX_ENTRY_BYTES;
|
||||||
|
|
||||||
|
const _: () = assert!(DEFAULT_SNOWBALL_MAX_ENTRY_BYTES <= MAX_SNOWBALL_ENTRY_BYTES);
|
||||||
|
const _: () = assert!(DEFAULT_SNOWBALL_MAX_UNPACKED_BYTES <= MAX_SNOWBALL_UNPACKED_BYTES);
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// Concurrent Request Fix - Timeout and Backpressure Configuration
|
// Concurrent Request Fix - Timeout and Backpressure Configuration
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
@@ -322,13 +365,54 @@ pub const ENV_PUT_MULTIPART_FOREGROUND_ADMISSION_MIN_SIZE_BYTES: &str =
|
|||||||
"RUSTFS_PUT_MULTIPART_FOREGROUND_ADMISSION_MIN_SIZE_BYTES";
|
"RUSTFS_PUT_MULTIPART_FOREGROUND_ADMISSION_MIN_SIZE_BYTES";
|
||||||
pub const DEFAULT_PUT_MULTIPART_FOREGROUND_ADMISSION_MIN_SIZE_BYTES: usize = 0;
|
pub const DEFAULT_PUT_MULTIPART_FOREGROUND_ADMISSION_MIN_SIZE_BYTES: usize = 0;
|
||||||
|
|
||||||
/// Time in milliseconds an automatic foreground write waits for a permit.
|
/// Time in milliseconds an automatic foreground direct PutObject waits for a permit.
|
||||||
///
|
///
|
||||||
/// A short wait smooths transient bursts while still returning S3
|
/// A short wait smooths transient bursts while still returning S3
|
||||||
/// `SlowDown`/503 before body ingest when the node is already saturated.
|
/// `SlowDown`/503 before body ingest when the node is already saturated.
|
||||||
pub const ENV_PUT_LARGE_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS: &str = "RUSTFS_PUT_LARGE_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS";
|
pub const ENV_PUT_LARGE_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS: &str = "RUSTFS_PUT_LARGE_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS";
|
||||||
pub const DEFAULT_PUT_LARGE_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS: u64 = 250;
|
pub const DEFAULT_PUT_LARGE_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS: u64 = 250;
|
||||||
|
|
||||||
|
/// Time in milliseconds a multipart UploadPart waits for a foreground write permit.
|
||||||
|
///
|
||||||
|
/// SDK-default multipart clients send every part of an upload concurrently, so
|
||||||
|
/// a single node routinely sees several times more parts in flight than the
|
||||||
|
/// permit pool allows. A queued part waits before body ingest, so the pool
|
||||||
|
/// still bounds the number of parts being written, but the wait is not free:
|
||||||
|
/// RustFS does not read the request body while the part is queued (hyper only
|
||||||
|
/// sends `100 Continue` once the body is first polled, and the AWS SDKs send
|
||||||
|
/// the body after a 1-3 s `Expect: 100-continue` grace anyway), so the
|
||||||
|
/// client's socket write stalls once the kernel buffers fill, and whatever
|
||||||
|
/// timeout the client or an intermediary has configured decides the outcome.
|
||||||
|
/// botocore applies its `connect_timeout` (60 s) to the body write, the AWS
|
||||||
|
/// SDK for Java v2 has a 30 s socket write timeout, and MinIO bounds the same
|
||||||
|
/// wait with a 10 s request deadline. The wait must leave margin under the
|
||||||
|
/// shortest of those, not merely fall below an SDK default, so the part
|
||||||
|
/// receives S3 `SlowDown`/503 for the client to retry instead of losing its
|
||||||
|
/// connection (issue #7385). `0` rejects immediately when the pool is full.
|
||||||
|
pub const ENV_PUT_MULTIPART_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS: &str =
|
||||||
|
"RUSTFS_PUT_MULTIPART_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS";
|
||||||
|
pub const DEFAULT_PUT_MULTIPART_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS: u64 = 10_000;
|
||||||
|
|
||||||
|
// A queued part holds the client's body write open for the whole wait. The
|
||||||
|
// shortest write timeout among mainstream S3 SDKs is the AWS SDK for Java v2's
|
||||||
|
// 30 s socket write timeout; keep the compiled default at no more than a third
|
||||||
|
// of it. This locks only the default; the environment variable may still raise
|
||||||
|
// the wait past any client timeout.
|
||||||
|
const _: () = assert!(DEFAULT_PUT_MULTIPART_FOREGROUND_ADMISSION_WAIT_TIMEOUT_MS * 3 <= 30_000);
|
||||||
|
|
||||||
|
/// Maximum multipart UploadPart requests waiting for a foreground write permit per process.
|
||||||
|
///
|
||||||
|
/// Parts beyond this queue depth are rejected with S3 `SlowDown`/503 without
|
||||||
|
/// waiting, so a genuinely saturated node still fails fast instead of holding
|
||||||
|
/// an unbounded set of connections open for the whole wait timeout. Each
|
||||||
|
/// queued HTTP/1 part also holds whatever unread body the client already
|
||||||
|
/// pushed into that connection's kernel receive buffer, and a queued HTTP/2
|
||||||
|
/// part holds up to its flow-control window in process memory, so the depth
|
||||||
|
/// bounds socket and window memory as well as connections.
|
||||||
|
/// `0` derives the depth from the permit limit.
|
||||||
|
pub const ENV_PUT_MULTIPART_FOREGROUND_ADMISSION_MAX_PENDING: &str = "RUSTFS_PUT_MULTIPART_FOREGROUND_ADMISSION_MAX_PENDING";
|
||||||
|
pub const DEFAULT_PUT_MULTIPART_FOREGROUND_ADMISSION_MAX_PENDING: usize = 0;
|
||||||
|
|
||||||
const _: () = assert!(DEFAULT_PUT_LARGE_FOREGROUND_ADMISSION_ENABLE);
|
const _: () = assert!(DEFAULT_PUT_LARGE_FOREGROUND_ADMISSION_ENABLE);
|
||||||
|
|
||||||
/// Environment variable for minimum GetObject timeout in seconds.
|
/// Environment variable for minimum GetObject timeout in seconds.
|
||||||
@@ -525,6 +609,36 @@ pub const ENV_OBJECT_LOCK_RPC_TIMEOUT_MS: &str = "RUSTFS_OBJECT_LOCK_RPC_TIMEOUT
|
|||||||
/// Default remote lock RPC transport timeout: 3000 milliseconds.
|
/// Default remote lock RPC transport timeout: 3000 milliseconds.
|
||||||
pub const DEFAULT_OBJECT_LOCK_RPC_TIMEOUT_MS: u64 = 3000;
|
pub const DEFAULT_OBJECT_LOCK_RPC_TIMEOUT_MS: u64 = 3000;
|
||||||
|
|
||||||
|
/// Environment variable for the minimum interval between evictions of the
|
||||||
|
/// cached lock RPC channel to one peer, in milliseconds.
|
||||||
|
///
|
||||||
|
/// A lock RPC that fails on transport, or that times out while the peer has
|
||||||
|
/// not completed any lock RPC for two deadlines, evicts the shared HTTP/2
|
||||||
|
/// channel so the next request re-dials. Evictions are rate limited per peer
|
||||||
|
/// so one slow lock endpoint cannot drive a reset/GOAWAY/reconnect loop
|
||||||
|
/// (issue #7363). `0` disables the cooldown.
|
||||||
|
///
|
||||||
|
/// Default: 5000 milliseconds.
|
||||||
|
pub const ENV_OBJECT_LOCK_RPC_EVICTION_COOLDOWN_MS: &str = "RUSTFS_OBJECT_LOCK_RPC_EVICTION_COOLDOWN_MS";
|
||||||
|
|
||||||
|
/// Default minimum interval between lock RPC channel evictions per peer: 5000 milliseconds.
|
||||||
|
pub const DEFAULT_OBJECT_LOCK_RPC_EVICTION_COOLDOWN_MS: u64 = 5000;
|
||||||
|
|
||||||
|
/// Environment variable for how many timed-out lock RPCs per peer may keep
|
||||||
|
/// running in the background instead of being cancelled.
|
||||||
|
///
|
||||||
|
/// Cancelling a timed-out stream sends `RST_STREAM`; enough of them make the
|
||||||
|
/// peer answer `GOAWAY too_many_resets` and drop every stream on the
|
||||||
|
/// connection. A detached RPC ends on its own within the internode RPC
|
||||||
|
/// timeout, and a lock it acquires after its caller gave up is released
|
||||||
|
/// immediately. Beyond this budget timed-out RPCs are cancelled as before.
|
||||||
|
///
|
||||||
|
/// Default: 256.
|
||||||
|
pub const ENV_OBJECT_LOCK_RPC_DETACHED_LIMIT: &str = "RUSTFS_OBJECT_LOCK_RPC_DETACHED_LIMIT";
|
||||||
|
|
||||||
|
/// Default per-peer budget of detached (timed-out but still running) lock RPCs: 256.
|
||||||
|
pub const DEFAULT_OBJECT_LOCK_RPC_DETACHED_LIMIT: usize = 256;
|
||||||
|
|
||||||
/// Environment variable to enable object namespace lock diagnostics.
|
/// Environment variable to enable object namespace lock diagnostics.
|
||||||
///
|
///
|
||||||
/// When enabled, RustFS emits slow lock acquisition and long lock hold
|
/// When enabled, RustFS emits slow lock acquisition and long lock hold
|
||||||
@@ -791,6 +905,16 @@ mod remote_version_state_tests {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn remote_tier_timeout_env_names_are_stable() {
|
||||||
|
assert_eq!(super::ENV_TIER_REMOTE_CONNECT_TIMEOUT_SECS, "RUSTFS_TIER_REMOTE_CONNECT_TIMEOUT_SECS");
|
||||||
|
assert_eq!(super::ENV_TIER_REMOTE_REQUEST_TIMEOUT_SECS, "RUSTFS_TIER_REMOTE_REQUEST_TIMEOUT_SECS");
|
||||||
|
assert_eq!(
|
||||||
|
super::ENV_TIER_REMOTE_RESPONSE_BODY_IDLE_TIMEOUT_SECS,
|
||||||
|
"RUSTFS_TIER_REMOTE_RESPONSE_BODY_IDLE_TIMEOUT_SECS"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn data_movement_part_checksum_gate_uses_stable_environment_names() {
|
fn data_movement_part_checksum_gate_uses_stable_environment_names() {
|
||||||
assert_eq!(super::ENV_DATA_MOVEMENT_PART_CHECKSUMS_WRITE, "RUSTFS_DATA_MOVEMENT_PART_CHECKSUMS_WRITE");
|
assert_eq!(super::ENV_DATA_MOVEMENT_PART_CHECKSUMS_WRITE, "RUSTFS_DATA_MOVEMENT_PART_CHECKSUMS_WRITE");
|
||||||
@@ -820,4 +944,10 @@ mod remote_version_state_tests {
|
|||||||
assert_eq!(super::ENV_POOL_META_V3_WRITE, "RUSTFS_POOL_META_V3_WRITE");
|
assert_eq!(super::ENV_POOL_META_V3_WRITE, "RUSTFS_POOL_META_V3_WRITE");
|
||||||
assert_eq!(super::ENV_POOL_META_V3_FLEET_CONFIRMED, "RUSTFS_POOL_META_V3_FLEET_CONFIRMED");
|
assert_eq!(super::ENV_POOL_META_V3_FLEET_CONFIRMED, "RUSTFS_POOL_META_V3_FLEET_CONFIRMED");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn snowball_limit_environment_names_are_stable() {
|
||||||
|
assert_eq!(super::ENV_SNOWBALL_MAX_ENTRY_BYTES, "RUSTFS_SNOWBALL_MAX_ENTRY_BYTES");
|
||||||
|
assert_eq!(super::ENV_SNOWBALL_MAX_UNPACKED_BYTES, "RUSTFS_SNOWBALL_MAX_UNPACKED_BYTES");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,6 +159,24 @@ pub const DEFAULT_HTTP1_HEADER_READ_TIMEOUT: u64 = 75;
|
|||||||
pub const ENV_HTTP1_MAX_BUF_SIZE: &str = "RUSTFS_HTTP1_MAX_BUF_SIZE";
|
pub const ENV_HTTP1_MAX_BUF_SIZE: &str = "RUSTFS_HTTP1_MAX_BUF_SIZE";
|
||||||
pub const DEFAULT_HTTP1_MAX_BUF_SIZE: usize = 64 * 1024; // 64 KB
|
pub const DEFAULT_HTTP1_MAX_BUF_SIZE: usize = 64 * 1024; // 64 KB
|
||||||
|
|
||||||
|
/// Environment variable for a fixed kernel receive buffer (`SO_RCVBUF`, bytes)
|
||||||
|
/// on the API listener. Default: 0, which leaves the buffer to kernel
|
||||||
|
/// autotuning.
|
||||||
|
///
|
||||||
|
/// A fixed `SO_RCVBUF` is inherited by every accepted socket and disables
|
||||||
|
/// receive-buffer autotuning, so a connection whose request body is not being
|
||||||
|
/// read yet (a multipart part queued for a foreground write permit) lets up to
|
||||||
|
/// the fixed size of unread body accumulate in kernel memory — Linux doubles
|
||||||
|
/// the requested value, so the former hard-coded 4 MiB held up to 8 MiB per
|
||||||
|
/// queued connection (issue #7385). Autotuning keeps an unread connection at
|
||||||
|
/// the kernel's initial size and grows only connections that are being
|
||||||
|
/// drained. Set this only on kernels without receive-buffer autotuning
|
||||||
|
/// (illumos/Solaris) or on very high-bandwidth-delay links where the kernel's
|
||||||
|
/// autotuning ceiling (`net.ipv4.tcp_rmem` on Linux) is too low and cannot be
|
||||||
|
/// raised.
|
||||||
|
pub const ENV_HTTP_SOCKET_RECV_BUFFER_BYTES: &str = "RUSTFS_HTTP_SOCKET_RECV_BUFFER_BYTES";
|
||||||
|
pub const DEFAULT_HTTP_SOCKET_RECV_BUFFER_BYTES: usize = 0;
|
||||||
|
|
||||||
/// Environment variable for the S3 request-body inter-chunk read timeout
|
/// Environment variable for the S3 request-body inter-chunk read timeout
|
||||||
/// (seconds). Default: 300. Set to 0 to disable.
|
/// (seconds). Default: 300. Set to 0 to disable.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -593,6 +593,20 @@ pub struct DataUsageSnapshotIdentity {
|
|||||||
pub scanner_epoch: Option<u64>,
|
pub scanner_epoch: Option<u64>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq)]
|
||||||
|
pub struct DataUsageSegmentInvalidationProof {
|
||||||
|
#[serde(default)]
|
||||||
|
pub process_epoch: String,
|
||||||
|
#[serde(default)]
|
||||||
|
pub generation_start: u64,
|
||||||
|
#[serde(default)]
|
||||||
|
pub generation_end: u64,
|
||||||
|
#[serde(default)]
|
||||||
|
pub producer_identity_coverage_complete: bool,
|
||||||
|
#[serde(default)]
|
||||||
|
pub cold_zero_walk_oracle: bool,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq)]
|
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq)]
|
||||||
pub struct DataUsageSnapshotSetState {
|
pub struct DataUsageSnapshotSetState {
|
||||||
pub pool_index: u64,
|
pub pool_index: u64,
|
||||||
@@ -607,6 +621,8 @@ pub struct DataUsageSnapshotSetState {
|
|||||||
pub complete: bool,
|
pub complete: bool,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub tombstone: bool,
|
pub tombstone: bool,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub segment_invalidation_proof: Option<DataUsageSegmentInvalidationProof>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DataUsageInfo {
|
impl DataUsageInfo {
|
||||||
@@ -3073,6 +3089,7 @@ mod tests {
|
|||||||
scan_plan_digest: Some([1; 32]),
|
scan_plan_digest: Some([1; 32]),
|
||||||
complete: false,
|
complete: false,
|
||||||
tombstone: false,
|
tombstone: false,
|
||||||
|
segment_invalidation_proof: None,
|
||||||
}];
|
}];
|
||||||
assert!(observed_data_usage_is_newer(&partial, &authoritative));
|
assert!(observed_data_usage_is_newer(&partial, &authoritative));
|
||||||
}
|
}
|
||||||
@@ -3095,6 +3112,7 @@ mod tests {
|
|||||||
scan_plan_digest: Some([1; 32]),
|
scan_plan_digest: Some([1; 32]),
|
||||||
complete: true,
|
complete: true,
|
||||||
tombstone: false,
|
tombstone: false,
|
||||||
|
segment_invalidation_proof: None,
|
||||||
},
|
},
|
||||||
DataUsageSnapshotSetState {
|
DataUsageSnapshotSetState {
|
||||||
pool_index: 1,
|
pool_index: 1,
|
||||||
@@ -3104,6 +3122,7 @@ mod tests {
|
|||||||
scan_plan_digest: Some([2; 32]),
|
scan_plan_digest: Some([2; 32]),
|
||||||
complete: false,
|
complete: false,
|
||||||
tombstone: false,
|
tombstone: false,
|
||||||
|
segment_invalidation_proof: None,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -3113,6 +3132,42 @@ mod tests {
|
|||||||
assert!(partial.is_valid_partial_snapshot());
|
assert!(partial.is_valid_partial_snapshot());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn set_state_segment_invalidation_proof_is_additive() {
|
||||||
|
#[derive(Deserialize)]
|
||||||
|
struct LegacySetState {
|
||||||
|
pool_index: u64,
|
||||||
|
set_index: u64,
|
||||||
|
complete: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
let proof = DataUsageSegmentInvalidationProof {
|
||||||
|
process_epoch: "scanner-process".to_string(),
|
||||||
|
generation_start: 3,
|
||||||
|
generation_end: 5,
|
||||||
|
producer_identity_coverage_complete: true,
|
||||||
|
cold_zero_walk_oracle: true,
|
||||||
|
};
|
||||||
|
let state = DataUsageSnapshotSetState {
|
||||||
|
pool_index: 1,
|
||||||
|
set_index: 2,
|
||||||
|
scanner_cycle: Some(9),
|
||||||
|
scanner_epoch: Some(4),
|
||||||
|
scan_plan_digest: Some([7; 32]),
|
||||||
|
complete: true,
|
||||||
|
tombstone: false,
|
||||||
|
segment_invalidation_proof: Some(proof.clone()),
|
||||||
|
};
|
||||||
|
let encoded = rmp_serde::to_vec_named(&state).expect("set state should encode with additive proof");
|
||||||
|
let legacy: LegacySetState = rmp_serde::from_slice(&encoded).expect("legacy readers should ignore proof metadata");
|
||||||
|
assert_eq!(legacy.pool_index, 1);
|
||||||
|
assert_eq!(legacy.set_index, 2);
|
||||||
|
assert!(legacy.complete);
|
||||||
|
|
||||||
|
let decoded: DataUsageSnapshotSetState = rmp_serde::from_slice(&encoded).expect("new readers should restore proof");
|
||||||
|
assert_eq!(decoded.segment_invalidation_proof, Some(proof));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn completeness_marker_requires_a_snapshot_timestamp() {
|
fn completeness_marker_requires_a_snapshot_timestamp() {
|
||||||
let untimestamped = DataUsageInfo {
|
let untimestamped = DataUsageInfo {
|
||||||
|
|||||||
@@ -144,3 +144,6 @@ russh = { workspace = true, features = ["serde"] }
|
|||||||
russh-sftp = { workspace = true }
|
russh-sftp = { workspace = true }
|
||||||
zip.workspace = true
|
zip.workspace = true
|
||||||
clap = { workspace = true, features = ["derive", "env"] }
|
clap = { workspace = true, features = ["derive", "env"] }
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
tempfile.workspace = true
|
||||||
|
|||||||
@@ -25,10 +25,13 @@ Registered in [`src/lib.rs`](src/lib.rs). Grouped by concern:
|
|||||||
| **policy** | [`src/policy/`](src/policy), `existing_object_tag_policy_test`, `bucket_policy_check_test`, `anonymous_access_test`, `security_boundary_test`, `multipart_auth_test` | IAM / bucket-policy / STS session policy, policy variables, anonymous access, DoS/SSRF boundaries. Own guide: [`src/policy/README.md`](src/policy/README.md) |
|
| **policy** | [`src/policy/`](src/policy), `existing_object_tag_policy_test`, `bucket_policy_check_test`, `anonymous_access_test`, `security_boundary_test`, `multipart_auth_test` | IAM / bucket-policy / STS session policy, policy variables, anonymous access, DoS/SSRF boundaries. Own guide: [`src/policy/README.md`](src/policy/README.md) |
|
||||||
| **protocols** | [`src/protocols/`](src/protocols) | FTPS, WebDAV, SFTP compliance. Fixed ports, own guide: [`src/protocols/README.md`](src/protocols/README.md) |
|
| **protocols** | [`src/protocols/`](src/protocols) | FTPS, WebDAV, SFTP compliance. Fixed ports, own guide: [`src/protocols/README.md`](src/protocols/README.md) |
|
||||||
| **reliant** | [`src/reliant/`](src/reliant) | Tests that reuse an **externally started** server (SQL/select, conditional writes, lifecycle, deleted-object reads, node-interact). Run via [`scripts/run_e2e_tests.sh`](../../scripts/run_e2e_tests.sh); see [`src/reliant/README.md`](src/reliant/README.md) |
|
| **reliant** | [`src/reliant/`](src/reliant) | Tests that reuse an **externally started** server (SQL/select, conditional writes, lifecycle, deleted-object reads, node-interact). Run via [`scripts/run_e2e_tests.sh`](../../scripts/run_e2e_tests.sh); see [`src/reliant/README.md`](src/reliant/README.md) |
|
||||||
| **cluster** | `cluster_concurrency_test`, `stale_multipart_cleanup_cluster_test`, `namespace_lock_quorum_test`, `admin_timeout_regression_test`, `object_lambda_test`, `replication_extension_test` | Multi-node scenarios via `RustFSTestClusterEnvironment` |
|
| **cluster** | `cluster_concurrency_test`, `stale_multipart_cleanup_cluster_test`, `namespace_lock_quorum_test`, `admin_timeout_regression_test`, `object_lambda_test`, `replication_extension_test`, `tier_stats_cluster_test` | Multi-node scenarios via `RustFSTestClusterEnvironment` |
|
||||||
|
| **distributed 4×4** | [`src/distributed/`](src/distributed) | Storage-sensitive PR and nightly `e2e-distributed` lane: S3, object lock/WORM, versioning, bucket/site replication, quota, expand/decommission/rebalance, concurrency, chaos, 4-node upgrade of historical data and IAM AK/SK. Map: [`docs/testing/distributed-e2e.md`](../../docs/testing/distributed-e2e.md) |
|
||||||
| **chaos / reliability** | [`src/chaos.rs`](src/chaos.rs), `reliability_disk_fault_test`, `heal_erasure_disk_rebuild_test`, `server_startup_failfast_test` | Disk offline/replace/corrupt, EC rebuild, heal, fail-fast startup |
|
| **chaos / reliability** | [`src/chaos.rs`](src/chaos.rs), `reliability_disk_fault_test`, `heal_erasure_disk_rebuild_test`, `server_startup_failfast_test` | Disk offline/replace/corrupt, EC rebuild, heal, fail-fast startup |
|
||||||
| **upgrade compatibility** | `upgrade_compatibility_test` | Pinned previous-release writes followed by current-build reads on the same data directory |
|
| **upgrade compatibility** | `upgrade_compatibility_test` | Pinned previous-release writes followed by current-build reads on the same data directory |
|
||||||
|
|
||||||
|
The external-tool `storage_metric_ownership_test` validates the OTLP/Collector/Prometheus path, including a rolling upgrade and node failures. See the [storage metrics guide](../../docs/operations/storage-metrics.md) for its required binaries and focused command.
|
||||||
|
|
||||||
## How to run
|
## How to run
|
||||||
|
|
||||||
All commands assume repo root. `cargo test` triggers an on-demand build of the
|
All commands assume repo root. `cargo test` triggers an on-demand build of the
|
||||||
@@ -171,6 +174,7 @@ the same profile for membership and execution with one nightly worker.
|
|||||||
| KMS suite | `e2e-full` job, merge queue + main | **Active** |
|
| KMS suite | `e2e-full` job, merge queue + main | **Active** |
|
||||||
| Direct and mixed-version rolling upgrades from pinned previous release | `e2e-upgrade.yml`, storage-sensitive PRs + release tags + weekly | **Active** |
|
| Direct and mixed-version rolling upgrades from pinned previous release | `e2e-upgrade.yml`, storage-sensitive PRs + release tags + weekly | **Active** |
|
||||||
| Cluster faults (`e2e-nightly` profile) | consolidated nightly workflow | **Active** (backlog#1149 ci-7) |
|
| Cluster faults (`e2e-nightly` profile) | consolidated nightly workflow | **Active** (backlog#1149 ci-7) |
|
||||||
|
| Distributed 4-node 4-disk (`e2e-distributed` profile) | `.github/workflows/e2e-distributed.yml` | **Active** (storage-sensitive PR / nightly / dispatch) |
|
||||||
| Protocols (FTPS/WebDAV/SFTP) | consolidated nightly workflow, serial | **Active** (backlog#1149 ci-7) |
|
| Protocols (FTPS/WebDAV/SFTP) | consolidated nightly workflow, serial | **Active** (backlog#1149 ci-7) |
|
||||||
| Replication (fast subset) | `e2e-smoke` profile, `e2e-tests` job, every PR | **Active** (backlog#1147 repl-1) |
|
| Replication (fast subset) | `e2e-smoke` profile, `e2e-tests` job, every PR | **Active** (backlog#1147 repl-1) |
|
||||||
| Replication (slow + multi-node) | `e2e-repl-nightly` profile, consolidated nightly workflow | **Active** (backlog#1147 repl-1) |
|
| Replication (slow + multi-node) | `e2e-repl-nightly` profile, consolidated nightly workflow | **Active** (backlog#1147 repl-1) |
|
||||||
@@ -182,6 +186,8 @@ the wiring source of truth. Committed test-ID digests under
|
|||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
|
**Endpoint blackhole scenario skipped** — `heal_erasure_disk_rebuild_test::tests::test_cluster_root_heal_recovers_after_target_endpoint_blackhole` installs a loopback `iptables` DROP rule and therefore needs `CAP_NET_ADMIN` (root or passwordless `sudo -n iptables`). A host where `iptables` is missing or cannot read the OUTPUT chain (typical inside an unprivileged container, where the nf_tables backend reports "Permission denied" even under `sudo`) logs a `heal_interruption_skipped` warning and returns without exercising heal. Set `RUSTFS_E2E_REQUIRE_NET_FAULT_INJECTION=1` on lanes that do provision the capability so a broken runner fails instead of skipping.
|
||||||
|
|
||||||
**Reproduce a CI failure locally** — run the exact profile/lane:
|
**Reproduce a CI failure locally** — run the exact profile/lane:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -191,6 +197,9 @@ cargo nextest run --profile e2e-smoke -p e2e_test
|
|||||||
cargo nextest run --profile e2e-full -p e2e_test
|
cargo nextest run --profile e2e-full -p e2e_test
|
||||||
# Cluster fault nightly lane
|
# Cluster fault nightly lane
|
||||||
cargo nextest run --profile e2e-nightly -p e2e_test
|
cargo nextest run --profile e2e-nightly -p e2e_test
|
||||||
|
# 4-node 4-disk distributed lane (S3 / lock / versioning / replication / decommission / chaos / upgrade)
|
||||||
|
# Upgrade cases need RUSTFS_UPGRADE_SOURCE_BINARY; without it they fail closed.
|
||||||
|
cargo nextest run --profile e2e-distributed -p e2e_test
|
||||||
# Replication nightly lane; awscurl is required for STS paths
|
# Replication nightly lane; awscurl is required for STS paths
|
||||||
cargo nextest run --profile e2e-repl-nightly -p e2e_test
|
cargo nextest run --profile e2e-repl-nightly -p e2e_test
|
||||||
# Fixed-port protocol nightly lane
|
# Fixed-port protocol nightly lane
|
||||||
@@ -233,8 +242,8 @@ spawn error. Install the pinned CI version before running their profiles.
|
|||||||
[`src/policy/README.md`](src/policy/README.md),
|
[`src/policy/README.md`](src/policy/README.md),
|
||||||
[`src/protocols/README.md`](src/protocols/README.md),
|
[`src/protocols/README.md`](src/protocols/README.md),
|
||||||
[`src/reliant/README.md`](src/reliant/README.md)
|
[`src/reliant/README.md`](src/reliant/README.md)
|
||||||
- Authoritative per-module counts:
|
- Per-module counts: `cargo nextest list -p e2e_test --profile <profile>`
|
||||||
[`docs/testing/e2e-suite-inventory.md`](../../docs/testing/e2e-suite-inventory.md)
|
(one-liner in [`docs/testing/README.md`](../../docs/testing/README.md))
|
||||||
- Test pyramid & flake policy: [`docs/testing/README.md`](../../docs/testing/README.md)
|
- Test pyramid & flake policy: [`docs/testing/README.md`](../../docs/testing/README.md)
|
||||||
|
|
||||||
## CI smoke subset (`--profile e2e-smoke`)
|
## CI smoke subset (`--profile e2e-smoke`)
|
||||||
@@ -271,12 +280,12 @@ Note on `#[serial]`: nextest runs each test in its own process, so
|
|||||||
parallel-safe by construction (random port + isolated temp dir), which the
|
parallel-safe by construction (random port + isolated temp dir), which the
|
||||||
current subset is.
|
current subset is.
|
||||||
|
|
||||||
### Authoritative test inventory
|
### Test inventory
|
||||||
|
|
||||||
`docs/testing/e2e-suite-inventory.md` records the per-module test counts as
|
Per-module counts are not committed; list them with
|
||||||
listed by `cargo nextest list -p e2e_test`. Regenerate it when adding or
|
`cargo nextest list -p e2e_test --profile <profile>` (the result is
|
||||||
moving e2e tests so acceptance numbers in the test-strategy issues
|
platform-dependent because some modules are linux-only; the `jq` one-liner is
|
||||||
(backlog#1147–#1155) stay auditable. When a profile membership change is
|
in `docs/testing/README.md`). When a profile membership change is
|
||||||
intentional, review its JSON listing before updating the matching
|
intentional, review its JSON listing before updating the matching
|
||||||
`.config/e2e-*-selection.txt` test-ID digest. Update only the platform that
|
`.config/e2e-*-selection.txt` test-ID digest. Update only the platform that
|
||||||
produced the listing:
|
produced the listing:
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
// Copyright 2024 RustFS Team
|
||||||
|
// Licensed under the Apache License, Version 2.0.
|
||||||
|
|
||||||
|
use std::path::Path;
|
||||||
|
use std::process::Command;
|
||||||
|
|
||||||
|
fn git(root: &Path, args: &[&str]) -> Option<String> {
|
||||||
|
let output = Command::new("git").args(args).current_dir(root).output().ok()?;
|
||||||
|
output
|
||||||
|
.status
|
||||||
|
.success()
|
||||||
|
.then(|| String::from_utf8_lossy(&output.stdout).trim().to_owned())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn emit(name: &str, value: &str) {
|
||||||
|
let value = if value.contains(['\n', '\r']) { "unknown" } else { value };
|
||||||
|
println!("cargo:rustc-env=RUSTFS_E2E_BUILD_{name}={value}");
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let manifest = std::env::var_os("CARGO_MANIFEST_DIR").unwrap_or_default();
|
||||||
|
let root = Path::new(&manifest).join("../..");
|
||||||
|
// Cover dependency/common sources as well as this crate. HEAD/ref/index
|
||||||
|
// changes must refresh identity even when no Rust source mtime changes.
|
||||||
|
for path in [
|
||||||
|
"crates",
|
||||||
|
"rustfs",
|
||||||
|
"Cargo.toml",
|
||||||
|
"Cargo.lock",
|
||||||
|
"rust-toolchain.toml",
|
||||||
|
".cargo",
|
||||||
|
".config",
|
||||||
|
] {
|
||||||
|
println!("cargo:rerun-if-changed={}", root.join(path).display());
|
||||||
|
}
|
||||||
|
let mut git_paths = vec!["HEAD".to_owned(), "index".to_owned(), "packed-refs".to_owned()];
|
||||||
|
if let Some(reference) = git(&root, &["symbolic-ref", "-q", "HEAD"]) {
|
||||||
|
git_paths.push(reference);
|
||||||
|
}
|
||||||
|
for path in git_paths {
|
||||||
|
if let Some(path) = git(&root, &["rev-parse", "--git-path", &path]) {
|
||||||
|
let path = Path::new(&path);
|
||||||
|
let path = if path.is_absolute() {
|
||||||
|
path.to_owned()
|
||||||
|
} else {
|
||||||
|
root.join(path)
|
||||||
|
};
|
||||||
|
if path.exists() {
|
||||||
|
println!("cargo:rerun-if-changed={}", path.display());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let revision = git(&root, &["rev-parse", "HEAD"]).unwrap_or_else(|| "unknown".to_owned());
|
||||||
|
let dirty = git(&root, &["status", "--porcelain", "--untracked-files=no"]).is_none_or(|status| !status.is_empty());
|
||||||
|
let lock = git(&root, &["hash-object", "Cargo.lock"]).unwrap_or_else(|| "unknown".to_owned());
|
||||||
|
let mut features = std::env::vars()
|
||||||
|
.filter_map(|(key, _)| {
|
||||||
|
key.strip_prefix("CARGO_FEATURE_")
|
||||||
|
.map(|name| name.to_ascii_lowercase().replace('_', "-"))
|
||||||
|
})
|
||||||
|
.collect::<Vec<_>>();
|
||||||
|
features.sort();
|
||||||
|
emit("COMMIT", &revision);
|
||||||
|
emit("DIRTY", if dirty { "true" } else { "false" });
|
||||||
|
emit("LOCK", &lock);
|
||||||
|
emit("FEATURES", &features.join(","));
|
||||||
|
for name in ["TARGET", "PROFILE"] {
|
||||||
|
emit(name, &std::env::var(name).unwrap_or_else(|_| "unknown".to_owned()));
|
||||||
|
}
|
||||||
|
println!("cargo:rerun-if-env-changed=CARGO_ENCODED_RUSTFLAGS");
|
||||||
|
let flags = std::env::var("CARGO_ENCODED_RUSTFLAGS").unwrap_or_default();
|
||||||
|
let flags: String = flags.as_bytes().iter().map(|byte| format!("{byte:02x}")).collect();
|
||||||
|
emit("RUSTFLAGS_HEX", &flags);
|
||||||
|
}
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use crate::common::{RustFSTestClusterEnvironment, init_logging, local_http_client};
|
use crate::common::{RustFSTestClusterEnvironment, init_logging, local_http_client, signal_process};
|
||||||
use aws_sdk_s3::primitives::ByteStream;
|
use aws_sdk_s3::primitives::ByteStream;
|
||||||
use http::header::HOST;
|
use http::header::HOST;
|
||||||
use reqwest::StatusCode;
|
use reqwest::StatusCode;
|
||||||
@@ -22,7 +22,6 @@ use rustfs_signer::sign_v4;
|
|||||||
use s3s::Body;
|
use s3s::Body;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::process::Command;
|
|
||||||
use tokio::time::{Duration, sleep, timeout};
|
use tokio::time::{Duration, sleep, timeout};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
@@ -82,15 +81,6 @@ async fn parse_json_response<T: serde::de::DeserializeOwned>(
|
|||||||
Ok(serde_json::from_slice(&body)?)
|
Ok(serde_json::from_slice(&body)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn signal_process(pid: u32, signal: &str) -> Result<(), Box<dyn Error + Send + Sync>> {
|
|
||||||
let output = Command::new("kill").arg(format!("-{signal}")).arg(pid.to_string()).output()?;
|
|
||||||
if output.status.success() {
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
|
|
||||||
Err(format!("kill -{signal} {pid} failed: {}", String::from_utf8_lossy(&output.stderr)).into())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn offline_server_count(info: &InfoMessage) -> usize {
|
fn offline_server_count(info: &InfoMessage) -> usize {
|
||||||
info.servers
|
info.servers
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user