Skip to content

DS-2521 : updated delete job to trigger batch and tag objects for cleanup - #1894

Open
yogeshdhariyal wants to merge 13 commits into
masterfrom
DS-2521
Open

DS-2521 : updated delete job to trigger batch and tag objects for cleanup#1894
yogeshdhariyal wants to merge 13 commits into
masterfrom
DS-2521

Conversation

@yogeshdhariyal

Copy link
Copy Markdown
Contributor

No description provided.

…ration to clean up

Signed-off-by: Yogesh Dhariyal <yogesh.dhariyal@here.com>
Signed-off-by: Yogesh Dhariyal <yogesh.dhariyal@here.com>
@yogeshdhariyal
yogeshdhariyal marked this pull request as ready for review July 23, 2026 12:00
@yogeshdhariyal
yogeshdhariyal requested a review from a team as a code owner July 23, 2026 12:00
Signed-off-by: Yogesh Dhariyal <yogesh.dhariyal@here.com>
Signed-off-by: Yogesh Dhariyal <yogesh.dhariyal@here.com>
Signed-off-by: Yogesh Dhariyal <yogesh.dhariyal@here.com>

private Future<Void> scheduleResourcesForDeletion() {
return ASYNC.run(() -> {
boolean plainJob = !hasRegisterDataReferencesStep() && !isReleaseJob();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This differentiation is not necessary anymore. It was just a temporary check, that was necessary when references were still pointing to the job Api bucket

*/
public static List<String> collectInputPrefixesForDeletion(String jobId) {
List<String> prefixes = Collections.synchronizedList(new ArrayList<>());
if (loadAllInputSetNames(jobId).isEmpty()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to delete input set by input set. Just delete the whole inputs folder of that job if it's not re-used by some other job (checked in the metadata)

prefixes = new ArrayList<>(Input.collectInputPrefixesForDeletion(getId()));
//Outputs are never shared across jobs; delete each step's outputs (unless registered references / a release job).
if (plainJob)
getSteps().stepStream().forEach(step -> prefixes.add(step.getOutputS3Prefix()));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to delete output set by output set. Just delete the whole outputs top-level folder all at once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants