kevin85421 opened a new pull request #622:
URL: https://github.com/apache/submarine/pull/622


   ### What is this PR for?
   We cannot run two experiments with the same name. Take experimentIT.java as 
an example, the frontend E2E testcase will create an experiment named 
"experiment-e2e-test". If we run this testcase twice, the workbench just shows 
an "experiment-e2e-test" rather than two.
   
   The root cause is that the K8sSubmitter will create two PODs for an 
"experiment-e2e-test". The names of these two PODs are 
"experiment-e2e-test-ps-0" and "experiment-e2e-test-worker-0". Hence, when we 
try to create the second "experiment-e2e-test", K8sSubmitter will throw an 
exception due to duplicate POD names.
   
   To reproduce the bug:
   ```bash
   # Step1: Run workbench on port 8080
   # Step2: 
   cd submarine-cloud-v2
   
   # Step3: Create "experiment-e2e-test" twice
   ./hack/run_frontend_e2e.sh experimentIT
   ./hack/run_frontend_e2e.sh experimentIT
   
   # Step4: Check Workbench: only an "experiment-e2e-test" exists => BUG!
   ```
   
   * My solution: I append `${experimentCounter}` 
([ExperimentManager.java#L58](https://github.com/apache/submarine/blob/f53e3564a270e57690edf0e58a8137a78d9eca3e/submarine-server/server-core/src/main/java/org/apache/submarine/server/experiment/ExperimentManager.java#L58))
 to the experiment name. With the solution, the first "experiment-e2e-test" 
will create two PODs:
   
   ```
   experiment-e2e-test-0001-ps-0
   experiment-e2e-test-0001-worker-0
   ```
   
   
   ### What type of PR is it?
   [Bug Fix]
   
   ### Todos
   * Check "_" (Reference: 
[Link](https://blog.csdn.net/airangrong6572/article/details/101273245))
   
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/SUBMARINE-880
   
   ### How should this be tested?
   ```bash
   # Step1: Run workbench on port 8080
   # Step2: 
   cd submarine-cloud-v2
   
   # Step3: Create "experiment-e2e-test" twice
   ./hack/run_frontend_e2e.sh experimentIT
   ./hack/run_frontend_e2e.sh experimentIT
   
   # Step4: Check Workbench: two"experiment-e2e-test" exists (Correct)
   ```
   
   
   ### Screenshots (if appropriate)
   <img width="1440" alt="ζˆͺεœ– 2021-06-29 δΈ‹εˆ8 24 49" 
src="https://user-images.githubusercontent.com/20109646/123800896-5434f300-d91c-11eb-8991-d4740c4287ce.png";>
   
   
   ### Questions:
   * Do the license files need updating? No
   * Are there breaking changes for older versions? No
   * Does this need new documentation? No
   


-- 
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]


Reply via email to