feature/4-add_executor #13

Merged
dkirillov merged 1 commit from dkirillov/frostfs-s3-lifecycler:feature/4-add_executor into master 2024-09-04 19:51:24 +00:00
Member

close #4

close #4
dkirillov self-assigned this 2024-07-24 14:53:49 +00:00
dkirillov added 3 commits 2024-07-24 14:53:54 +00:00
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
[#4] Support object expiration
Some checks failed
/ DCO (pull_request) Successful in 1m0s
/ Vulncheck (pull_request) Successful in 1m16s
/ Builds (1.21) (pull_request) Successful in 1m20s
/ Builds (1.22) (pull_request) Successful in 3m8s
/ Lint (pull_request) Successful in 2m37s
/ Tests (1.21) (pull_request) Failing after 1m22s
/ Tests (1.22) (pull_request) Successful in 3m6s
75cdd50ba3
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
dkirillov added 2 commits 2024-07-25 12:26:53 +00:00
Don't init listing on every rule in configuration. Use just one

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
[#4] Add more tests
Some checks failed
/ DCO (pull_request) Successful in 46s
/ Vulncheck (pull_request) Successful in 1m16s
/ Builds (1.21) (pull_request) Successful in 1m36s
/ Builds (1.22) (pull_request) Successful in 1m34s
/ Lint (pull_request) Successful in 1m50s
/ Tests (1.21) (pull_request) Failing after 1m30s
/ Tests (1.22) (pull_request) Failing after 1m23s
7539f43a9a
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
dkirillov force-pushed feature/4-add_executor from 7539f43a9a to 4bdde21ccf 2024-07-25 12:52:49 +00:00 Compare
dkirillov requested review from storage-services-developers 2024-07-25 12:52:58 +00:00
dkirillov requested review from storage-services-committers 2024-07-25 12:53:01 +00:00
dkirillov changed title from WIP: feature/4-add_executor to feature/4-add_executor 2024-07-25 12:53:13 +00:00
alexvanin reviewed 2024-07-26 10:38:50 +00:00
alexvanin left a comment
Owner

Looks great overall! I would like to add some more tests for match-functions but we can do it later.

Looks great overall! I would like to add some more tests for match-functions but we can do it later.
@ -120,0 +116,4 @@
// // it provides compatibility with previous tree service api where
// // single uint64(0) value is dropped from signature
// poolPrm.RootID = nil
//}
Owner

Do you want to keep it in the code or just forgot to remove?

Do you want to keep it in the code or just forgot to remove?
alexvanin marked this conversation as resolved
@ -0,0 +106,4 @@
})
if err != nil {
wg.Done()
Owner

I don't mind having two wg.Done() but it seems like we can do it once in the end of case statement.

I don't mind having two `wg.Done()` but it seems like we can do it once in the end of case statement.
Author
Member

Actually we cannot. We have to invoke wg.Done() after task is done. End of Submit doesn't guaranties that task was ended.

Actually we cannot. We have to invoke `wg.Done()` after task is done. End of `Submit` doesn't guaranties that task was ended.
Owner

Yep, missed that it is non-blocking operation.

Yep, missed that it is non-blocking operation.
alexvanin marked this conversation as resolved
@ -0,0 +140,4 @@
if ni.CurrentEpoch() != job.Epoch {
ni.SetCurrentEpoch(job.Epoch)
}
Owner

Is it worth a warning?

Is it worth a warning?
alexvanin marked this conversation as resolved
@ -0,0 +203,4 @@
if len(matchers) == 0 {
return nil, errNotApplicableRule
}
Owner

Is it an error, actually?
This function returns error, then it is returned by abortMultiparts() and then logged as a WARN in worker().
Maybe we should ignore this error in the worker() but I don't see any usage of this error in this case.

Is it an error, actually? This function returns error, then it is returned by `abortMultiparts()` and then logged as a _WARN_ in `worker()`. Maybe we should ignore this error in the `worker()` but I don't see any usage of this error in this case.
Author
Member

Sometimes it can be useful to see that we don't do anything despite rules are not empty. But I can add ignoring this error in worker

Sometimes it can be useful to see that we don't do anything despite rules are not empty. But I can add ignoring this error in `worker`
alexvanin marked this conversation as resolved
dkirillov force-pushed feature/4-add_executor from 4bdde21ccf to 15c9d55b03 2024-07-26 11:52:43 +00:00 Compare
dkirillov added 1 commit 2024-07-26 11:57:44 +00:00
[#4] Don't check tags for multiparts
All checks were successful
/ DCO (pull_request) Successful in 1m7s
/ Vulncheck (pull_request) Successful in 1m16s
/ Builds (1.21) (pull_request) Successful in 1m24s
/ Builds (1.22) (pull_request) Successful in 1m20s
/ Lint (pull_request) Successful in 2m11s
/ Tests (1.21) (pull_request) Successful in 1m21s
/ Tests (1.22) (pull_request) Successful in 1m18s
127816c66a
Spec https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lc-expire-mpu
says: "When you use the AbortIncompleteMultipartUpload S3
 Lifecycle action, the rule cannot specify a tag-based filter."

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
mbiryukova reviewed 2024-07-26 12:37:27 +00:00
@ -0,0 +198,4 @@
if err != nil && !errors.Is(err, errNotApplicableRule) {
return nil, err
}
Member

Seems that in case of errNotApplicableRule we can't use matchFn because it's nil

Seems that in case of `errNotApplicableRule` we can't use `matchFn` because it's nil
alexvanin approved these changes 2024-07-26 12:54:44 +00:00
dkirillov force-pushed feature/4-add_executor from 127816c66a to b3374bb565 2024-07-26 13:47:18 +00:00 Compare
alexvanin approved these changes 2024-07-26 14:07:35 +00:00
dkirillov merged commit b3374bb565 into master 2024-07-26 14:17:24 +00:00
dkirillov deleted branch feature/4-add_executor 2024-07-26 14:17:27 +00:00
Sign in to join this conversation.
No description provided.