Skip to content

Commit

Permalink
Control-service: fix python api release (#1946)
Browse files Browse the repository at this point in the history
# Why
We are failing to build the python api client in the main branch. 
There are two issues.
The first is that we are trying to install python using apk. 
This is not needed and is causing errors. 


Also we are running out of memory generating the api client.
Upgrading to the latest version of the dependency has fixed this. 
I was also able to delete .mustache files that we needed in our repo as
a workaround to issues from using an older version of openapi-generator.


# How has this been tested.
Tested manually by making a commit where the client is built for any
change.
Also integration tests

---------

Signed-off-by: Dako Dakov <[email protected]>
Signed-off-by: murphp15 <[email protected]>
Co-authored-by: ddakov <[email protected]>
  • Loading branch information
murphp15 and dakodakov committed Apr 24, 2023
1 parent 3e53f85 commit da146f4
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 505 deletions.
2 changes: 1 addition & 1 deletion projects/control-service/cicd/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ control_service_publish_api_client:
image: docker:23.0.1
stage: publish_artifacts
script:
- apk add --no-cache py-pip openjdk17-jdk git python
- apk add --no-cache py-pip openjdk17-jdk git
- pip install -U pip setuptools wheel twine
- ./projects/control-service/projects/gradlew -p ./projects/control-service/projects/model buildPython
- cd projects/control-service/projects/model/apidefs/datajob-api/build
Expand Down
3 changes: 1 addition & 2 deletions projects/control-service/projects/model/apidefs/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
// when we upgrade to a newer version of openapi.generator we should delete the folder openapi-code-generator/template
id 'org.openapi.generator' version '6.2.1'
id 'org.openapi.generator' version '6.5.0'
}

subprojects {
Expand All @@ -20,7 +20,6 @@ subprojects {
validateSpec = true
outputDir = "$rootDir"
configFile = "$rootDir/openapi-code-generator/config-spring.json"
templateDir = "$rootDir/openapi-code-generator/template"
}

// At the moment there doesn't seem to be a way to get open api generator to create the openApi config object but not generate main and all the controllers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"packageName": "taurus_datajob_api",
"projectName": "vdk-control-service-api",
"verbose": true,
"packageVersion": "1.0.7"
"packageVersion": "1.0.8"
}

This file was deleted.

Loading

0 comments on commit da146f4

Please sign in to comment.