Skip to content

Commit 2db8b16

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/resource-based-routing
# Conflicts: # gradle/libs.versions.toml # model-server/src/main/kotlin/org/modelix/model/server/handlers/ModelReplicationServer.kt
2 parents fab8809 + 1eacc95 commit 2db8b16

File tree

108 files changed

+2532
-1960
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+2532
-1960
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/bulk-model-sync-gradle/ @mhuster23
44
/bulk-model-sync-gradle-test/ @mhuster23
55
/bulk-model-sync-lib/ @mhuster23
6+
/bulk-model-sync-mps/ @mhuster23
67
/bulk-model-sync-solution/ @mhuster23
78
/light-model-client/ @slisson
89
/metamodel-export/ @slisson
Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
name: Release
1+
name: Dry-Run Release
22
on:
3-
push:
4-
branches:
5-
- main
6-
pull_request: {}
3+
pull_request:
74

85
jobs:
96
lint-commits:
107
name: Lint PR commits
118
runs-on: ubuntu-latest
12-
if: ${{ github.event_name == 'pull_request' }}
139
steps:
1410
- uses: actions/checkout@v3
1511
with:
@@ -19,7 +15,6 @@ jobs:
1915
test-release:
2016
name: Dry-run semantic-release
2117
runs-on: ubuntu-latest
22-
if: ${{ github.event_name == 'pull_request' }}
2318
steps:
2419
- name: Checkout
2520
uses: actions/checkout@v3
@@ -48,29 +43,3 @@ jobs:
4843
# configuration from the CI environment by removing the variable that
4944
# is used for CI detection.
5045
run: unset GITHUB_ACTIONS && npx semantic-release --dry-run --ci false
51-
52-
release:
53-
name: Run semantic release
54-
runs-on: ubuntu-latest
55-
if: ${{ github.ref == 'refs/heads/main' }}
56-
steps:
57-
- name: Checkout
58-
uses: actions/checkout@v3
59-
with:
60-
fetch-depth: 0
61-
token: ${{ secrets.RELEASE_TOKEN }}
62-
- name: Setup Node.js
63-
uses: actions/setup-node@v3
64-
with:
65-
node-version: 18
66-
- name: Cache Node packages
67-
uses: actions/cache@v3
68-
with:
69-
path: node_modules
70-
key: release-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
71-
- name: Install dependencies
72-
run: npm ci
73-
- name: Release
74-
env:
75-
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
76-
run: npx semantic-release

.github/workflows/mps-compatibility.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,10 @@ jobs:
3333
- name: Set up Gradle
3434
uses: gradle/gradle-build-action@v2
3535
- name: Build with ${{ matrix.version }}
36-
run: ./gradlew --build-cache :mps-model-adapters:build :mps-model-server-plugin:build -Pmps.version=${{ matrix.version }}
36+
run: >-
37+
./gradlew --build-cache
38+
:bulk-model-sync-mps:build
39+
:metamodel-export:build
40+
:mps-model-adapters:build
41+
:mps-model-server-plugin:build
42+
-Pmps.version=${{ matrix.version }}

.github/workflows/publish.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,21 @@ jobs:
2929
- name: Use tag as version
3030
run: echo "${GITHUB_REF#refs/*/}" > version.txt
3131
- name: Build and Publish Artifacts
32-
run: ./gradlew --build-cache build publish -PciBuild=true -Partifacts.itemis.cloud.user=${{secrets.ARTIFACTS_ITEMIS_CLOUD_USER}} -Partifacts.itemis.cloud.pw=${{secrets.ARTIFACTS_ITEMIS_CLOUD_PW}} -Pgpr.user=${{ github.actor }} -Pgpr.key=${{ secrets.GITHUB_TOKEN }} -Pgpr.universalkey=${{ secrets.GHP_UNIVERSAL_PUBLISH_TOKEN }}
32+
# We run gradle with --info to debug the ongoing random publishing
33+
# issues. Gradle would log upload retries on info level:
34+
# https://github.com/gradle/gradle/blob/2e843f089f969940e505e69eb0742ed4fbf67993/platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/transport/NetworkOperationBackOffAndRetry.java#L64
35+
# Maybe retries are the source of our duplicate publication attempts.
36+
run: >-
37+
./gradlew --build-cache build publish
38+
--info
39+
-PciBuild=true
40+
-Partifacts.itemis.cloud.user=${{ secrets.ARTIFACTS_ITEMIS_CLOUD_USER }}
41+
-Partifacts.itemis.cloud.pw=${{ secrets.ARTIFACTS_ITEMIS_CLOUD_PW }}
42+
-Pgpr.user=${{ github.actor }}
43+
-Pgpr.key=${{ secrets.GITHUB_TOKEN }}
44+
-Pgpr.universalkey=${{ secrets.GHP_UNIVERSAL_PUBLISH_TOKEN }}
45+
-Porg.gradle.internal.http.connectionTimeout=180000
46+
-Porg.gradle.internal.http.socketTimeout=180000
3347
env:
3448
NODE_AUTH_TOKEN: ${{ secrets.ARTIFACTS_ITEMIS_CLOUD_NPM_TOKEN }}
3549
- name: Set up QEMU

.github/workflows/release.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 2 * * *' # run at 2 AM UTC
6+
7+
jobs:
8+
release:
9+
name: Run semantic release
10+
runs-on: ubuntu-latest
11+
if: ${{ github.ref == 'refs/heads/main' }}
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
token: ${{ secrets.RELEASE_TOKEN }}
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 18
22+
- name: Cache Node packages
23+
uses: actions/cache@v3
24+
with:
25+
path: node_modules
26+
key: release-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
27+
- name: Install dependencies
28+
run: npm ci
29+
- name: Release
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
32+
run: npx semantic-release

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.gradle/
22
/build/
33
/*/build/
4+
/*/ignite/
45
.DS_Store
56
.gradletasknamecache
67
.idea/

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
additional_dependencies: ["@commitlint/config-angular"]
2525
args: ["--config", "./commitlint.config.js"]
2626
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
27-
rev: v2.10.0
27+
rev: v2.12.0
2828
hooks:
2929
- id: pretty-format-kotlin
3030
args:

build.gradle.kts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,24 @@ subprojects {
168168

169169
allprojects {
170170
repositories {
171-
mavenLocal()
172-
maven { url = uri("https://artifacts.itemis.cloud/repository/maven-mps/") }
173-
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven") }
174-
mavenCentral()
171+
val modelixRegex = "org\\.modelix.*"
172+
mavenLocal {
173+
content {
174+
includeGroupByRegex(modelixRegex)
175+
}
176+
}
177+
maven {
178+
url = uri("https://artifacts.itemis.cloud/repository/maven-mps/")
179+
content {
180+
includeGroupByRegex(modelixRegex)
181+
includeGroup("com.jetbrains") // for our mps dependencies
182+
}
183+
}
184+
mavenCentral {
185+
content {
186+
excludeGroupByRegex(modelixRegex)
187+
}
188+
}
175189
}
176190

177191
publishing {

bulk-model-sync-gradle-test/build.gradle.kts

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,29 @@ val modelixCoreVersion: String = file("../version.txt").readText()
2424
version = modelixCoreVersion
2525

2626
repositories {
27-
mavenLocal()
28-
maven { url = uri("https://repo.maven.apache.org/maven2") }
29-
maven { url = uri("https://plugins.gradle.org/m2/") }
30-
mavenCentral()
31-
maven { url = uri("https://artifacts.itemis.cloud/repository/maven-mps/") }
27+
val modelixRegex = "org\\.modelix.*"
28+
mavenLocal {
29+
content {
30+
includeGroupByRegex(modelixRegex)
31+
}
32+
}
33+
gradlePluginPortal {
34+
content {
35+
excludeGroupByRegex(modelixRegex)
36+
}
37+
}
38+
maven {
39+
url = uri("https://artifacts.itemis.cloud/repository/maven-mps/")
40+
content {
41+
includeGroupByRegex(modelixRegex)
42+
includeGroup("com.jetbrains")
43+
}
44+
}
45+
mavenCentral {
46+
content {
47+
excludeGroupByRegex(modelixRegex)
48+
}
49+
}
3250
}
3351

3452
val kotlinGenDir = project.layout.buildDirectory.dir("metamodel/kotlin").get().asFile.apply { mkdirs() }
@@ -84,15 +102,15 @@ modelSync {
84102
repositoryDir = repoDir
85103
}
86104
toModelServer {
87-
url = "http://0.0.0.0:28309/v2"
105+
url = "http://localhost:28309/v2"
88106
repositoryId = "ci-test"
89107
branchName = "master"
90108
}
91109
}
92110
direction("testPull") {
93111
includeModule("GraphSolution")
94112
fromModelServer {
95-
url = "http://0.0.0.0:28309/v2"
113+
url = "http://localhost:28309/v2"
96114
repositoryId = "ci-test"
97115
branchName = "master"
98116
}

bulk-model-sync-gradle-test/ci.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,8 @@ fi
2121

2222
./gradlew runModelServer --console=plain &
2323
MODEL_SERVER_PID=$!
24-
sleep 5
2524

26-
#CI needs more time
27-
if [ "${CI}" = "true" ]; then
28-
sleep 10
29-
fi
30-
31-
curl -X POST http://127.0.0.1:28309/v2/repositories/ci-test/init
25+
curl -X GET --retry 30 --retry-connrefused --retry-delay 1 http://localhost:28309/health
3226

3327
./gradlew runSyncTestPush --console=plain --stacktrace
3428
./gradlew test --tests 'PushTest'

0 commit comments

Comments
 (0)