diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index b90ccd74098883a0f8f71c5cbc8f83bcf381f0f9..32ea20a0c39ffc1189d1875749a3cda52fd088fd 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -39,7 +39,6 @@ services: image: docker.io/bitnami/mariadb-galera:11.3.2-debian-12-r9 volumes: - data-db-data:/bitnami/mariadb - - "${SHARED_VOLUME:-/tmp}:/tmp" ports: - "3307:3306" environment: @@ -138,8 +137,6 @@ services: container_name: dbrepo-metadata-service hostname: metadata-service image: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.7.2 - volumes: - - "${SHARED_VOLUME:-/tmp}:/tmp" environment: ADMIN_EMAIL: "${ADMIN_EMAIL:-noreply@localhost}" ANALYSE_SERVICE_ENDPOINT: "${ANALYSE_SERVICE_ENDPOINT:-http://analyse-service:8080}" @@ -214,8 +211,6 @@ services: METADATA_SERVICE_ENDPOINT: ${METADATA_SERVICE_ENDPOINT:-http://metadata-service:8080} SYSTEM_USERNAME: "${SYSTEM_USERNAME:-admin}" SYSTEM_PASSWORD: "${SYSTEM_PASSWORD:-admin}" - volumes: - - "${SHARED_FILESYSTEM:-/tmp}:/tmp" healthcheck: test: curl -sSL localhost:8080/health | grep 'UP' || exit 1 interval: 10s @@ -480,8 +475,6 @@ services: container_name: dbrepo-data-service hostname: data-service image: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.7.2 - volumes: - - "${SHARED_VOLUME:-/tmp}:/tmp" environment: AUTH_SERVICE_ADMIN: "${AUTH_SERVICE_ADMIN:-admin}" AUTH_SERVICE_ADMIN_PASSWORD: "${AUTH_SERVICE_ADMIN_PASSWORD:-admin}" @@ -513,7 +506,6 @@ services: S3_ACCESS_KEY_ID: "${S3_ACCESS_KEY_ID:-seaweedfsadmin}" S3_BUCKET: "${S3_BUCKET:-dbrepo}" S3_ENDPOINT: "${S3_ENDPOINT:-http://storage-service:9000}" - S3_FILE_PATH: "${S3_FILE_PATH:-/tmp}" S3_IMPORT_BUCKET: "${S3_IMPORT_BUCKET:-dbrepo-upload}" S3_SECRET_ACCESS_KEY: "${S3_SECRET_ACCESS_KEY:-seaweedfsadmin}" SPARK_USER: "${COMPUTE_SERVICE_USERNAME:-spark}" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bef70c68da14f6a604039b8c7e96fa1a457b39b3..1ee5c542a11937649e2a20a9e23b652cb631dbb0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -544,16 +544,16 @@ release-helm: - "docker logout ${CI_REGISTRY2_URL}" - "echo ${CI_REGISTRY2_PASSWORD} | docker login --username ${CI_REGISTRY2_USER} --password-stdin ${CI_REGISTRY2_URL}" - "mkdir -p ~/.gnupg" - - echo "$CI_GPG_KEYRING" | base64 -d > ~/.gnupg/secring.gpg - - echo "$CI_GPG_KEYRING2" | base64 -d > ~/.gnupg/pubring.gpg + - echo "$CI_GPG_KEYRING" | base64 -d > ./secring.gpg + - echo "$CI_GPG_KEYRING2" | base64 -d > ./pubring.gpg - helm registry login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY_URL}" - helm registry login --username "${CI_REGISTRY2_USER}" --password "${CI_REGISTRY2_PASSWORD}" "${CI_REGISTRY2_URL}" - make build-helm - - "helm package ./helm/dbrepo --sign --key 'Martin Weise' --keyring ~/.gnupg/secring.gpg --destination ./build" + - "helm package ./helm/dbrepo --sign --key 'Martin Weise' --keyring ./secring.gpg --destination ./build" - "helm plugin install https://github.com/sigstore/helm-sigstore" script: - "helm push ./build/dbrepo-${CHART_VERSION}.tgz oci://${CI_REGISTRY2_URL}/helm" - - "helm sigstore upload ./build/dbrepo-${CHART_VERSION}.tgz" + - "helm sigstore upload --keyring ./pubring.gpg ./build/dbrepo-${CHART_VERSION}.tgz" release-docs: stage: release diff --git a/dbrepo-broker-service/enabled_plugins b/dbrepo-broker-service/enabled_plugins index db0ae888499ea44c2dd7d40f5ac9c8fcc0ca0567..d930dd9c69b2b9d2a295b5aa54cb17ffc80a903f 100644 --- a/dbrepo-broker-service/enabled_plugins +++ b/dbrepo-broker-service/enabled_plugins @@ -1 +1 @@ -[rabbitmq_prometheus,rabbitmq_auth_backend_ldap,rabbitmq_auth_mechanism_ssl,rabbitmq_management,rabbitmq_mqtt]. \ No newline at end of file +[rabbitmq_prometheus,rabbitmq_auth_backend_ldap,rabbitmq_auth_mechanism_ssl,rabbitmq_management,rabbitmq_mqtt]. diff --git a/dbrepo-data-service/pom.xml b/dbrepo-data-service/pom.xml index e4ca259081947502c2d9164c56fc82e1070cda23..e051ab7287aff1e850564a413ff0fed06bc729d9 100644 --- a/dbrepo-data-service/pom.xml +++ b/dbrepo-data-service/pom.xml @@ -302,7 +302,6 @@ <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service-entities</artifactId> <version>${project.version}</version> - <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> diff --git a/dbrepo-metadata-db/migration/16/data.py b/dbrepo-metadata-db/migration/16/data.py index fe627c2befe1ddb99ee176778e8b41cdcde6cd1f..e321eb38b7538699a0fefef1a1e0a4d31abf9b3e 100644 --- a/dbrepo-metadata-db/migration/16/data.py +++ b/dbrepo-metadata-db/migration/16/data.py @@ -4,9 +4,9 @@ import uuid from dbrepo.RestClient import RestClient -endpoint = os.getenv('METADATA_SERVICE_ENDPOINT', 'https://dbrepo1.ec.tuwien.ac.at') +endpoint = os.getenv('METADATA_SERVICE_ENDPOINT', 'http://localhost') username = os.getenv('SYSTEM_USERNAME', 'admin') -password = os.getenv('SYSTEM_PASSWORD', 'f24870437f82adf567c0b03179f15e21') +password = os.getenv('SYSTEM_PASSWORD', 'admin') client = RestClient(endpoint=endpoint, username=username, password=password) plan: [str] = [] @@ -89,11 +89,17 @@ def update_databases() -> None: plan.append(f"UPDATE mdb_view SET vdbid = '{new_id}' WHERE vdbid = '{old_id}';") plan.append(f"UPDATE mdb_identifiers SET dbid = '{new_id}' WHERE dbid = '{old_id}';") plan.append(f"UPDATE mdb_access SET aDBID = '{new_id}' WHERE aDBID = '{old_id}';") - for view in database.views: - v_old_id: int = view.id + for _view in database.views: + v_old_id: int = _view.id v_new_id: uuid = uuid.uuid4() + view = client.get_view(database_id=_database.id, view_id=_view.id) + plan.append(f"UPDATE mdb_view SET ID = '{v_new_id}' WHERE ID = '{v_old_id}';") + plan.append(f"UPDATE mdb_view_columns SET view_id = '{v_new_id}' WHERE view_id = '{v_old_id}';") plan.append(f"UPDATE mdb_identifiers SET vid = '{v_new_id}' WHERE vid = '{v_old_id}';") - plan.append(f"UPDATE mdb_view_columns SET id = UUID(), view_id = '{v_new_id}' WHERE id = '{v_old_id}';") + for column in view.columns: + vc_old_id: int = column.id + vc_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_view_columns SET id = '{vc_new_id}' WHERE id = '{vc_old_id}';") for table in database.tables: tbl_old_id: int = table.id tbl_new_id: uuid = uuid.uuid4() @@ -101,6 +107,7 @@ def update_databases() -> None: plan.append(f"UPDATE mdb_columns SET tID = '{tbl_new_id}' WHERE tID = '{tbl_old_id}';") plan.append(f"UPDATE mdb_constraints_primary_key SET pkid = UUID(), tID = '{tbl_new_id}' WHERE tID = '{tbl_old_id}';") plan.append(f"UPDATE mdb_constraints_unique SET tid = '{tbl_new_id}' WHERE tid = '{tbl_old_id}';") + plan.append(f"UPDATE mdb_constraints_foreign_key SET rtid = '{tbl_new_id}' WHERE rtid = '{tbl_old_id}';") plan.append( f"UPDATE mdb_constraints_checks SET id = UUID(), tid = '{tbl_new_id}' WHERE tid = '{tbl_old_id}';") for fk in table.constraints.foreign_keys: @@ -173,6 +180,7 @@ def update_identifiers() -> None: plan.append(f"UPDATE mdb_identifier_creators SET pid = '{i_new_id}' WHERE pid = '{i_old_id}';") plan.append(f"UPDATE mdb_identifier_funders SET pid = '{i_new_id}' WHERE pid = '{i_old_id}';") plan.append(f"UPDATE mdb_identifier_licenses SET pid = '{i_new_id}' WHERE pid = '{i_old_id}';") + plan.append(f"UPDATE mdb_identifier_related SET pid = '{i_new_id}' WHERE pid = '{i_old_id}';") for title in identifier.titles: t_old_id = title.id t_new_id: uuid = uuid.uuid4() @@ -189,6 +197,10 @@ def update_identifiers() -> None: f_old_id = funder.id f_new_id: uuid = uuid.uuid4() plan.append(f"UPDATE mdb_identifier_funders SET id = '{f_new_id}' WHERE id = '{f_old_id}';") + for related_identifier in identifier.related_identifiers: + r_old_id = related_identifier.id + r_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_identifier_related SET id = '{r_new_id}' WHERE id = '{r_old_id}';") plan.append("COMMIT;") diff --git a/dbrepo-ui/components/identifier/Summary.vue b/dbrepo-ui/components/identifier/Summary.vue index dcbe2f063db7ccbeb601a70a2d1bc85e3f9a5c85..a2df3f22c715b13a8a4f7c70e78e1a00ccc92bb1 100644 --- a/dbrepo-ui/components/identifier/Summary.vue +++ b/dbrepo-ui/components/identifier/Summary.vue @@ -68,7 +68,7 @@ </div> </v-list-item> <v-list-item - v-if="identifier.related_identifiers && identifier.related_identifiers.length > 0" + v-if="identifier.related_identifiers" :title="$t('pages.identifier.related-identifiers.title')" density="compact"> <p diff --git a/dbrepo-ui/composables/identifier-service.ts b/dbrepo-ui/composables/identifier-service.ts index 585356994be12526b4e7c83519a3f36db00b388a..2e96a2e20d68f2d4b381b3edd27ea8b25eea4c79 100644 --- a/dbrepo-ui/composables/identifier-service.ts +++ b/dbrepo-ui/composables/identifier-service.ts @@ -273,6 +273,9 @@ export const useIdentifierService = (): any => { const regex: RegExp = /(10[.][0-9]{4,}[^\s"\/<>]*\/[^\s"<>]+)/g const matches: RegExpMatchArray | null = val.match(regex) if (matches && matches.length > 0) { + if (config.public.doi.endpoint) { + return `${config.public.doi.endpoint}/${matches[0]}` + } return `https://doi.org/${matches[0]}` } if (val.startsWith('http')) { diff --git a/dbrepo-ui/nuxt.config.ts b/dbrepo-ui/nuxt.config.ts index 4d9b769904dec4c1291df21d7c2eb3235218407d..b3694d5b8bfdad9cc618cd5d0ff53e912c3ea3ec 100644 --- a/dbrepo-ui/nuxt.config.ts +++ b/dbrepo-ui/nuxt.config.ts @@ -98,7 +98,6 @@ export default defineNuxtConfig({ } }, doi: { - enabled: false, endpoint: 'https://doi.org' }, links: {}