This is an automated email from the ASF dual-hosted git repository.

pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new a2cf0dc  SUBMARINE-1001. Experiment Patch Didn't Work.
a2cf0dc is described below

commit a2cf0dc848cf1f15fd07b77a93c6e9d0353bd453
Author: noidname01 <tim983...@gmail.com>
AuthorDate: Tue Sep 14 11:39:37 2021 +0800

    SUBMARINE-1001. Experiment Patch Didn't Work.
    
    ### What is this PR for?
    
    The reason why patch of experiment occurs error is when parsing the 
experimentSpec to MLJob, it will set the name of meta to experimentId of meta 
in experimentSpec.
    However experimentId of meta in experimentSpec received from workbench is 
null, making patchNamespacedCustomObject error.
    
    ### What type of PR is it?
    [Bug Fix]
    
    ### Todos
    
    None
    
    ### What is the Jira issue?
    
    https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-1001
    
    ### How should this be tested?
    
    Just create a new experiment and update it.
    
    ### Screenshots (if appropriate)
    
    None
    
    ### Questions:
    * Do the license files need updating? No
    * Are there breaking changes for older versions? No
    * Does this need new documentation? No
    
    Author: noidname01 <tim983...@gmail.com>
    
    Signed-off-by: Kevin <pings...@apache.org>
    
    Closes #741 from noidname01/SUBMARINE-1001 and squashes the following 
commits:
    
    ffb169a0 [noidname01] move inside experiment manager
    c33adeaf [noidname01] add experiment id for patch spec
---
 .../java/org/apache/submarine/server/experiment/ExperimentManager.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/submarine-server/server-core/src/main/java/org/apache/submarine/server/experiment/ExperimentManager.java
 
b/submarine-server/server-core/src/main/java/org/apache/submarine/server/experiment/ExperimentManager.java
index e809158..edddbb3 100644
--- 
a/submarine-server/server-core/src/main/java/org/apache/submarine/server/experiment/ExperimentManager.java
+++ 
b/submarine-server/server-core/src/main/java/org/apache/submarine/server/experiment/ExperimentManager.java
@@ -233,6 +233,8 @@ public class ExperimentManager {
     checkExperimentId(id);
     checkSpec(newSpec);
 
+    newSpec.getMeta().setExperimentId(id);
+
     ExperimentEntity entity = experimentService.select(id);
     Experiment experiment = buildExperimentFromEntity(entity);
     Experiment patchExperiment = submitter.patchExperiment(newSpec);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org

Reply via email to