Skip to content

Remove startupProbe in kubernetes-overlord-extensions#17784

Merged
gianm merged 6 commits intoapache:masterfrom
applike-ss:k8s-jobs-remove-startup-probe
Apr 1, 2025
Merged

Remove startupProbe in kubernetes-overlord-extensions#17784
gianm merged 6 commits intoapache:masterfrom
applike-ss:k8s-jobs-remove-startup-probe

Conversation

@applike-ss
Copy link
Copy Markdown
Contributor

Partially Fixes #17783.

Description

The readiness and liveness probes are removed, however the startup probe remains - which makes peon tasks never get healthy and kills them after not coming up long enough.

Fixed the bug ...

Renamed the class ...

Added a forbidden-apis entry ...

Release note

Removed Startup probe in kubernetes-overlord-extentions, so that peon tasks can start up properly without being killed by kubernetes.


Key changed/added classes in this PR
  • remove startup probe on peon tasks, if it exists

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

Signed-off-by: Sebastian Struß <struss@justtrack.io>
Copy link
Copy Markdown
Contributor

@georgew5656 georgew5656 left a comment

Choose a reason for hiding this comment

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

lgtm, if you have time could you add a unit test checking this behavior?

Signed-off-by: Sebastian Struß <struss@justtrack.io>
@applike-ss
Copy link
Copy Markdown
Contributor Author

I have added a unit test, but i can't execute it on my end because IntelliJ IDEA can't resolve org.apache.druid.math.expr.antlr.ExprBaseListener and org.apache.druid.math.expr.antlr.ExprParser.

Maybe you can try it?

@georgew5656
Copy link
Copy Markdown
Contributor

I have added a unit test, but i can't execute it on my end because IntelliJ IDEA can't resolve org.apache.druid.math.expr.antlr.ExprBaseListener and org.apache.druid.math.expr.antlr.ExprParser.

Maybe you can try it?

you should be able to run the tests and style check locally from the kubernetes-overlord-extension directory

@applike-ss
Copy link
Copy Markdown
Contributor Author

I have added a unit test, but i can't execute it on my end because IntelliJ IDEA can't resolve org.apache.druid.math.expr.antlr.ExprBaseListener and org.apache.druid.math.expr.antlr.ExprParser.
Maybe you can try it?

you should be able to run the tests and style check locally from the kubernetes-overlord-extension directory

I am aware that i should be able to run it and IntelliJ IDEA also has a run button, so that i can run specific tests.

However I assume that my local setup is not quite correct, so that it doesn't work.

I haven't developed Java in a century and even before that not on a professional level.

Feel free to fix what's not working or tell me where I can look for potential fixes for my local env.
Here's the errors I'm getting:

druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:29:40
java: package org.apache.druid.math.expr.antlr does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:30:40
java: package org.apache.druid.math.expr.antlr does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:47:39
java: cannot find symbol
  symbol: class ExprBaseListener
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:72:41
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:88:47
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:105:40
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:115:40
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:145:38
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:154:46
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:184:40
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:190:36
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:196:43
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:266:46
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:306:39
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:320:42
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:342:44
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:349:37
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:360:36
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:375:42
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:386:34
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:392:41
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:410:43
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:448:39
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:464:47
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:482:41
java: package ExprParser does not exist
druid/processing/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java:498:49
java: package ExprParser does not exist

@applike-ss
Copy link
Copy Markdown
Contributor Author

As you can see even the CI is failing due to some issues with twitter right now, so I guess this one will be delayed until they are stable again.

@gianm
Copy link
Copy Markdown
Contributor

gianm commented Apr 1, 2025

@applike-ss thank you for your contribution! I've updated the PR branch to:

  • merge master, which includes a fix for the twitter repo (Remove maven.twttr repo from pom #17797)
  • restore the prior styling in the file extensions-core/kubernetes-overlord-extensions/src/test/java/org/apache/druid/k8s/overlord/taskadapter/K8sTaskAdapterTest.java, since the new styling in this branch was tripping style checks
  • add a resources section to the expected output for the new test testProbesRemoved. It is added by the K8sTaskAdapter.

As to the ExprListenerImpl errors you got when trying to run locally, FWIW, I think that is something that can happen in IntelliJ because it doesn't know how to generate certain sources. Running a commandline build mvn package -DskipTests once should clear that up. That command will also run the static checks, style checks, etc. Anyway, I don't think you need to do that right now, because hopefully the stuff I just pushed to the PR branch will fix the issues reported by CI. I'm just writing this as FYI.

@gianm gianm merged commit 4f607fb into apache:master Apr 1, 2025
41 checks passed
@applike-ss
Copy link
Copy Markdown
Contributor Author

@applike-ss thank you for your contribution! I've updated the PR branch to:

  • merge master, which includes a fix for the twitter repo (Remove maven.twttr repo from pom #17797)
  • restore the prior styling in the file extensions-core/kubernetes-overlord-extensions/src/test/java/org/apache/druid/k8s/overlord/taskadapter/K8sTaskAdapterTest.java, since the new styling in this branch was tripping style checks
  • add a resources section to the expected output for the new test testProbesRemoved. It is added by the K8sTaskAdapter.

As to the ExprListenerImpl errors you got when trying to run locally, FWIW, I think that is something that can happen in IntelliJ because it doesn't know how to generate certain sources. Running a commandline build mvn package -DskipTests once should clear that up. That command will also run the static checks, style checks, etc. Anyway, I don't think you need to do that right now, because hopefully the stuff I just pushed to the PR branch will fix the issues reported by CI. I'm just writing this as FYI.

Thanks for all of this 👍

Akshat-Jain added a commit to Akshat-Jain/druid that referenced this pull request Apr 11, 2025
@kgyrtkirk kgyrtkirk added this to the 33.0.0 milestone Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MM-less with overlordSingleContainer type adds wrong startup probe for peon task

4 participants