Skip to content

Commit

Permalink
feat(service): backport API versioning changes from 1.0.0 release
Browse files Browse the repository at this point in the history
Conflicts:
  • Loading branch information
Panaetius committed Nov 17, 2021
1 parent 9ae42e7 commit 6d26e75
Show file tree
Hide file tree
Showing 18 changed files with 895 additions and 250 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
renku-notebooks: ${{ steps.deploy-comment.outputs.renku-notebooks}}
renku-ui: ${{ steps.deploy-comment.outputs.renku-ui}}
test-enabled: ${{ steps.deploy-comment.outputs.test-enabled}}
extra-values: ${{ steps.deploy-comment.outputs.extra-values}}
steps:
- id: deploy-comment
uses: SwissDataScienceCenter/renku-actions/check-pr-description@v0.1.0
Expand Down Expand Up @@ -63,6 +64,7 @@ jobs:
renku_graph: "${{ needs.check-deploy.outputs.renku-graph }}"
renku_notebooks: "${{ needs.check-deploy.outputs.renku-notebooks }}"
renku_ui: "${{ needs.check-deploy.outputs.renku-ui }}"
extra_values: "${{ needs.check-deploy.outputs.extra-values }}"
- name: Check existing renkubot comment
uses: peter-evans/find-comment@v1
id: findcomment
Expand Down
2 changes: 1 addition & 1 deletion renku/service/controllers/cache_migrations_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ def renku_op(self):

def to_response(self):
"""Execute controller flow and serialize to service response."""
return result_response(MigrationsCheckCtrl.RESPONSE_SERIALIZER, self.execute_op())
return result_response(self.RESPONSE_SERIALIZER, self.execute_op())
9 changes: 7 additions & 2 deletions renku/service/controllers/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ class VersionCtrl(ServiceCtrl):

RESPONSE_SERIALIZER = VersionResponseRPC()

def to_response(self):
def to_response(self, minimum_version, maximum_version):
"""Serialize to service version response."""
return result_response(
VersionCtrl.RESPONSE_SERIALIZER,
{"latest_version": __version__, "supported_project_version": SUPPORTED_PROJECT_VERSION},
{
"latest_version": __version__,
"supported_project_version": SUPPORTED_PROJECT_VERSION,
"minimum_api_version": minimum_version.name,
"maximum_api_version": maximum_version.name,
},
)

0 comments on commit 6d26e75

Please sign in to comment.