Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
fix: compile errors and other housekeeping tasks (#100)
Browse files Browse the repository at this point in the history
* fix: compile errors

* DEPENDENCIES

* removed workflows that are also in .github repo

* added dependabot config
  • Loading branch information
paullatzelsperger authored Jul 19, 2023
1 parent f7ba496 commit 6ee1ccc
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 122 deletions.
25 changes: 0 additions & 25 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
updates:
# maintain dependencies for GitHub actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly" # default = monday
open-pull-requests-limit: 5
labels:
- "dependencies"
- "github_actions"

# maintain dependencies for Gradle
- package-ecosystem: "gradle" # checks build.gradle(.kts) and settings.gradle(.kts)
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "java"
ignore:
- dependency-name: "org.eclipse.edc:edc-versions"
49 changes: 2 additions & 47 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,5 @@ permissions:
contents: read

jobs:
Check-Allowed-Licenses:
runs-on: ubuntu-latest
continue-on-error: false
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
with:
fail-on-severity: critical
# Representation of this list: https://www.eclipse.org/legal/licenses.php#
# Expressed with the help of the following IDs: https://spdx.org/licenses/
allow-licenses: >-
Adobe-Glyph, Apache-1.0, Apache-1.1, Apache-2.0, Artistic-2.0, BSD-2-Clause, BSD-3-Clause,
BSD-4-Clause, 0BSD, BSL-1.0, CDDL-1.0, CDDL-1.1, CPL-1.0, CC-BY-3.0, CC-BY-4.0, CC-BY-2.5,
CC-BY-SA-3.0, CC-BY-SA-4.0, CC0-1.0, EPL-1.0, EPL-2.0, FTL, GFDL-1.3-only, IPL-1.0, ISC,
MIT, MIT-0, MPL-1.1, MPL-2.0, NTP, OpenSSL, PHP-3.01, PostgreSQL, OFL-1.1, Unlicense,
Unicode-DFS-2015, Unicode-DFS-2016, Unicode-TOU, UPL-1.0, W3C-20150513, W3C-19980720, W3C,
WTFPL, X11, Zlib, ZPL-2.1
Dash-Dependency-Check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-build
- name: Download latest Eclipse Dash
run: |
curl -L https://repo.eclipse.org/service/local/artifact/maven/redirect\?r\=dash-licenses\&g\=org.eclipse.dash\&a\=org.eclipse.dash.licenses\&v\=LATEST --output dash.jar
- name: Regenerate DEPENDENCIES
run: |
# dash returns a nonzero exit code if there are libs that need review. the "|| true" avoids that
./gradlew allDependencies | grep -Poh "(?<=\s)[\w.-]+:[\w.-]+:[^:\s\[\]]+" | sort | uniq | java -jar dash.jar - -summary DEPENDENCIES-gen || true
# log warning if restricted deps are found
grep -E 'restricted' DEPENDENCIES | if test $(wc -l) -gt 0; then
echo "::warning file=DEPENDENCIES,title=Restricted Dependencies found::Some dependencies are marked 'restricted' - please review them"
fi
# log error and fail job if rejected deps are found
grep -E 'rejected' DEPENDENCIES | if test $(wc -l) -gt 0; then
echo "::error file=DEPENDENCIES,title=Rejected Dependencies found::Some dependencies are marked 'rejected', they cannot be used"
exit 1
fi
- name: Check for differences
run: |
diff DEPENDENCIES DEPENDENCIES-gen
check:
uses: eclipse-edc/.github/.github/workflows/dependency-check.yml@main
27 changes: 0 additions & 27 deletions .github/workflows/trigger_snapshot.yml

This file was deleted.

11 changes: 6 additions & 5 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ maven/mavencentral/io.netty/netty-transport-native-unix-common/4.1.86.Final, Apa
maven/mavencentral/io.netty/netty-transport/4.1.86.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926
maven/mavencentral/io.opentelemetry.instrumentation/opentelemetry-instrumentation-annotations/1.24.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.opentelemetry/opentelemetry-api/1.24.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.opentelemetry/opentelemetry-api/1.27.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.opentelemetry/opentelemetry-api/1.28.0, , restricted, clearlydefined
maven/mavencentral/io.opentelemetry/opentelemetry-context/1.24.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.opentelemetry/opentelemetry-context/1.27.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.opentelemetry/opentelemetry-context/1.28.0, , restricted, clearlydefined
maven/mavencentral/io.prometheus/simpleclient/0.16.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.prometheus/simpleclient_common/0.16.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.prometheus/simpleclient_httpserver/0.16.0, Apache-2.0, approved, clearlydefined
Expand All @@ -145,8 +145,8 @@ maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.2, Apache-2.0,
maven/mavencentral/io.swagger.core.v3/swagger-models/2.2.10, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.swagger.core.v3/swagger-models/2.2.8, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.swagger.parser.v3/swagger-parser-core/2.1.10, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.swagger.parser.v3/swagger-parser-v2-converter/2.1.10, None, restricted, #9330
maven/mavencentral/io.swagger.parser.v3/swagger-parser-v3/2.1.10, None, restricted, #9323
maven/mavencentral/io.swagger.parser.v3/swagger-parser-v2-converter/2.1.10, Apache-2.0, approved, #9330
maven/mavencentral/io.swagger.parser.v3/swagger-parser-v3/2.1.10, Apache-2.0, approved, #9323
maven/mavencentral/io.swagger.parser.v3/swagger-parser/2.1.10, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.swagger/swagger-annotations/1.6.9, Apache-2.0, approved, #3792
maven/mavencentral/io.swagger/swagger-compat-spec-parser/1.0.64, Apache-2.0, approved, clearlydefined
Expand Down Expand Up @@ -255,6 +255,7 @@ maven/mavencentral/org.eclipse.edc/sql-core/0.1.4-SNAPSHOT, Apache-2.0, approved
maven/mavencentral/org.eclipse.edc/state-machine/0.1.4-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/transaction-datasource-spi/0.1.4-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/transaction-spi/0.1.4-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/transform-core/0.1.4-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/transform-spi/0.1.4-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/util/0.1.4-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/validator-core/0.1.4-SNAPSHOT, Apache-2.0, approved, technology.edc
Expand Down Expand Up @@ -365,7 +366,7 @@ maven/mavencentral/org.slf4j/slf4j-api/2.0.7, MIT, approved, #5915
maven/mavencentral/org.testcontainers/database-commons/1.18.3, MIT, approved, clearlydefined
maven/mavencentral/org.testcontainers/jdbc/1.18.3, MIT, approved, clearlydefined
maven/mavencentral/org.testcontainers/junit-jupiter/1.18.3, MIT, approved, #7941
maven/mavencentral/org.testcontainers/postgresql/1.18.3, None, restricted, #9332
maven/mavencentral/org.testcontainers/postgresql/1.18.3, MIT, approved, #9332
maven/mavencentral/org.testcontainers/testcontainers/1.18.3, MIT, approved, #7938
maven/mavencentral/org.xmlunit/xmlunit-core/2.9.1, Apache-2.0, approved, #6272
maven/mavencentral/org.xmlunit/xmlunit-placeholders/2.9.1, Apache-2.0, approved, clearlydefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,16 @@

package org.eclipse.edc.registration.transform;

import org.eclipse.edc.api.transformer.DtoTransformer;
import org.eclipse.edc.registration.model.ParticipantDto;
import org.eclipse.edc.registration.model.ParticipantStatusDto;
import org.eclipse.edc.registration.spi.model.Participant;
import org.eclipse.edc.registration.spi.model.ParticipantStatus;
import org.eclipse.edc.spi.EdcException;
import org.eclipse.edc.transform.spi.TransformerContext;
import org.eclipse.edc.transform.spi.TypeTransformer;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import static java.lang.String.format;

public class ParticipantToParticipantDtoTransformer implements DtoTransformer<Participant, ParticipantDto> {
public class ParticipantToParticipantDtoTransformer implements TypeTransformer<Participant, ParticipantDto> {

@Override
public Class<Participant> getInputType() {
Expand Down Expand Up @@ -55,18 +52,10 @@ public Class<ParticipantDto> getOutputType() {
* @return {@link ParticipantStatusDto}
*/
private ParticipantStatusDto mapToDtoStatus(ParticipantStatus status) {
switch (status) {
case ONBOARDING_INITIATED:
case AUTHORIZING:
case AUTHORIZED:
return ParticipantStatusDto.ONBOARDING_IN_PROGRESS;
case ONBOARDED:
return ParticipantStatusDto.ONBOARDED;
case DENIED:
case FAILED:
return ParticipantStatusDto.DENIED;
default:
throw new EdcException(format("Unknown ParticipantStatus value: %s", status));
}
return switch (status) {
case ONBOARDING_INITIATED, AUTHORIZING, AUTHORIZED -> ParticipantStatusDto.ONBOARDING_IN_PROGRESS;
case ONBOARDED -> ParticipantStatusDto.ONBOARDED;
case DENIED, FAILED -> ParticipantStatusDto.DENIED;
};
}
}

0 comments on commit 6ee1ccc

Please sign in to comment.