Skip to content

Issue 7239 - Check Kubernetes pods/jobs are deleted after a bulk import#7272

Merged
patchwork01 merged 20 commits into
developfrom
7239-check-k8s-pods-deleted
Jun 1, 2026
Merged

Issue 7239 - Check Kubernetes pods/jobs are deleted after a bulk import#7272
patchwork01 merged 20 commits into
developfrom
7239-check-k8s-pods-deleted

Conversation

@patchwork01
Copy link
Copy Markdown
Collaborator

@patchwork01 patchwork01 commented May 28, 2026

Make sure you have checked all steps below.

Issue

Tests

  • My PR adds the following tests based on our test strategy OR does not need testing for this extremely good reason:
    • Added AwsEksBulkImportDriverK8sIT
    • Updated EksBulkImportST, EksBulkImportPerformanceST
    • Ran both in AWS

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it, or I have linked to a
    separate issue for that below.
  • If I have added new Java code, I have added Javadoc that explains it following our conventions and style.
  • If I have added or removed any dependencies from the project, I have updated the NOTICES file.

@patchwork01 patchwork01 marked this pull request as ready for review May 28, 2026 15:05
@patchwork01 patchwork01 added the needs-reviewer Pull requests that need a reviewer to be assigned label May 28, 2026
String executionArn = stateMachineArn.replace(":stateMachine:", ":execution:") + ":" + executionName;
DescribeExecutionResponse response = sfnClient.describeExecution(req -> req.executionArn(executionArn));
LOGGER.info("Found execution for job {}: {}", jobId, response);
LOGGER.info("Error: {}", response.error());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should errors be logged at info level? Will an error always be present?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a system test driver, I think it's important to track the progress of a test. I've added a null check for the error.

PodList list = k8sProvider.getClient(properties).pods()
.inNamespace(properties.get(BULK_IMPORT_EKS_NAMESPACE))
.list();
LOGGER.info("Found pods in Spark namespace: {}", list);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like debugging information

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a system test driver, I think it's important to track the progress of a test.

JobList list = k8sProvider.getClient(properties).batch().v1().jobs()
.inNamespace(properties.get(BULK_IMPORT_EKS_NAMESPACE))
.list();
LOGGER.info("Found jobs in Spark namespace: {}", list);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like debugging information

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a system test driver, I think it's important to track the progress of a test.

public static String generateToken(String clusterName, Region region, AwsCredentialsProvider credentialsProvider) {
SdkHttpRequest request = SdkHttpRequest.builder()
.method(SdkHttpMethod.GET)
.uri(URI.create("https://sts." + region.id() + ".amazonaws.com/"))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hardcoded DNS suffix will cause issues in a different AWS partition. Please can this be configured as in other places in codebase!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

@m09526 m09526 removed the needs-reviewer Pull requests that need a reviewer to be assigned label May 28, 2026
@rtjd6554 rtjd6554 force-pushed the 7239-check-k8s-pods-deleted branch from 678cd43 to ac15338 Compare May 29, 2026 09:41
@m09526 m09526 self-requested a review May 29, 2026 11:14
@patchwork01 patchwork01 merged commit a3e805e into develop Jun 1, 2026
9 checks passed
@patchwork01 patchwork01 deleted the 7239-check-k8s-pods-deleted branch June 1, 2026 15:51
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.

Check Kubernetes job and pod are deleted in EKS bulk import system test

3 participants