You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/11/10 14:55:37 UTC
[GitHub] [pulsar] jdbeck opened a new pull request #8508: [Issue 8507][pulsar-functions] Overridden 'jobName' in Kubernetes runtime with custom runtime options can have collisions when same 'jobName' is used
jdbeck opened a new pull request #8508:
URL: https://github.com/apache/pulsar/pull/8508
Fixes #8507
### Motivation
As part of the closed issue: #8012 a customRuntimeOption of "jobName" was added in order to allow an override of the pod name for the function in the Kubernetes runtime. While it covers most issues one was discovered where a jobName could be re-used for a different function and it would cause collisions with the pod and potentially statefulset. In order to alleviate this make sure that a short hash is added to the pod name to avoid collisions like is done when job names are converted when illegal characters are added.
### Modifications
- Make sure when 'jobName' used for custom runtime options that there are no collisions with pod name. To do this make sure tenant, namespace, and function name are used with 'jobName' to create unique reproducible job name (KubernetesRuntime.java)
- Updated unit tests (KubernetesRuntimeTest.java) to make sure pod name will be unique when given various scenarios
### Verifying this change
This change added tests and can be verified as follows:
Updated KubernetesRuntimeTest.java
- Added test to check various scenarios when 'jobName' used in custom runtime options
1. custom job name contains unique hash for pod name
2. when custom job name already exists but function tenant & namespace are different make sure no collisions with different hash
3. when when custom job name already exists but function name is different make sure no collisions with different hash
- Added test to check correct exception thrown if custom 'jobName' option exceeds max character limit
### Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (n )
- The default values of configurations: (no)
- The wire protocol: (no)
- The rest endpoints: (no)
- The admin cli options: (no)
- Anything that affects deployment: (no)
### Documentation
- Does this pull request introduce a new feature? (no)
- If a feature is not applicable for documentation, explain why?
should be covered under previous documentation for other issue: https://github.com/apache/pulsar/issues/8012
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] jdbeck commented on pull request #8508: [Issue 8507][pulsar-functions] Overridden 'jobName' in Kubernetes runtime with custom runtime options can have collisions when same 'jobName' is used
Posted by GitBox <gi...@apache.org>.
jdbeck commented on pull request #8508:
URL: https://github.com/apache/pulsar/pull/8508#issuecomment-724835710
/pulsarbot run-failure-checks
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] sijie merged pull request #8508: [Issue 8507][pulsar-functions] Overridden 'jobName' in Kubernetes runtime with custom runtime options can have collisions when same 'jobName' is used
Posted by GitBox <gi...@apache.org>.
sijie merged pull request #8508:
URL: https://github.com/apache/pulsar/pull/8508
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] jdbeck commented on pull request #8508: [Issue 8507][pulsar-functions] Overridden 'jobName' in Kubernetes runtime with custom runtime options can have collisions when same 'jobName' is used
Posted by GitBox <gi...@apache.org>.
jdbeck commented on pull request #8508:
URL: https://github.com/apache/pulsar/pull/8508#issuecomment-724861792
/pulsarbot run-failure-checks
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] Anonymitaet commented on pull request #8508: [Issue 8507][pulsar-functions] Overridden 'jobName' in Kubernetes runtime with custom runtime options can have collisions when same 'jobName' is used
Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #8508:
URL: https://github.com/apache/pulsar/pull/8508#issuecomment-955985430
Confirmed with @freeznet, it is kind of an internal bug fix, so no doc needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org