Skip to content

Commit

Permalink
Release 0.14 (#167)
Browse files Browse the repository at this point in the history
* Update swagger and clients

* Bump ui and sdk version to 0.14

* Fix build pyspark docker: AttributeError: 'FileNotFoundError' object has no attribute 'read'

Due to update in pip 21.2.2, the behavior on using requreiment file has changed. Read more: https://stackoverflow.com/a/68586065
  • Loading branch information
ariefrahmansyah authored Aug 11, 2021
1 parent 8740175 commit 74ee44e
Show file tree
Hide file tree
Showing 104 changed files with 887 additions and 585 deletions.
14 changes: 4 additions & 10 deletions api/client/api_alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* API Guide for accessing Merlin's model management, deployment, and serving functionalities
*
* API version: 0.7.0
* API version: 0.14.0
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/

Expand Down Expand Up @@ -98,9 +98,7 @@ func (a *AlertApiService) AlertsTeamsGet(ctx context.Context) ([]string, *http.R
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -199,9 +197,7 @@ func (a *AlertApiService) ModelsModelIdAlertsGet(ctx context.Context, modelId in
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -302,9 +298,7 @@ func (a *AlertApiService) ModelsModelIdEndpointsModelEndpointIdAlertGet(ctx cont
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down
22 changes: 6 additions & 16 deletions api/client/api_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* API Guide for accessing Merlin's model management, deployment, and serving functionalities
*
* API version: 0.7.0
* API version: 0.14.0
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/

Expand Down Expand Up @@ -104,9 +104,7 @@ func (a *EndpointApiService) ModelsModelIdVersionsVersionIdEndpointEndpointIdCon
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -294,9 +292,7 @@ func (a *EndpointApiService) ModelsModelIdVersionsVersionIdEndpointEndpointIdGet
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -415,9 +411,7 @@ func (a *EndpointApiService) ModelsModelIdVersionsVersionIdEndpointEndpointIdPut
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -518,9 +512,7 @@ func (a *EndpointApiService) ModelsModelIdVersionsVersionIdEndpointGet(ctx conte
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -637,9 +629,7 @@ func (a *EndpointApiService) ModelsModelIdVersionsVersionIdEndpointPost(ctx cont
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down
6 changes: 2 additions & 4 deletions api/client/api_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* API Guide for accessing Merlin's model management, deployment, and serving functionalities
*
* API version: 0.7.0
* API version: 0.14.0
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/

Expand Down Expand Up @@ -108,9 +108,7 @@ func (a *EnvironmentApiService) EnvironmentsGet(ctx context.Context, localVarOpt
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down
82 changes: 55 additions & 27 deletions api/client/api_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* API Guide for accessing Merlin's model management, deployment, and serving functionalities
*
* API version: 0.7.0
* API version: 0.14.0
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/

Expand All @@ -29,35 +29,46 @@ type LogApiService service
/*
LogApiService Retrieve log from a container
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param name
* @param podName
* @param namespace
* @param cluster
* @param namespace
* @param componentType
* @param optional nil or *LogApiLogsGetOpts - Optional Parameters:
* @param "ProjectName" (optional.String) -
* @param "ModelId" (optional.String) -
* @param "ModelName" (optional.String) -
* @param "VersionId" (optional.String) -
* @param "PredictionJobId" (optional.String) -
* @param "ContainerName" (optional.String) -
* @param "Prefix" (optional.String) -
* @param "Follow" (optional.String) -
* @param "LimitBytes" (optional.String) -
* @param "Pretty" (optional.String) -
* @param "Previous" (optional.String) -
* @param "SinceSeconds" (optional.String) -
* @param "SinceTime" (optional.String) -
* @param "TailLines" (optional.String) -
* @param "Timestamps" (optional.String) -
* @param "TailLines" (optional.String) -
* @param "LimitBytes" (optional.String) -
*/

type LogApiLogsGetOpts struct {
Follow optional.String
LimitBytes optional.String
Pretty optional.String
Previous optional.String
SinceSeconds optional.String
SinceTime optional.String
TailLines optional.String
Timestamps optional.String
ProjectName optional.String
ModelId optional.String
ModelName optional.String
VersionId optional.String
PredictionJobId optional.String
ContainerName optional.String
Prefix optional.String
Follow optional.String
Previous optional.String
SinceSeconds optional.String
SinceTime optional.String
Timestamps optional.String
TailLines optional.String
LimitBytes optional.String
}

func (a *LogApiService) LogsGet(ctx context.Context, name string, podName string, namespace string, cluster string, localVarOptionals *LogApiLogsGetOpts) (*http.Response, error) {
func (a *LogApiService) LogsGet(ctx context.Context, cluster string, namespace string, componentType string, localVarOptionals *LogApiLogsGetOpts) (*http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
Expand All @@ -72,18 +83,32 @@ func (a *LogApiService) LogsGet(ctx context.Context, name string, podName string
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}

localVarQueryParams.Add("name", parameterToString(name, ""))
localVarQueryParams.Add("pod_name", parameterToString(podName, ""))
localVarQueryParams.Add("namespace", parameterToString(namespace, ""))
if localVarOptionals != nil && localVarOptionals.ProjectName.IsSet() {
localVarQueryParams.Add("project_name", parameterToString(localVarOptionals.ProjectName.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.ModelId.IsSet() {
localVarQueryParams.Add("model_id", parameterToString(localVarOptionals.ModelId.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.ModelName.IsSet() {
localVarQueryParams.Add("model_name", parameterToString(localVarOptionals.ModelName.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.VersionId.IsSet() {
localVarQueryParams.Add("version_id", parameterToString(localVarOptionals.VersionId.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.PredictionJobId.IsSet() {
localVarQueryParams.Add("prediction_job_id", parameterToString(localVarOptionals.PredictionJobId.Value(), ""))
}
localVarQueryParams.Add("cluster", parameterToString(cluster, ""))
if localVarOptionals != nil && localVarOptionals.Follow.IsSet() {
localVarQueryParams.Add("follow", parameterToString(localVarOptionals.Follow.Value(), ""))
localVarQueryParams.Add("namespace", parameterToString(namespace, ""))
localVarQueryParams.Add("component_type", parameterToString(componentType, ""))
if localVarOptionals != nil && localVarOptionals.ContainerName.IsSet() {
localVarQueryParams.Add("container_name", parameterToString(localVarOptionals.ContainerName.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.LimitBytes.IsSet() {
localVarQueryParams.Add("limit_bytes", parameterToString(localVarOptionals.LimitBytes.Value(), ""))
if localVarOptionals != nil && localVarOptionals.Prefix.IsSet() {
localVarQueryParams.Add("prefix", parameterToString(localVarOptionals.Prefix.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.Pretty.IsSet() {
localVarQueryParams.Add("pretty", parameterToString(localVarOptionals.Pretty.Value(), ""))
if localVarOptionals != nil && localVarOptionals.Follow.IsSet() {
localVarQueryParams.Add("follow", parameterToString(localVarOptionals.Follow.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.Previous.IsSet() {
localVarQueryParams.Add("previous", parameterToString(localVarOptionals.Previous.Value(), ""))
Expand All @@ -94,11 +119,14 @@ func (a *LogApiService) LogsGet(ctx context.Context, name string, podName string
if localVarOptionals != nil && localVarOptionals.SinceTime.IsSet() {
localVarQueryParams.Add("since_time", parameterToString(localVarOptionals.SinceTime.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.Timestamps.IsSet() {
localVarQueryParams.Add("timestamps", parameterToString(localVarOptionals.Timestamps.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.TailLines.IsSet() {
localVarQueryParams.Add("tail_lines", parameterToString(localVarOptionals.TailLines.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.Timestamps.IsSet() {
localVarQueryParams.Add("timestamps", parameterToString(localVarOptionals.Timestamps.Value(), ""))
if localVarOptionals != nil && localVarOptionals.LimitBytes.IsSet() {
localVarQueryParams.Add("limit_bytes", parameterToString(localVarOptionals.LimitBytes.Value(), ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
Expand Down
22 changes: 6 additions & 16 deletions api/client/api_model_endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* API Guide for accessing Merlin's model management, deployment, and serving functionalities
*
* API version: 0.7.0
* API version: 0.14.0
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/

Expand Down Expand Up @@ -100,9 +100,7 @@ func (a *ModelEndpointsApiService) ModelsModelIdEndpointsGet(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -286,9 +284,7 @@ func (a *ModelEndpointsApiService) ModelsModelIdEndpointsModelEndpointIdGet(ctx
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -405,9 +401,7 @@ func (a *ModelEndpointsApiService) ModelsModelIdEndpointsModelEndpointIdPut(ctx
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -509,9 +503,7 @@ func (a *ModelEndpointsApiService) ModelsModelIdEndpointsPost(ctx context.Contex
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -620,9 +612,7 @@ func (a *ModelEndpointsApiService) ProjectsProjectIdModelEndpointsGet(ctx contex
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down
26 changes: 7 additions & 19 deletions api/client/api_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* API Guide for accessing Merlin's model management, deployment, and serving functionalities
*
* API version: 0.7.0
* API version: 0.14.0
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/

Expand Down Expand Up @@ -98,9 +98,7 @@ func (a *ModelsApiService) AlertsTeamsGet(ctx context.Context) ([]string, *http.
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -199,9 +197,7 @@ func (a *ModelsApiService) ModelsModelIdAlertsGet(ctx context.Context, modelId i
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -302,9 +298,7 @@ func (a *ModelsApiService) ModelsModelIdEndpointsModelEndpointIdAlertGet(ctx con
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -611,9 +605,7 @@ func (a *ModelsApiService) ProjectsProjectIdModelsGet(ctx context.Context, proje
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -714,9 +706,7 @@ func (a *ModelsApiService) ProjectsProjectIdModelsModelIdGet(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down Expand Up @@ -831,9 +821,7 @@ func (a *ModelsApiService) ProjectsProjectIdModelsPost(ctx context.Context, proj
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode >= 300 {
Expand Down
Loading

0 comments on commit 74ee44e

Please sign in to comment.