Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 452-create-table-with-sequence
  • 463-reduce-metadata-for-database-api
  • 468-hotfix-redirect-pid
  • 470-hotfix-admin-not-in-sync-on-first-install
  • 474-refactor-basetest-java-to-have-readonly-complete-objects
  • 476-hotfix-query-execution
  • 479-review-private-database-behavior
  • 482-search-service-displays-private-databases-when-not-having-sufficient-access
  • 483-boto3-large-data
  • 484-pipeline-checks
  • 485-fixity-checks
  • 486-test-python-library-through-swagger-api
  • 488-integrate-oidc-into-ui
  • 491-update-sequential-ids-to-non-guessable-ids
  • 494-configure-brute-force-login-detection-in-keycloak
  • 495-improve-password-policy-in-keycloak
  • 497-create-and-update-timestamp-table
  • 497-create-and-update-timestamp-table-2
  • 499-standalone-compute-service
  • 499-standalone-compute-service-2
  • 508-refactor-to-use-username-as-identity
  • 510-refactor-test-dtos-into-a-separate-library-light
  • 518-spark-doesn-t-map-the-headers-correct
  • 521-collect-more-metadata-for-publication
  • 522-integrate-the-new-ui
  • 523-multiarch-builds-in-pipeline-2
  • 530-various-schema-problems-with-subsets
  • 533-integrate-semantic-recommendation
  • 534-bug-when-adding-access-to-user-that-is-not-registered-at-dashboard-service
  • 539-load-tests
  • archiving
  • backtrack/entities
  • bug/ui
  • coverage/library
  • dev
  • feature/497-create-and-update-timestamp-table
  • feature/openshift
  • feature/semantic-service
  • feature/so-mapper-service
  • feature/soMapper-service
  • feature/sso
  • fix/auth-service
  • fix/composite-keys
  • fix/pid-list
  • hotfix/access
  • hotfix/docs
  • hotfix/helm
  • hotfix/helm-chart
  • hotfix/helm-data-db
  • hotfix/mandatory-arguments
  • hotfix/metadata-service
  • hotfix/openldap
  • hotfix/ui
  • hotfix/ui-view
  • luca_ba_new_interface
  • master
  • release-1.3.0
  • release-1.4.0
  • release-1.4.1
  • release-1.4.2
  • release-1.4.3
  • release-1.4.4
  • release-1.4.5
  • release-1.4.6
  • release-1.5
  • release-1.6
  • release-1.7
  • release-1.8
  • release-1.9
  • release-latest
  • release-v1.3
  • storage-job
  • health_check
  • v1.0.0-alpha
  • v1.1.0-alpha
  • v1.1.1-alpha
  • v1.3.0
  • v1.4.0
  • v1.4.1
  • v1.4.2
  • v1.4.3
  • v1.4.4
  • v1.4.5
  • v1.4.6
  • v1.5.0
  • v1.5.1
  • v1.5.3
  • v1.6.0
  • v1.6.1
  • v1.6.2
  • v1.6.3
  • v1.6.4
  • v1.7.0
  • v1.7.0-rc0
  • v1.7.0-rc1
  • v1.7.1
  • v1.7.2
  • v1.7.3
  • v1.7.3-fix
  • v1.7.3-fix10
  • v1.7.3-fix11
  • v1.7.3-fix12
  • v1.7.3-fix13
  • v1.7.3-fix14
  • v1.7.3-fix15
  • v1.7.3-fix16
  • v1.7.3-fix17
  • v1.7.3-fix18
  • v1.7.3-fix19
  • v1.7.3-fix2
  • v1.7.3-fix20
  • v1.7.3-fix21
  • v1.7.3-fix3
  • v1.7.3-fix4
  • v1.7.3-fix5
  • v1.7.3-fix6
  • v1.7.3-fix7
  • v1.7.3-fix8
  • v1.7.3-fix9
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.2-fix
  • v1.8.2-fix2
  • v1.8.2-fix3
  • v1.8.2-fix4
  • v1.9.0
  • v1.9.0-rc0
  • v1.9.0-rc1
  • v1.9.1
  • v1.9.2
  • v1.9.2-rc0
  • v1.9.3
133 results

Target

Select target project
  • fair-data-austria-db-repository/fda-services
1 result
Select Git revision
  • 452-create-table-with-sequence
  • 463-reduce-metadata-for-database-api
  • 468-hotfix-redirect-pid
  • 470-hotfix-admin-not-in-sync-on-first-install
  • 474-refactor-basetest-java-to-have-readonly-complete-objects
  • 476-hotfix-query-execution
  • 479-review-private-database-behavior
  • 482-search-service-displays-private-databases-when-not-having-sufficient-access
  • 483-boto3-large-data
  • 484-pipeline-checks
  • 485-fixity-checks
  • 486-test-python-library-through-swagger-api
  • 488-integrate-oidc-into-ui
  • 491-update-sequential-ids-to-non-guessable-ids
  • 494-configure-brute-force-login-detection-in-keycloak
  • 495-improve-password-policy-in-keycloak
  • 497-create-and-update-timestamp-table
  • 497-create-and-update-timestamp-table-2
  • 499-standalone-compute-service
  • 499-standalone-compute-service-2
  • 508-refactor-to-use-username-as-identity
  • 510-refactor-test-dtos-into-a-separate-library-light
  • 518-spark-doesn-t-map-the-headers-correct
  • 521-collect-more-metadata-for-publication
  • 522-integrate-the-new-ui
  • 523-multiarch-builds-in-pipeline-2
  • 530-various-schema-problems-with-subsets
  • 533-integrate-semantic-recommendation
  • 534-bug-when-adding-access-to-user-that-is-not-registered-at-dashboard-service
  • 539-load-tests
  • archiving
  • backtrack/entities
  • bug/ui
  • coverage/library
  • dev
  • feature/497-create-and-update-timestamp-table
  • feature/openshift
  • feature/semantic-service
  • feature/so-mapper-service
  • feature/soMapper-service
  • feature/sso
  • fix/auth-service
  • fix/composite-keys
  • fix/pid-list
  • hotfix/access
  • hotfix/docs
  • hotfix/helm
  • hotfix/helm-chart
  • hotfix/helm-data-db
  • hotfix/mandatory-arguments
  • hotfix/metadata-service
  • hotfix/openldap
  • hotfix/ui
  • hotfix/ui-view
  • luca_ba_new_interface
  • master
  • release-1.3.0
  • release-1.4.0
  • release-1.4.1
  • release-1.4.2
  • release-1.4.3
  • release-1.4.4
  • release-1.4.5
  • release-1.4.6
  • release-1.5
  • release-1.6
  • release-1.7
  • release-1.8
  • release-1.9
  • release-latest
  • release-v1.3
  • storage-job
  • health_check
  • v1.0.0-alpha
  • v1.1.0-alpha
  • v1.1.1-alpha
  • v1.3.0
  • v1.4.0
  • v1.4.1
  • v1.4.2
  • v1.4.3
  • v1.4.4
  • v1.4.5
  • v1.4.6
  • v1.5.0
  • v1.5.1
  • v1.5.3
  • v1.6.0
  • v1.6.1
  • v1.6.2
  • v1.6.3
  • v1.6.4
  • v1.7.0
  • v1.7.0-rc0
  • v1.7.0-rc1
  • v1.7.1
  • v1.7.2
  • v1.7.3
  • v1.7.3-fix
  • v1.7.3-fix10
  • v1.7.3-fix11
  • v1.7.3-fix12
  • v1.7.3-fix13
  • v1.7.3-fix14
  • v1.7.3-fix15
  • v1.7.3-fix16
  • v1.7.3-fix17
  • v1.7.3-fix18
  • v1.7.3-fix19
  • v1.7.3-fix2
  • v1.7.3-fix20
  • v1.7.3-fix21
  • v1.7.3-fix3
  • v1.7.3-fix4
  • v1.7.3-fix5
  • v1.7.3-fix6
  • v1.7.3-fix7
  • v1.7.3-fix8
  • v1.7.3-fix9
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.2-fix
  • v1.8.2-fix2
  • v1.8.2-fix3
  • v1.8.2-fix4
  • v1.9.0
  • v1.9.0-rc0
  • v1.9.0-rc1
  • v1.9.1
  • v1.9.2
  • v1.9.2-rc0
  • v1.9.3
133 results
Show changes
Commits on Source (8)
Showing
with 162 additions and 227 deletions
......@@ -6,34 +6,23 @@ Data is getting bigger and so are expectations of data provisioning in regards t
after quality check and not in snapshot intervals), cost-effectiveness (i.e. no duplication of data), transparent,
precise citation and many more.
[System-versioned](https://mariadb.com/kb/en/system-versioned-tables/) tables in MariaDB are improved data structures
that keep track of historical data. For each entry in a system-versioned table, a time period is maintained that denotes
the validity time span of this tuple from its start to end. Tuples in system-versioned tables are not *actually*
modified, they are marked as (in-)valid in time periods.
<figure markdown>
| ID | Sensor | Temp | Start | End |
|----|--------|------|-------|-----|
| 1 | A | 23.1 | t1 | |
| 2 | B | 25.8 | t2 | |
System-versioned tables in MariaDB are improved data structures that keep track of historical data. For each entry in a
system-versioned table, a time period is maintained that denotes the validity time span of this tuple from its start to
end. Tuples in system-versioned tables are not *actually* modified, they are marked as (in-)valid in time periods
(c.f. [Fig. 1](#fig1)).
<figure id="fig1" markdown>
![](../images/data-versioning.png)
<figcaption>Fig. 1: Data versioning in MariaDB system-versioned tables.</figcaption>
</figure>
Assuming that Sensor A was calibrated wrong and an updated measurement is passed to the system-versioned table, the
table contents show that the old row with Temp 23.1 is not deleted, but marked as valid in time span (t1, t3). The
updated row with Temp 22.1 is marked as valid from time span t3 onwards.
<figure markdown>
| ID | Sensor | Temp | Start | End |
|----|--------|------|-------|-----|
| 1 | A | 23.1 | t1 | t3 |
| 2 | B | 25.8 | t2 | |
| 1 | A | 22.1 | t3 | |
</figure>
## Further Reading
System-versioned tables are part of the SQL:2011 standard and have been adopted by many database management system
vendors: MariaDB (10.5 and higher), Google BigQuery, IBM DB2 (12 and higher), SQL Server (2016 and higher), Azure SQL,
PostgreSQL with [temporal tables extension](https://github.com/nearform/temporal_tables), etc.
\ No newline at end of file
System-versioned tables are part of the current ISO/IEC 9075-2:2023 ("SQL") standard and have been adopted by many
database management system vendors, e.g. MariaDB (10.5 and higher), Google BigQuery, IBM DB2 (12 and higher),
Cockroach DB, SAP HANA, SQL Server (2016 and higher), Azure SQL, PostgreSQL
with [temporal tables extension](https://github.com/nearform/temporal_tables), etc.
\ No newline at end of file
Source diff could not be displayed: it is too large. Options to address this: view the blob.
.docs/images/data-versioning.png

44.9 KiB

......@@ -16,16 +16,16 @@ author: Martin Weise
Documentation for version: [v1.7.3](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/releases).
DBRepo is a repository for data in databases that are used from the beginning until the end of a research
project supporting data evolution, -citation and -versioning. It implements the query store of the
[RDA WGDC](https://doi.org/10.1162/99608f92.be565013) on precisely identifying arbitrary subsets of data.
DBRepo is a repository for data in databases that cover the entire data life cycle supporting data evolution, -citation
and -versioning. It implements the query store of the [RDA WGDC](https://doi.org/10.1162/99608f92.be565013) on precisely
identifying arbitrary subsets of data.
## Why use DBRepo?
* **Built-in search** makes your dataset searchable without extra effort: most metadata is generated
automatically for data in your databases.
* **Built-in search** makes your dataset searchable without extra effort: metadata is generated automatically for data
in your databases.
* **Citable datasets** adopting the recommendations of the RDA-WGDC, arbitrary subsets can be precisely, persistently
identified using system-versioned tables of MariaDB and the DataCite schema for minting DOIs.
identified using [data versioning](concepts/data-versioning) of MariaDB and the DataCite schema for minting DOIs.
* **Powerful API for Data Scientists** with our strongly typed Python Library, Data Scientists can import, export and
work with data from Jupyter Notebook or Python script, optionally using Pandas DataFrames.
* **Cloud Native** our lightweight Helm chart allows for installations on any cloud provider or private-cloud setting
......
......@@ -149,19 +149,20 @@ build-metadata-service:
only:
- merge_requests
- master
needs:
- build-java-lib
dependencies:
- build-java-lib
script:
- "mvn -f ./dbrepo-metadata-service/pom.xml clean install $MAVEN_OPTS -DskipTests"
- "mvn -f ./dbrepo-metadata-service/pom.xml clean package $MAVEN_OPTS -DskipTests"
# Compiled classes are needed for SonarQube in later stages
artifacts:
when: always
paths:
- ./dbrepo-metadata-service/test/target/classes
- ./dbrepo-metadata-service/services/target/classes
- ./dbrepo-metadata-service/oai/target/classes
- ./dbrepo-metadata-service/repositories/target/classes
- ./dbrepo-metadata-service/rest-service/target/classes
- ./dbrepo-metadata-service/api/target/classes
- ./dbrepo-metadata-service/oai/target/classes
- ./dbrepo-metadata-service/entities/target/classes
- ./dbrepo-metadata-service/services/target/classes
expire_in: 1 days
build-analyse-service:
......@@ -176,7 +177,7 @@ build-analyse-service:
- "pip install pipenv"
- "pipenv install gunicorn && pipenv install --dev --system --deploy"
build-lib:
build-python-lib:
image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION}
stage: build
only:
......@@ -188,6 +189,19 @@ build-lib:
- "pip install pipenv"
- "pipenv install gunicorn && pipenv install --dev --system --deploy"
build-java-lib:
image: maven:3-openjdk-${JAVA_VERSION}
stage: build
only:
- merge_requests
- master
script:
- "mvn -f ./lib/java/dbrepo-core/pom.xml clean install $MAVEN_OPTS -DskipTests"
artifacts:
when: always
paths:
- ./lib/java/dbrepo-core/target/classes
build-data-service:
image: maven:3-openjdk-${JAVA_VERSION}
stage: build
......@@ -195,11 +209,9 @@ build-data-service:
- merge_requests
- master
needs:
- build-metadata-service
- build-java-lib
dependencies:
- build-metadata-service
before_script:
- "mvn -f ./dbrepo-metadata-service/pom.xml clean install $MAVEN_OPTS -DskipTests"
- build-java-lib
script:
- "mvn -f ./dbrepo-data-service/pom.xml clean package $MAVEN_OPTS -DskipTests"
# Compiled classes are needed for SonarQube in later stages
......@@ -277,9 +289,9 @@ test-metadata-service:
- merge_requests
- master
needs:
- build-metadata-service
- build-java-lib
dependencies:
- build-metadata-service
- build-java-lib
script:
- "mvn -f ./dbrepo-metadata-service/pom.xml clean test verify $MAVEN_OPTS"
- "cat ./dbrepo-metadata-service/report/target/site/jacoco-aggregate/index.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/Jacoco Coverage Total:/'"
......@@ -489,7 +501,7 @@ test-search-service-init:
junit: ./dbrepo-search-service/coverage.xml
coverage: '/TOTAL.*?([0-9]{1,3})%/'
test-lib:
test-python-lib:
image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION}
stage: test
only:
......@@ -498,9 +510,9 @@ test-lib:
variables:
PIPENV_PIPFILE: "./lib/python/Pipfile"
needs:
- build-lib
- build-python-lib
dependencies:
- build-lib
- build-python-lib
script:
- "pip install pipenv"
- "pipenv install gunicorn && pipenv install --dev --system --deploy"
......@@ -560,7 +572,7 @@ release-images:
- test-analyse-service
- test-auth-service-init
- test-data-service
- test-lib
- test-python-lib
- test-metadata-service
- test-search-service
- test-search-service-init
......@@ -705,10 +717,10 @@ scan-sonarqube:
- master
needs:
- build-data-service
- build-metadata-service
- build-java-lib
dependencies:
- build-data-service
- build-metadata-service
- build-java-lib
script:
- 'sonar-scanner -Dsonar.token="${CI_SONAR_TOKEN}"'
allow_failure: true
......
......@@ -94,39 +94,13 @@
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
<version>${spring-cloud.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<groupId>at.ac.tuwien.ifs.dbrepo</groupId>
<artifactId>dbrepo-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<!-- Spark -->
<dependency>
......@@ -166,12 +140,6 @@
<artifactId>hadoop-aws</artifactId>
<version>${hadoop.version}</version>
</dependency>
<!-- Open API -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<version>${springdoc-openapi.version}</version>
</dependency>
<!-- Data Source -->
<dependency>
<groupId>com.h2database</groupId>
......@@ -203,12 +171,6 @@
<version>${micrometer.version}</version>
<scope>test</scope>
</dependency>
<!-- IDE -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>compile</scope>
</dependency>
<!-- Mapping -->
<dependency>
<groupId>org.mapstruct</groupId>
......@@ -221,11 +183,6 @@
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson-datatype.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
......@@ -252,29 +209,12 @@
<artifactId>keycloak-admin-client</artifactId>
<version>${keycloak.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-hibernate6</artifactId>
<version>${jackson-datatype.version}</version>
</dependency>
<!-- Authentication -->
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>${jwt.version}</version>
</dependency>
<!-- DTOs -->
<dependency>
<groupId>at.tuwien</groupId>
<artifactId>dbrepo-metadata-service-api</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Exceptions -->
<dependency>
<groupId>at.tuwien</groupId>
<artifactId>dbrepo-metadata-service-repositories</artifactId>
<version>${project.version}</version>
</dependency>
<!-- AMPQ -->
<dependency>
<groupId>org.springframework.amqp</groupId>
......@@ -293,19 +233,8 @@
</dependency>
<!-- Testing -->
<dependency>
<groupId>at.tuwien</groupId>
<artifactId>dbrepo-metadata-service-test</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>at.tuwien</groupId>
<artifactId>dbrepo-metadata-service-entities</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
......@@ -378,7 +307,8 @@
<artifactId>maven-surefire-plugin</artifactId>
<!-- Note config is repeated in scalatest config -->
<configuration>
<argLine>@{argLine} -ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g -XX:ReservedCodeCacheSize=${CodeCacheSize}
<argLine>@{argLine} -ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g
-XX:ReservedCodeCacheSize=${CodeCacheSize}
${extraJavaTestArgs}
</argLine>
</configuration>
......
package at.tuwien.endpoints;
import at.tuwien.api.database.CreateAccessDto;
import at.tuwien.api.database.DatabaseDto;
import at.tuwien.api.error.ApiErrorDto;
import at.tuwien.api.user.UserDto;
import at.tuwien.exception.*;
import at.ac.tuwien.ifs.dbrepo.core.api.database.CreateAccessDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto;
import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto;
import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import at.tuwien.service.AccessService;
import at.tuwien.service.CacheService;
import io.swagger.v3.oas.annotations.Operation;
......
package at.tuwien.endpoints;
import at.tuwien.api.container.ContainerDto;
import at.tuwien.api.database.AccessTypeDto;
import at.tuwien.api.database.DatabaseDto;
import at.tuwien.api.database.internal.CreateDatabaseDto;
import at.tuwien.api.error.ApiErrorDto;
import at.tuwien.api.user.internal.UpdateUserPasswordDto;
import at.tuwien.exception.*;
import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.internal.CreateDatabaseDto;
import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto;
import at.ac.tuwien.ifs.dbrepo.core.api.user.internal.UpdateUserPasswordDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import at.tuwien.mapper.MetadataMapper;
import at.tuwien.service.AccessService;
import at.tuwien.service.CacheService;
......
package at.tuwien.endpoints;
import at.tuwien.api.user.UserDetailsDto;
import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDetailsDto;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.springframework.security.core.Authentication;
......
package at.tuwien.endpoints;
import at.tuwien.ExportResourceDto;
import at.tuwien.api.database.DatabaseDto;
import at.tuwien.api.database.ViewColumnDto;
import at.tuwien.api.database.ViewDto;
import at.tuwien.api.database.query.QueryDto;
import at.tuwien.api.database.query.QueryPersistDto;
import at.tuwien.api.database.query.SubsetDto;
import at.tuwien.api.error.ApiErrorDto;
import at.tuwien.exception.*;
import at.ac.tuwien.ifs.dbrepo.core.api.ExportResourceDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewColumnDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryPersistDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.query.SubsetDto;
import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import at.tuwien.gateway.MetadataServiceGateway;
import at.tuwien.mapper.MariaDbMapper;
import at.tuwien.service.CacheService;
......
package at.tuwien.endpoints;
import at.tuwien.ExportResourceDto;
import at.tuwien.api.database.DatabaseAccessDto;
import at.tuwien.api.database.DatabaseDto;
import at.tuwien.api.database.query.ImportDto;
import at.tuwien.api.database.table.*;
import at.tuwien.api.database.table.columns.ColumnDto;
import at.tuwien.api.database.table.internal.TableCreateDto;
import at.tuwien.api.error.ApiErrorDto;
import at.tuwien.exception.*;
import at.ac.tuwien.ifs.dbrepo.core.api.ExportResourceDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.query.ImportDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.table.*;
import at.ac.tuwien.ifs.dbrepo.core.api.database.table.columns.ColumnDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.table.internal.TableCreateDto;
import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import at.tuwien.gateway.MetadataServiceGateway;
import at.tuwien.mapper.MariaDbMapper;
import at.tuwien.service.*;
......
package at.tuwien.endpoints;
import at.tuwien.api.database.ViewDto;
import at.tuwien.api.error.ApiErrorDto;
import at.tuwien.api.file.UploadResponseDto;
import at.tuwien.exception.*;
import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto;
import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto;
import at.ac.tuwien.ifs.dbrepo.core.api.file.UploadResponseDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import at.tuwien.service.StorageService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
......
package at.tuwien.endpoints;
import at.tuwien.ExportResourceDto;
import at.tuwien.api.database.CreateViewDto;
import at.tuwien.api.database.DatabaseDto;
import at.tuwien.api.database.ViewColumnDto;
import at.tuwien.api.database.ViewDto;
import at.tuwien.api.database.table.TableStatisticDto;
import at.tuwien.api.error.ApiErrorDto;
import at.tuwien.exception.*;
import at.ac.tuwien.ifs.dbrepo.core.api.ExportResourceDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.CreateViewDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewColumnDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.ViewDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.table.TableStatisticDto;
import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import at.tuwien.mapper.MariaDbMapper;
import at.tuwien.service.*;
import at.tuwien.validation.EndpointValidator;
......
package at.tuwien.handlers;
import at.tuwien.api.error.ApiErrorDto;
import at.tuwien.exception.*;
import at.ac.tuwien.ifs.dbrepo.core.api.error.ApiErrorDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import io.swagger.v3.oas.annotations.Hidden;
import lombok.extern.log4j.Log4j2;
import org.springframework.http.HttpHeaders;
......
package at.tuwien.validation;
import at.tuwien.api.database.AccessTypeDto;
import at.tuwien.api.database.DatabaseAccessDto;
import at.tuwien.api.database.DatabaseDto;
import at.tuwien.api.database.query.FilterDto;
import at.tuwien.api.database.query.FilterTypeDto;
import at.tuwien.api.database.query.SubsetDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseAccessDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.query.FilterDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.query.FilterTypeDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.query.SubsetDto;
import at.tuwien.endpoints.RestEndpoint;
import at.tuwien.exception.*;
import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import at.tuwien.service.CacheService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
......
package at.tuwien.config;
import at.tuwien.api.container.ContainerDto;
import at.tuwien.api.database.DatabaseDto;
import at.tuwien.api.database.query.QueryDto;
import at.ac.tuwien.ifs.dbrepo.core.api.container.ContainerDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryDto;
import lombok.extern.log4j.Log4j2;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
......
package at.tuwien.config;
import at.tuwien.test.AbstractUnitTest;
import at.tuwien.test.BaseTest;
import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest;
import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.testcontainers.containers.MariaDBContainer;
......@@ -11,7 +11,7 @@ import org.testcontainers.images.PullPolicy;
* This class configures the MariaDB container for the integration tests.
*/
@Configuration
public class MariaDbContainerConfig extends AbstractUnitTest {
public class MariaDbContainerConfig extends BaseTest {
public static CustomMariaDBContainer getContainer() {
return CustomMariaDBContainer.getInstance();
......
package at.tuwien.endpoint;
import at.tuwien.api.database.AccessTypeDto;
import at.tuwien.api.database.DatabaseDto;
import at.tuwien.api.user.UserDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto;
import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest;
import at.tuwien.endpoints.AccessEndpoint;
import at.tuwien.exception.*;
import at.tuwien.service.AccessService;
import at.tuwien.service.CacheService;
import at.tuwien.test.AbstractUnitTest;
import lombok.extern.log4j.Log4j2;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -28,7 +27,7 @@ import static org.mockito.Mockito.*;
@Log4j2
@SpringBootTest
@ExtendWith(SpringExtension.class)
public class AccessEndpointUnitTest extends AbstractUnitTest {
public class AccessEndpointUnitTest extends BaseTest {
@Autowired
private AccessEndpoint accessEndpoint;
......@@ -39,11 +38,6 @@ public class AccessEndpointUnitTest extends AbstractUnitTest {
@MockBean
private AccessService accessService;
@BeforeEach
public void beforeEach() {
genesis();
}
@Test
@WithMockUser(username = USER_LOCAL_ADMIN_USERNAME, authorities = {"system"})
public void create_succeeds() throws UserNotFoundException, NotAllowedException, DatabaseUnavailableException,
......
package at.tuwien.endpoint;
import at.tuwien.api.database.AccessTypeDto;
import at.tuwien.api.database.DatabaseDto;
import at.tuwien.api.user.UserDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.AccessTypeDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto;
import at.ac.tuwien.ifs.dbrepo.core.api.user.UserDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest;
import at.tuwien.endpoints.DatabaseEndpoint;
import at.tuwien.exception.*;
import at.tuwien.service.AccessService;
import at.tuwien.service.ContainerService;
import at.tuwien.service.CacheService;
import at.tuwien.service.ContainerService;
import at.tuwien.service.DatabaseService;
import at.tuwien.test.AbstractUnitTest;
import lombok.extern.log4j.Log4j2;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -33,7 +32,7 @@ import static org.mockito.Mockito.*;
@Log4j2
@SpringBootTest
@ExtendWith(SpringExtension.class)
public class DatabaseEndpointUnitTest extends AbstractUnitTest {
public class DatabaseEndpointUnitTest extends BaseTest {
@Autowired
private DatabaseEndpoint databaseEndpoint;
......@@ -50,11 +49,6 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest {
@MockBean
private CacheService credentialService;
@BeforeEach
public void beforeEach() {
genesis();
}
@Test
@WithMockUser(username = USER_LOCAL_ADMIN_USERNAME, authorities = {"system"})
public void create_succeeds() throws DatabaseUnavailableException, RemoteUnavailableException,
......
package at.tuwien.endpoint;
import at.tuwien.api.database.DatabaseDto;
import at.tuwien.api.database.query.QueryDto;
import at.tuwien.api.database.query.QueryPersistDto;
import at.tuwien.api.database.query.SubsetDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.DatabaseDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.query.QueryPersistDto;
import at.ac.tuwien.ifs.dbrepo.core.api.database.query.SubsetDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest;
import at.tuwien.endpoints.SubsetEndpoint;
import at.tuwien.exception.*;
import at.tuwien.gateway.MetadataServiceGateway;
import at.tuwien.service.CacheService;
import at.tuwien.service.DatabaseService;
import at.tuwien.service.StorageService;
import at.tuwien.service.SubsetService;
import at.tuwien.test.AbstractUnitTest;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.log4j.Log4j2;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.SparkSession;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -36,13 +35,13 @@ import java.util.List;
import java.util.UUID;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
@Log4j2
@SpringBootTest
@ExtendWith(SpringExtension.class)
public class SubsetEndpointUnitTest extends AbstractUnitTest {
public class SubsetEndpointUnitTest extends BaseTest {
@Autowired
private SubsetEndpoint subsetEndpoint;
......@@ -68,11 +67,6 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest {
@MockBean
private MetadataServiceGateway metadataServiceGateway;
@BeforeEach
public void beforeEach() {
genesis();
}
@Test
@WithAnonymousUser
public void list_publicDataPrivateSchemaAnonymous_succeeds() throws QueryNotFoundException,
......