diff --git a/.docker/dist.tar.gz b/.docker/dist.tar.gz index 4644ceb7d7c20ae9aaadbe25f50c0cb3bde12a43..41421af414e1f200cced2348ab00977bde12c8b1 100644 Binary files a/.docker/dist.tar.gz and b/.docker/dist.tar.gz differ diff --git a/.docs/.swagger/api.yaml b/.docs/.swagger/api.yaml index c2b5b17fd4586065a803ed4cfe2a83cce2250abf..b24f1e6f93ec27934d2861971306c1126e839686 100644 --- a/.docs/.swagger/api.yaml +++ b/.docs/.swagger/api.yaml @@ -66,7 +66,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DataTypesDto' + $ref: '#/components/schemas/AnalysisDto' description: Determined data types successfully '400': content: @@ -335,7 +335,6 @@ paths: user needs to have at least *READ* access to the associated database. Requests with HTTP method **GET** return the full dataset, requests with HTTP method **HEAD** only the number of tuples in the `X-Count` header. - Requires role `view-table-data`. operationId: getData_2 parameters: - name: databaseId @@ -596,7 +595,6 @@ paths: user needs to have at least *READ* access to the associated database. Requests with HTTP method **GET** return the full dataset, requests with HTTP method **HEAD** only the number of tuples in the `X-Count` header. - Requires role `view-table-data`. operationId: getData_3 parameters: - name: databaseId @@ -1140,7 +1138,7 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' '404': - description: Failed to find table in metadata database + description: Failed to find table or database in metadata database content: application/json: schema: @@ -1491,7 +1489,7 @@ paths: id. Requests with HTTP method **GET** return the access object, requests with HTTP method **HEAD** only the status. When the user has at least *READ* access, the status 200 is returned, 403 otherwise. Requires role - `check-database-access` or `admin`. + `check-database-access` or `check-foreign-database-access`. operationId: find parameters: - name: databaseId @@ -1728,7 +1726,7 @@ paths: id. Requests with HTTP method **GET** return the access object, requests with HTTP method **HEAD** only the status. When the user has at least *READ* access, the status 200 is returned, 403 otherwise. Requires role - `check-database-access` or `admin`. + `check-database-access` or `check-foreign-database-access`. operationId: find_1 parameters: - name: databaseId @@ -3066,8 +3064,14 @@ paths: description: Parameters are not well-formed (likely email) content: application/json: {} + '403': + description: Internal authentication to the auth service is invalid + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' '404': - description: default role not found + description: Default role not found content: application/json: schema: @@ -4364,10 +4368,14 @@ components: scheme: bearer type: http schemas: - DataTypesDto: + AnalysisDto: properties: columns: - $ref: '#/components/schemas/SuggestedColumnDto' + items: + properties: + column_name: + $ref: '#/components/schemas/ColumnAnalysisDto' + type: array line_termination: example: "\r\n" type: string @@ -4375,6 +4383,33 @@ components: example: ',' type: string type: object + ColumnAnalysisDto: + properties: + d: + example: 4 + type: integer + dfid: + example: null + type: integer + enums: + example: null + properties: + type: string + type: array + null_allowed: + type: boolean + sets: + example: null + properties: + type: string + type: array + size: + example: 10 + type: integer + type: + example: decimal + type: string + type: object ErrorDto: properties: message: @@ -4396,11 +4431,6 @@ components: required: - keys type: object - SuggestedColumnDto: - properties: - column_name: - type: string - type: object ApiErrorDto: required: - code @@ -5622,7 +5652,6 @@ components: TableStatisticDto: required: - columns - - rows type: object properties: columns: @@ -5632,6 +5661,22 @@ components: rows: type: integer format: int64 + example: 5 + data_length: + type: integer + description: in bytes + format: int64 + example: 16384 + max_data_length: + type: integer + description: in bytes + format: int64 + example: 0 + avg_row_length: + type: integer + description: in bytes + format: int64 + example: 3276 TableHistoryDto: required: - event @@ -8232,8 +8277,6 @@ components: $ref: '#/components/schemas/ColumnCreateDto' constraints: $ref: '#/components/schemas/ConstraintsCreateDto' - need_sequence: - type: boolean ContainerCreateDto: required: - host diff --git a/.gitlab/.hooks/pre-commit b/.gitlab/.hooks/pre-commit deleted file mode 100755 index ffdf21be2bc37605f0bb07d4586337acba585155..0000000000000000000000000000000000000000 --- a/.gitlab/.hooks/pre-commit +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -BRANCH=$(git rev-parse --abbrev-ref HEAD) -if [[ "$BRANCH" == "master" ]]; then - echo "Running pre-commit hook..." - make gen-swagger-doc - cp ./dbrepo-metadata-db/1_setup-schema.sql ./.docker/config - cp ./dbrepo-metadata-db/2_setup-data.sql ./.docker/config - cp ./dbrepo-broker-service/rabbitmq.conf ./.docker/config - cp ./dbrepo-broker-service/enabled_plugins ./.docker/config - cp ./dbrepo-broker-service/definitions.json ./.docker/config - cp ./dbrepo-broker-service/advanced.config ./.docker/config - cp ./dbrepo-storage-service/s3_config.json ./.docker/config - cp ./dbrepo-gateway-service/dbrepo.conf ./.docker/config - cd ./.docker && tar czf ./dist.tar.gz ./docker-compose.yml ./.env ./config -fi diff --git a/make/dev.mk b/make/dev.mk index 6dd8a97afbf905bb328169e4320aec3e6345e275..2ddc6f07d083af9bae197acb2a813b04bc29c3ea 100644 --- a/make/dev.mk +++ b/make/dev.mk @@ -9,3 +9,14 @@ start-dev: build-images ## Start the development deployment. stop-dev: ## Stop the development deployment and remove all data. docker compose down +.PHONY: package-config +package-config: ## Package the config files + cp ./dbrepo-metadata-db/1_setup-schema.sql ./.docker/config + cp ./dbrepo-metadata-db/2_setup-data.sql ./.docker/config + cp ./dbrepo-broker-service/rabbitmq.conf ./.docker/config + cp ./dbrepo-broker-service/enabled_plugins ./.docker/config + cp ./dbrepo-broker-service/definitions.json ./.docker/config + cp ./dbrepo-broker-service/advanced.config ./.docker/config + cp ./dbrepo-storage-service/s3_config.json ./.docker/config + cp ./dbrepo-gateway-service/dbrepo.conf ./.docker/config + cd ./.docker && tar czf ./dist.tar.gz ./docker-compose.yml ./.env ./config