Uploaded image for project: 'Apache Submarine'
  1. Apache Submarine
  2. SUBMARINE-394

Change submit job response status in JobManagerRestApi

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 0.4.0
    • None

    Description

      If job submit successfully we should return ok(200) instead of ACCEPTED(202) 

      if job submit fail, success should be false

      if (!jobSpec.validate()) {
       return new JsonResponse.Builder<String>(Response.Status.ACCEPTED)
       .success(true).result("Invalid params.").build();
      }
      
      try {
       Job job = JobManager.getInstance().submitJob(jobSpec);
       return new JsonResponse.Builder<Job>(Response.Status.ACCEPTED)
       .success(true).result(job).build();
      } catch (UnsupportedJobTypeException e) {
       return new JsonResponse.Builder<String>(Response.Status.ACCEPTED)
       .success(true).result(e.getMessage()).build();
      }
      

      Attachments

        Issue Links

          Activity

            People

              pingsutw Kevin Su
              pingsutw Kevin Su
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m