chia7712 opened a new pull request #288:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/288
…onId is defined
### What is this PR for?
The code used to get applicationId is shown below.
```go
// application ID can be defined in labels
for name, value := range pod.Labels {
// application ID can be defined as a label
if name == constants.LabelApplicationID
{ return value, nil }
// if a pod for spark already provided appID, reuse it
if name == constants.SparkLabelAppID { return value, nil }
}
```
The iteration order is random so it could get application id from
'spark-app-selector' rather than `applicationId` (even though `applicationId`
is defined by users)
### What type of PR is it?
* [x] - Bug Fix
* [ ] - Improvement
* [ ] - Feature
* [ ] - Documentation
* [ ] - Hot Fix
* [ ] - Refactoring
### Todos
* [ ] - Task
### What is the Jira issue?
https://issues.apache.org/jira/browse/YUNIKORN-766
### How should this be tested?
`TestGetApplicationIDFromPod`
### Screenshots (if appropriate)
### Questions:
* [ ] - The licenses files need update.
* [ ] - There is breaking changes for older versions.
* [ ] - It needs documentation.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]