1ec1762d3a
protogen: Always marshal empty fields
...
DCO action / DCO (pull_request) Failing after 56s
Tests and linters / Tests with -race (pull_request) Successful in 1m10s
Tests and linters / Lint (pull_request) Successful in 1m15s
Tests and linters / Tests (pull_request) Successful in 1m29s
This is how it was done previously:
a0a9b765f3/rpc/message/encoding.go (L31)
The tricky part is `[]byte` which is marshaled as `null` by easyjson
helper, but as `""` by protojson.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-07 15:04:13 +03:00
b06dad731c
[ #120 ] protogen: Marshal 64-bit integers as strings
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-01 14:18:46 +03:00
d94b9c6d0d
[ #120 ] protogen: Unmarshal stringified integers from JSON
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-01 14:18:45 +03:00
eeb754c327
[ #120 ] protogen: Omit empty fields from JSON output
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-01 14:11:43 +03:00
805da79319
[ #120 ] protogen: Marshal enum as string
...
Be compatible with protojson.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-01 14:11:43 +03:00
f812b1ae5b
[ #120 ] Regenerate proto files
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-01 14:11:43 +03:00
bd588fa2e5
[ #113 ] go.mod: Use range over int
...
DCO action / DCO (pull_request) Successful in 41s
Tests and linters / Lint (pull_request) Successful in 1m11s
Tests and linters / Tests (1.22) (pull_request) Successful in 1m11s
Tests and linters / Tests (1.23) (pull_request) Successful in 1m10s
Tests and linters / Tests with -race (pull_request) Successful in 1m23s
Since Go 1.22 a `for` statement with a `range` clause is able
to iterate through integer values from zero to an upper limit.
gopatch script:
@@
var i, e expression
@@
-for i := 0; i <= e - 1; i++ {
+for i := range e {
...
}
@@
var i, e expression
@@
-for i := 0; i <= e; i++ {
+for i := range e + 1 {
...
}
@@
var i, e expression
@@
-for i := 0; i < e; i++ {
+for i := range e {
...
}
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-09-04 15:44:59 +03:00
9c5e32a183
[ #106 ] test: Generate correct data for tests
...
DCO action / DCO (pull_request) Successful in 42s
Tests and linters / Tests (1.22) (pull_request) Successful in 1m2s
Tests and linters / Tests (1.23) (pull_request) Successful in 1m1s
Tests and linters / Lint (pull_request) Successful in 1m6s
Tests and linters / Tests with -race (pull_request) Successful in 1m14s
Some tests are using invalid data that do not meet the requirements of the
FrostFS protocol, e.g.
- Container/Object IDs aren't 32 bytes long
- Signature key and sign have invalid length
- Split IDs aren't valid UUIDv4
and etc.
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-08-30 13:37:29 +03:00
5e1c6a908f
[ #111 ] protogen: Emit slice of messages without a pointer
...
DCO action / DCO (pull_request) Successful in 41s
Tests and linters / Tests (1.22) (pull_request) Successful in 55s
Tests and linters / Tests (1.23) (pull_request) Successful in 57s
Tests and linters / Tests with -race (pull_request) Successful in 1m8s
Tests and linters / Lint (pull_request) Successful in 2m12s
```
goos: linux
goarch: amd64
pkg: git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs
cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
│ old │ new │
│ sec/op │ sec/op vs base │
ObjectIDSlice/0_elements/to_grpc_message-8 3.193n ± 2% 3.242n ± 0% +1.50% (p=0.034 n=10)
ObjectIDSlice/0_elements/from_grpc_message-8 3.197n ± 2% 3.343n ± 1% +4.57% (p=0.000 n=10)
ObjectIDSlice/0_elements/marshal-8 5.666n ± 3% 5.642n ± 0% -0.42% (p=0.000 n=10)
ObjectIDSlice/1_elements/to_grpc_message-8 53.10n ± 6% 29.78n ± 12% -43.92% (p=0.000 n=10)
ObjectIDSlice/1_elements/from_grpc_message-8 28.99n ± 5% 29.77n ± 7% ~ (p=0.165 n=10)
ObjectIDSlice/1_elements/marshal-8 49.08n ± 7% 50.72n ± 6% ~ (p=0.218 n=10)
ObjectIDSlice/50_elements/to_grpc_message-8 1652.5n ± 7% 277.2n ± 1% -83.22% (p=0.000 n=10)
ObjectIDSlice/50_elements/from_grpc_message-8 261.2n ± 11% 226.7n ± 15% -13.19% (p=0.003 n=10)
ObjectIDSlice/50_elements/marshal-8 1.512µ ± 6% 1.514µ ± 6% ~ (p=0.955 n=10)
geomean 52.15n 39.99n -23.31%
│ old │ new │
│ B/op │ B/op vs base │
ObjectIDSlice/0_elements/to_grpc_message-8 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/0_elements/from_grpc_message-8 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/0_elements/marshal-8 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/1_elements/to_grpc_message-8 32.00 ± 0% 24.00 ± 0% -25.00% (p=0.000 n=10)
ObjectIDSlice/1_elements/from_grpc_message-8 24.00 ± 0% 24.00 ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/1_elements/marshal-8 48.00 ± 0% 48.00 ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/50_elements/to_grpc_message-8 1.578Ki ± 0% 1.250Ki ± 0% -20.79% (p=0.000 n=10)
ObjectIDSlice/50_elements/from_grpc_message-8 1.250Ki ± 0% 1.250Ki ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/50_elements/marshal-8 2.000Ki ± 0% 2.000Ki ± 0% ~ (p=1.000 n=10) ¹
geomean ² -5.62% ²
¹ all samples are equal
² summaries must be >0 to compute geomean
│ old │ new │
│ allocs/op │ allocs/op vs base │
ObjectIDSlice/0_elements/to_grpc_message-8 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/0_elements/from_grpc_message-8 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/0_elements/marshal-8 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/1_elements/to_grpc_message-8 2.000 ± 0% 1.000 ± 0% -50.00% (p=0.000 n=10)
ObjectIDSlice/1_elements/from_grpc_message-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/1_elements/marshal-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/50_elements/to_grpc_message-8 51.000 ± 0% 1.000 ± 0% -98.04% (p=0.000 n=10)
ObjectIDSlice/50_elements/from_grpc_message-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹
ObjectIDSlice/50_elements/marshal-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹
geomean ² -40.18% ²
¹ all samples are equal
² summaries must be >0 to compute geomean
```
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-08-28 11:53:08 +03:00
eba18f6e67
[ #110 ] object: Add getter and setter for PatchResponseBody
...
DCO action / DCO (pull_request) Successful in 1m19s
Tests and linters / Tests (1.22) (pull_request) Successful in 1m21s
Tests and linters / Tests (1.23) (pull_request) Successful in 1m28s
Tests and linters / Tests with -race (pull_request) Successful in 1m48s
Tests and linters / Lint (pull_request) Successful in 2m34s
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-08-27 13:46:00 +03:00
5fece80b42
[ #108 ] protogen: Distinguish between empty and nil messages
...
DCO action / DCO (pull_request) Successful in 39s
Tests and linters / Tests (1.22) (pull_request) Successful in 59s
Tests and linters / Tests (1.23) (pull_request) Successful in 57s
Tests and linters / Tests with -race (pull_request) Successful in 1m9s
Tests and linters / Lint (pull_request) Successful in 2m12s
Refs #59
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-08-27 11:02:18 +03:00
9e82a5a31a
[ #107 ] Regenerate proto files
...
Tests and linters / Tests (1.23) (pull_request) Successful in 1m1s
Tests and linters / Tests with -race (pull_request) Successful in 1m32s
Tests and linters / Tests (1.22) (pull_request) Successful in 45s
Tests and linters / Lint (pull_request) Successful in 1m56s
DCO action / DCO (pull_request) Successful in 28s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-08-26 14:36:19 +03:00
adb7c602d7
[ #77 ] protogen: Initial implementation
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-08-19 10:47:00 +03:00
d112a28d38
[ #104 ] object: Add getters for PatchRequestBodyPatch
...
DCO action / DCO (pull_request) Successful in 1m8s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m12s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m17s
Tests and linters / Lint (pull_request) Successful in 1m28s
Tests and linters / Tests with -race (pull_request) Successful in 1m35s
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-08-13 18:51:51 +03:00
8609f29a60
[ #97 ] object: Refactor Patch related structs
...
* Add getters and setters for related types;
* Fix unit-tests.
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-07-30 17:52:49 +03:00
8580b49c8d
[ #94 ] rpc: Introduce ObjectService.Patch
method
...
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-07-29 08:55:14 +00:00
9b90d139c5
[ #94 ] object: Generate protobufs for Patch
method
...
* Generate protobufs for patch method;
* Create marshalers, unmarshalers, converters for gererated types;
* Add unit-tests.
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-07-29 08:55:14 +00:00
3dfa2f4fd6
[ #95 ] *: Regenerate proto files
...
DCO action / DCO (pull_request) Successful in 1m0s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m22s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m25s
Tests and linters / Lint (pull_request) Successful in 1m32s
Tests and linters / Tests with -race (pull_request) Successful in 2m20s
Remove SetExtendedEACL and AnnounceUsedSpace methods from the container
package.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-07-26 10:24:25 +03:00
2f6d3209e1
[ #84 ] object: Regenerate EC-header type
...
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-05-30 15:28:26 +00:00
0803bc6ded
[ #83 ] object: Regenerate protobufs for ECHeader
...
Tests and linters / Tests (1.19) (pull_request) Successful in 11m59s
Tests and linters / Tests (1.20) (pull_request) Successful in 12m5s
DCO action / DCO (pull_request) Successful in 12m27s
Tests and linters / Tests with -race (pull_request) Successful in 12m25s
Tests and linters / Lint (pull_request) Successful in 12m52s
* Fix marshalers and converters;
* Fix unit-tests.
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-05-16 16:31:03 +03:00
4fe42ac4ad
[ #82 ] object: Add FilterHeaderECParent
filter for v2
...
DCO action / DCO (pull_request) Successful in 1m0s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m20s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m30s
Tests and linters / Lint (pull_request) Successful in 1m53s
Tests and linters / Tests with -race (pull_request) Successful in 1m49s
* `FilterHeaderECParent` is used by `Object.Search`
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-05-13 17:03:55 +03:00
063ce11c24
[ #82 ] object: Erase field Signature
from ECHeader
v2 type
...
DCO action / DCO (pull_request) Successful in 1m17s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m45s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m58s
Tests and linters / Lint (pull_request) Successful in 2m6s
Tests and linters / Tests with -race (pull_request) Successful in 2m9s
* The field `Signature` is not used and should be factored out.
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-05-08 15:09:16 +03:00
bc7b49eed2
[ #82 ] object: Introduce new fields for EC header
...
* Regenerate protobufs as frostfs-api introduced `parent_split_id` and
`parent_split_index` fields.
* Fix marshaller and converter for EC header.
* Extend v2 type `ECHeader` with `ParentSplitID` and `ParentSplitIndex` fields.
* Fix message_test for `Object`. Also generate EC headers and check it.
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-05-08 15:09:12 +03:00
0fe6b9adbb
[ #76 ] Make setter names more consistent
...
DCO action / DCO (pull_request) Successful in 1m2s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m33s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m38s
Tests and linters / Lint (pull_request) Successful in 1m46s
Tests and linters / Tests with -race (pull_request) Successful in 1m44s
This will make the transition to a new codegen more seamless.
1. Setter should be named as the field itself.
2. Setter should accept 1 parameter.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-05-03 08:52:04 +03:00
67c6f305b2
[ #79 ] object: Implement Range\RangeHash
requests for EC object
...
DCO action / DCO (pull_request) Successful in 1m16s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m37s
Tests and linters / Lint (pull_request) Successful in 1m56s
Tests and linters / Tests (1.19) (pull_request) Successful in 2m9s
Tests and linters / Tests with -race (pull_request) Successful in 2m2s
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-04-27 23:04:46 +03:00
df9b65324a
[ #73 ] object: Implement Get\Head
requests for EC object
...
DCO action / DCO (pull_request) Successful in 45s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m13s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m27s
Tests and linters / Lint (pull_request) Successful in 1m35s
Tests and linters / Tests with -race (pull_request) Successful in 1m58s
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-04-22 18:14:50 +03:00
6e9d385f3c
[ #71 ] container: Introduce CONTAINER_ACCESS_DENIED status
...
DCO action / DCO (pull_request) Successful in 1m19s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m56s
Tests and linters / Tests (1.19) (pull_request) Successful in 2m2s
Tests and linters / Lint (pull_request) Successful in 2m12s
Tests and linters / Tests with -race (pull_request) Successful in 2m28s
* Regenerate protobufs for object and container service to
use a new frostfs-api status CONTAINER_ACCESS_DENIED.
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-03-26 18:55:05 +03:00
1772b92182
[ #69 ] object: Initial EC implementation
...
DCO action / DCO (pull_request) Successful in 1m7s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m37s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m33s
Tests and linters / Lint (pull_request) Successful in 1m46s
Tests and linters / Tests with -race (pull_request) Successful in 1m45s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-19 15:23:01 +03:00
a85146250b
[ #68 ] Makefile: Use gofumpt for formatting
...
DCO action / DCO (pull_request) Successful in 1m17s
Tests and linters / Tests (1.20) (pull_request) Successful in 2m22s
Tests and linters / Lint (pull_request) Successful in 2m51s
Tests and linters / Tests (1.19) (pull_request) Successful in 2m48s
Tests and linters / Tests with -race (pull_request) Successful in 2m40s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-14 10:31:58 +03:00
634e24aba7
[ #65 ] object: Fix SetMarshalData for PutSingle request
...
DCO action / DCO (pull_request) Successful in 1m11s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m25s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m33s
Tests and linters / Tests with -race (pull_request) Successful in 1m56s
Tests and linters / Lint (pull_request) Successful in 1m14s
Allow to reset marshal data
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-02-15 15:44:01 +03:00
2a124b95bc
[ #64 ] object: Allow to reset marshal data
...
DCO action / DCO (pull_request) Successful in 58s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m24s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m32s
Tests and linters / Lint (pull_request) Successful in 1m43s
Tests and linters / Tests with -race (pull_request) Successful in 2m5s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-02-15 14:47:28 +03:00
f50872f1bc
[ #58 ] object: Allow to set marshal data
...
Now it is possible set marshaled data to reduce memory
allocations.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-10-31 13:47:48 +03:00
17bed735a1
[ #20 ] Update api version
...
DCO action / DCO (pull_request) Successful in 1m14s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m39s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m42s
Tests and linters / Lint (pull_request) Successful in 1m57s
Tests and linters / Tests with -race (pull_request) Successful in 2m5s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-08-17 11:10:12 +03:00
d989c8d2a3
[ #54 ] *: Fix linter warnings
...
DCO action / DCO (pull_request) Successful in 2m25s
Tests and linters / Tests (1.20) (pull_request) Successful in 3m19s
Tests and linters / Tests with -race (pull_request) Successful in 4m42s
Tests and linters / Tests (1.19) (pull_request) Successful in 5m29s
Tests and linters / Lint (pull_request) Successful in 5m53s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-08-11 15:21:27 +03:00
d5b55d0926
[ #45 ] api-go: Add PutSingle response wrappers
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-07-04 12:27:42 +03:00
2cb57a8835
[ #45 ] api-go: Add PutSingle request wrappers
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-07-04 12:27:42 +03:00
b17995a238
[ #45 ] api-go: Add Object.PutSingle implementation
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-07-04 12:27:42 +03:00
1cab39337e
[ #27 ] object: Resolve funlen linter warnings
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-05-03 14:15:56 +03:00
63915bb7a5
[ #27 ] *: Resolve godot linter warnings
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-05-03 14:15:56 +03:00
Pavel Karpy
d9347a05f0
[ #21 ] *: Drop reputation system
...
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2023-04-17 15:46:52 +03:00
5f318f0b75
Revert "Revert "[ #16 ] container, object: Regenerate service comments""
...
This reverts commit b02ec516e72fbc9030d6dc71f956e23ac93c54da.
2023-04-11 11:07:13 +03:00
3b938873cc
Revert "Revert "[ #16 ] object: Allow set copy_number
for every placement vector""
...
This reverts commit 4a34188c9ef4b7404e1abaac5f72d1c302d322e7.
2023-04-11 11:07:13 +03:00
dbcd514748
Revert "[ #16 ] object: Allow set copy_number
for every placement vector"
...
This reverts commit e022a2b831
.
2023-04-11 11:06:08 +03:00
d9c5b9c90e
Revert "[ #16 ] container, object: Regenerate service comments"
...
This reverts commit e6522d62a8
.
2023-04-11 11:06:08 +03:00
Pavel Karpy
e6522d62a8
[ #16 ] container, object: Regenerate service comments
...
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2023-04-07 15:32:05 +03:00
Pavel Karpy
e022a2b831
[ #16 ] object: Allow set copy_number
for every placement vector
...
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2023-04-07 15:30:11 +03:00
9dc3753467
[ #13 ] *: Rename __FROSTFS__ prefix to __SYSTEM__
...
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-15 12:52:36 +03:00
8009022a20
[ #13 ] *: Regenerate api
...
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-15 12:52:28 +03:00
cd2e46a17c
[ #10 ] Add __FROSTFS__ system attributes
...
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-13 09:59:22 +03:00
c46cd37f71
[ #10 ] Generate api
...
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-13 09:59:22 +03:00