Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Aug 15, 2024

What changes were proposed in this pull request?

This PR aims to install and test Apache Spark Operator Helm chart in K8s integration test CI.

Why are the changes needed?

To have a test coverage for install and test Helm commands.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass the CIs and check the log.

NAME: spark-kubernetes-operator
LAST DEPLOYED: Fri Aug 16 03:12:01 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
NAME: spark-kubernetes-operator
LAST DEPLOYED: Fri Aug 16 03:12:01 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE:     spark-kubernetes-operator-test-operator-rbac
Last Started:   Fri Aug 16 03:12:09 2024
Last Completed: Fri Aug 16 03:12:12 2024
Phase:          Succeeded
TEST SUITE:     spark-kubernetes-operator-test-app-rbac
Last Started:   Fri Aug 16 03:12:02 2024
Last Completed: Fri Aug 16 03:12:09 2024
Phase:          Succeeded

Was this patch authored or co-authored using generative AI tooling?

No.

@dongjoon-hyun
Copy link
Member Author

printer-columns.sh seems to have a bug to find the location here. I'm investigating now.

script_path=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

@dongjoon-hyun dongjoon-hyun marked this pull request as ready for review August 16, 2024 03:12
@dongjoon-hyun
Copy link
Member Author

This PR is ready for review. Could you review this PR, @viirya ?

@dongjoon-hyun
Copy link
Member Author

Thank you, @viirya . Merged to main.

@dongjoon-hyun dongjoon-hyun deleted the test-helm branch August 16, 2024 16:10
jiangzho added a commit to jiangzho/spark-kubernetes-operator that referenced this pull request Jul 17, 2025
Sync latest from upstream main
dongjoon-hyun added a commit that referenced this pull request Oct 7, 2025
…tead of `ToStringBuilder`

### What changes were proposed in this pull request?

This PR aims to improve `SentinelResourceState.toString` by JEP-280 instead of `ToStringBuilder`.

### Why are the changes needed?

This is aligned with Apache Spark main repository improvement.
- apache/spark#51572

Since Java 9, `String Concatenation` has been handled better by default.

| ID | DESCRIPTION |
| - | - |
| JEP-280 | [Indify String Concatenation](https://openjdk.org/jeps/280) |

For example, `SentinelResourceState.toString` is changed like the following by this PR.

**BEFORE**

```
  public java.lang.String toString();
    Code:
         0: new           #43                 // class org/apache/commons/lang3/builder/ToStringBuilder
         3: dup
         4: aload_0
         5: invokespecial #45                 // Method org/apache/commons/lang3/builder/ToStringBuilder."<init>":(Ljava/lang/Object;)V
         8: ldc           #48                 // String resource
        10: aload_0
        11: getfield      #17                 // Field resource:Lorg/apache/spark/k8s/operator/BaseResource;
        14: invokevirtual #49                 // Method org/apache/commons/lang3/builder/ToStringBuilder.append:(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/commons/lang3/builder/ToStringBuilder;
        17: ldc           #53                 // String previousGeneration
        19: aload_0
        20: getfield      #39                 // Field previousGeneration:J
        23: invokevirtual #54                 // Method org/apache/commons/lang3/builder/ToStringBuilder.append:(Ljava/lang/String;J)Lorg/apache/commons/lang3/builder/ToStringBuilder;
        26: ldc           #57                 // String isHealthy
        28: aload_0
        29: getfield      #13                 // Field isHealthy:Z
        32: invokevirtual #58                 // Method org/apache/commons/lang3/builder/ToStringBuilder.append:(Ljava/lang/String;Z)Lorg/apache/commons/lang3/builder/ToStringBuilder;
        35: invokevirtual #61                 // Method org/apache/commons/lang3/builder/ToStringBuilder.toString:()Ljava/lang/String;
        38: areturn
```

**AFTER**

```
  public java.lang.String toString();
    Code:
         0: aload_0
         1: getfield      #17                 // Field resource:Lorg/apache/spark/k8s/operator/BaseResource;
         4: invokestatic  #43                 // Method java/lang/String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
         7: aload_0
         8: getfield      #39                 // Field previousGeneration:J
        11: aload_0
        12: getfield      #13                 // Field isHealthy:Z
        15: invokedynamic #49,  0             // InvokeDynamic #0:makeConcatWithConstants:(Ljava/lang/String;JZ)Ljava/lang/String;
        20: areturn
```

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #369 from dongjoon-hyun/SPARK-53818.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
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.

2 participants