Skip to content

Commit 6889c71

Browse files
committed
Merge branch 'feature/CH-226' of github.com:MetaCell/cloud-harness into feature/CH-216-dev-containers
2 parents f253c3b + 5378b58 commit 6889c71

93 files changed

Lines changed: 8604 additions & 2217 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
connexion[swagger-ui]==2.14.2
2-
Flask == 2.2.5
3-
swagger-ui-bundle==0.0.9
4-
python_dateutil >= 2.6.0
1+
connexion[swagger-ui,flask,gunicorn]>=3.0.0,<4.0.0
2+
swagger-ui-bundle>=1.1.0
3+
python_dateutil >= 2.9.0
54
setuptools >= 21.0.0
6-
5+
gunicorn
76

applications/accounts/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/keycloak/keycloak:26.3.5
1+
FROM quay.io/keycloak/keycloak:26.4
22

33
EXPOSE 9000
44
EXPOSE 8080
@@ -12,7 +12,7 @@ USER keycloak
1212
COPY themes/custom /opt/keycloak/themes/custom
1313

1414
# # keycloak kafka listener plugin
15-
COPY plugins/metacell-admin-event-listener-module-1.0.0.jar /opt/keycloak/providers/
15+
COPY plugins/* /opt/keycloak/providers/
1616

1717
ENTRYPOINT [ "/opt/keycloak/bin/kc-entrypoint.sh" ]
1818
CMD [ "start", "--import-realm" ]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
harness:
2+
service:
3+
port: 80

applications/common/api/openapi.yaml

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,6 @@ servers:
1010
url: /api
1111
description: SwaggerHub API Auto Mocking
1212
paths:
13-
'/sentry/getdsn/{appname}':
14-
get:
15-
tags:
16-
- Sentry
17-
responses:
18-
'200':
19-
content:
20-
application/json:
21-
schema:
22-
type: object
23-
description: Sentry DSN for the given application
24-
'400':
25-
content:
26-
application/json:
27-
schema:
28-
type: object
29-
text/html:
30-
schema:
31-
type: string
32-
description: Sentry not configured for the given application
33-
'404':
34-
content:
35-
application/problem+json:
36-
schema:
37-
type: object
38-
text/html:
39-
schema:
40-
type: string
41-
description: Sentry not configured for the given application
42-
operationId: getdsn
43-
summary: Gets the Sentry DSN for a given application
44-
description: Gets the Sentry DSN for a given application
45-
x-openapi-router-controller: common.controllers.sentry_controller
46-
parameters:
47-
-
48-
name: appname
49-
schema:
50-
type: string
51-
in: path
52-
required: true
5313
/accounts/config:
5414
get:
5515
tags:

applications/common/server/.openapi-generator-ignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ Dockerfile
2727
*/__main__.py
2828
*/test/*
2929
test-requirements.txt
30-
.dockerignore
30+
.dockerignore
31+
*/requirements.txt

applications/common/server/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ COPY . /usr/src/app
1717
ENV FLASK_ENV=production
1818
ENV APP_SETTINGS=common.config.ProductionConfig
1919
RUN pip3 install -e /usr/src/app
20-
ENTRYPOINT gunicorn --workers=$WORKERS --bind=0.0.0.0:$PORT $MODULE_NAME.__main__:app

applications/common/server/common/__main__.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,9 @@
22

33
from cloudharness.utils.server import init_flask, main
44
from cloudharness import log
5-
from flask_cors import CORS
6-
from common.repository.db import open_db
7-
from common.controllers.sentry_controller import global_dsn
85

96

10-
def init_fn(app):
11-
log.info("initializing database from app")
12-
cors = CORS(app, resources={r"/api/*": {"origins": "*"}})
13-
if not global_dsn:
14-
open_db(app)
15-
16-
17-
app = init_flask(init_app_fn=init_fn)
7+
app = init_flask()
188

199
if __name__ == '__main__':
2010
main()

applications/common/server/common/controllers/sentry_controller.py

Lines changed: 0 additions & 53 deletions
This file was deleted.

applications/common/server/common/encoder.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from connexion.apps.flask_app import FlaskJSONEncoder
2-
import six
32

4-
from common.models.base_model_ import Model
3+
from common.models.base_model import Model
54

65

76
class JSONEncoder(FlaskJSONEncoder):
@@ -10,7 +9,7 @@ class JSONEncoder(FlaskJSONEncoder):
109
def default(self, o):
1110
if isinstance(o, Model):
1211
dikt = {}
13-
for attr, _ in six.iteritems(o.openapi_types):
12+
for attr in o.openapi_types:
1413
value = getattr(o, attr)
1514
if value is None and not self.include_nulls:
1615
continue
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# coding: utf-8
2-
31
# flake8: noqa
4-
from __future__ import absolute_import
52
# import models into model package
63
from common.models.app_version import AppVersion
74
from common.models.get_config200_response import GetConfig200Response

0 commit comments

Comments
 (0)