-
Notifications
You must be signed in to change notification settings - Fork 83
NC | lifecycle | continue last run #8925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4fd3474
to
f735ef9
Compare
1d8f8da
to
d04893f
Compare
for (const [bucket_name, prev_bucket_status] of Object.entries(previous_run.buckets_statuses)) { | ||
if (!buckets.includes(bucket_name)) continue; | ||
const bucket_json = await config_fs.get_bucket_by_name(bucket_name, config_fs_options); | ||
if (!bucket_json.lifecycle_configuration_rules) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why bucket json and lifecycle_configuration_rules check is needed? AFAIU you can just copy and nullify/undefindify ( :) ) the stats and times of each bucket/rule
I believe we care about the general structure of buckets and rules and state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buckets and rules can change between runs. since we save this in the log file. we will have empty object for rule/ bucket with irrelevant state. there may still be concurrency issue. but I think we should at least check it between runs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes we can nullify the state if it doesn't exist. I can change it work like that
//ignore error | ||
} | ||
await exec_manage_cli(TYPES.LIFECYCLE, '', {continue: 'true', disable_service_validation: 'true', disable_runtime_validation: 'true', config_root}, undefined, undefined); | ||
const object_list2 = await object_sdk.list_objects({bucket: test_bucket}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is the assert that the run didn't do anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not the test that the run didn't do anything. its a test that it did finish the job. might be a redundant test. but I though it might find general bugs with continue flow. I can test that the lifecycle finished successfully. the test that test that it didn't is the previous one
d04893f
to
d59c586
Compare
Signed-off-by: nadav mizrahi <[email protected]>
d59c586
to
73edf4c
Compare
Describe the Problem
lifecycle run might fail or timeout before all the objects were processed. add a flag to continue the ran from where it last stopped
Explain the Changes
Issues: Fixed #xxx / Gap #xxx
Testing Instructions:
automatic tests:
sudo npx jest test_nc_lifecycle_cli
manual test: