Skip to content

Commit d85711a

Browse files
authored
Merge pull request #2300 from Cratis/15.0.0
Version 15.0.0
2 parents b9e6f85 + 411e22f commit d85711a

File tree

1,828 files changed

+56811
-18260
lines changed

Some content is hidden

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

1,828 files changed

+56811
-18260
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,5 @@ dotnet_diagnostic.MA0096.severity = none
200200
dotnet_diagnostic.MA0097.severity = none
201201
dotnet_diagnostic.MA0132.severity = none
202202
dotnet_diagnostic.MA0134.severity = none
203+
dotnet_diagnostic.MA0136.severity = none
203204
dotnet_diagnostic.ORLEANS0010.severity = none

.github/copilot-instructions.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@
88
- Never change package.json or package-lock.json files unless explicitly asked to.
99
- Never change NuGet.config files unless explicitly asked to.
1010
- Never leave unused using statements in the code.
11-
- Always ensure that the code compiles without warnings.
1211
- Always ensure that the code passes all tests.
1312
- Always ensure that the code adheres to the project's coding standards.
1413
- Always ensure that the code is maintainable.
14+
- Review Directory.Build.props and .editorconfig for all warnings configured as errors
15+
- Never generate code that would violate these warning settings
16+
- Always respect the project's nullable reference type settings
17+
- Add `!` operator where nullability warnings occur
18+
- Use `is not null` checks before dereferencing potentially null values
19+
- Always reuse the active terminal for commands.
20+
- Do not create new terminals unless current one is busy or fails.
1521

1622
## Formatting
1723

.github/instructions/documentation.instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ applyTo: "Documentation/**/*.md"
4444
- When linking to a folder in a `toc.yml` file, link to the `toc.yml` file in that folder, not to an `index.md` file.
4545
- Ensure that documentation is accurate according to the public APIs and features of the project.
4646
- When writing documentation that involves specifying an event type with the `[EventType]` attribute, never add an explicit name - just keep it as `[EventType]`.
47+
- Never include code from the repository to explain public APIs - these might change and become outdated.
48+
- Always write documentation from the perspective of an end user of the public APIs and features of the project.
49+
- We prefer `record` types for data structures such as events, commands, and read models in code examples within the documentation.

.github/workflows/dotnet-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ jobs:
116116
- 'for_JobsManager'
117117
- 'for_Reactors'
118118
- 'for_Reducers'
119+
- 'for_Webhooks'
120+
- 'Jobs'
119121
- 'Projections'
120-
- 'AggregateRoots'
121122
continue-on-error: true
122123
env:
123124
NAMESPACE: Cratis.Chronicle.InProcess.Integration.${{ matrix.namespace }}

.github/workflows/publish.yml

Lines changed: 164 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ env:
77
DOTNET_VERSION: "10.0.x"
88
DOTNET_X64_CACHE: "dotnet-x64-cache-${{ github.sha }}"
99
DOTNET_ARM64_CACHE: "dotnet-arm64-cache-${{ github.sha }}"
10+
DOTNET_NUGET_CACHE: "dotnet-nuget-cache-${{ github.sha }}"
1011
WORKBENCH_CACHE: "web-cache-${{ github.sha }}"
1112

1213
on:
@@ -45,6 +46,7 @@ jobs:
4546
outputs:
4647
version: ${{ steps.release.outputs.version }}
4748
publish: ${{ steps.release.outputs.should-publish }}
49+
prerelease: ${{ steps.release.outputs.prerelease }}
4850

4951
steps:
5052
- name: Checkout code
@@ -143,7 +145,12 @@ jobs:
143145

144146
- name: Build x64 Kernel - self contained, ready to run
145147
working-directory: ./Source/Kernel/Server
146-
run: dotnet publish -c Release -f net10.0 -r linux-x64 -p:PublishReadyToRun=true -p:DisableProxyGenerator=true --self-contained -o out/x64
148+
run: |
149+
dotnet publish -c Release -f net10.0 -r linux-x64 -p:PublishReadyToRun=true -p:DisableProxyGenerator=true -p:Version=${{ needs.release.outputs.version }} -p:SourceRevisionId=${{ github.sha }} --self-contained -o out/x64
150+
env:
151+
CHRONICLE_CERT_BASE64: ${{ secrets.CHRONICLE_CERT_BASE64 }}
152+
CHRONICLE_CERT_PASSWORD: ${{ secrets.CHRONICLE_CERT_PASSWORD }}
153+
147154

148155
dotnet-arm64:
149156
if: needs.release.outputs.publish == 'true'
@@ -170,7 +177,12 @@ jobs:
170177

171178
- name: Build arm64 Kernel - self contained, ready to run
172179
working-directory: ./Source/Kernel/Server
173-
run: dotnet publish -c Release -f net10.0 -r linux-arm64 -p:PublishReadyToRun=true -p:DisableProxyGenerator=true --self-contained -o out/arm64
180+
run: |
181+
dotnet publish -c Release -f net10.0 -r linux-arm64 -p:PublishReadyToRun=true -p:DisableProxyGenerator=true -p:Version=${{ needs.release.outputs.version }} -p:SourceRevisionId=${{ github.sha }} --self-contained -o out/arm64
182+
env:
183+
CHRONICLE_CERT_BASE64: ${{ secrets.CHRONICLE_CERT_BASE64 }}
184+
CHRONICLE_CERT_PASSWORD: ${{ secrets.CHRONICLE_CERT_PASSWORD }}
185+
174186

175187
workbench:
176188
if: needs.release.outputs.publish == 'true'
@@ -211,8 +223,11 @@ jobs:
211223
working-directory: ./Source/Workbench/Web
212224
run: |
213225
yarn build
226+
env:
227+
CHRONICLE_VERSION: ${{ needs.release.outputs.version }}
228+
CHRONICLE_COMMIT_SHA: ${{ github.sha }}
214229

215-
publish-nuget-packages:
230+
dotnet:
216231
if: needs.release.outputs.publish == 'true'
217232
runs-on: ubuntu-latest
218233
needs: [release, workbench]
@@ -237,15 +252,119 @@ jobs:
237252
238253
- name: Remove any existing artifacts
239254
run: rm -rf ${{ env.NUGET_OUTPUT }}
255+
256+
257+
240258
- name: Build
241-
run: dotnet build -p:IsPackaging=true --configuration Release -p:DisableProxyGenerator=true -p:DisableDockerBuild=true -p:Version=${{ needs.release.outputs.version }}
259+
run: dotnet build -p:IsPackaging=true --configuration Release -p:DisableProxyGenerator=true -p:DisableDockerBuild=true -p:Version=${{ needs.release.outputs.version }} -p:SourceRevisionId=${{ github.sha }}
260+
242261
- name: Build repackaged clients
243-
run: dotnet build -p:IsPackaging=true --configuration Release -p:Repack=true -p:Publish=true -p:DisableProxyGenerator=true -p:DisableDockerBuild=true -p:Version=${{ needs.release.outputs.version }} -maxcpucount:1
262+
run: dotnet build -p:IsPackaging=true --configuration Release -p:Repack=true -p:Publish=true -p:DisableProxyGenerator=true -p:DisableDockerBuild=true -p:Version=${{ needs.release.outputs.version }} -p:SourceRevisionId=${{ github.sha }} -maxcpucount:1
244263
working-directory: ./Source/Clients
245264

246265
- name: Create NuGet packages
247266
run: dotnet pack -p:IsPackaging=true --no-build --configuration Release -o ${{ env.NUGET_OUTPUT }} -p:PackageVersion=${{ needs.release.outputs.version }}
248267

268+
- uses: actions/cache@v3
269+
id: nuget-packages-output
270+
with:
271+
path: ${{ env.NUGET_OUTPUT }}
272+
key: ${{ env.DOTNET_NUGET_CACHE }}
273+
274+
dotnet-x64-development:
275+
if: needs.release.outputs.publish == 'true'
276+
runs-on: ubuntu-latest
277+
needs: [release]
278+
279+
steps:
280+
- name: Checkout code
281+
uses: actions/checkout@v4
282+
283+
- name: Setup .Net
284+
uses: actions/setup-dotnet@v4
285+
with:
286+
dotnet-version: |
287+
${{ env.DOTNET8_VERSION }}
288+
${{ env.DOTNET9_VERSION }}
289+
${{ env.DOTNET_VERSION }}
290+
291+
- uses: actions/cache@v3
292+
id: dotnet-x64-development-output
293+
with:
294+
path: ./Source/Kernel/Server/out/development/x64
295+
key: ${{ env.DOTNET_X64_CACHE }}-development
296+
297+
- name: Build development x64 Kernel (DEVELOPMENT symbol)
298+
working-directory: ./Source/Kernel/Server
299+
run: |
300+
dotnet publish -c Debug -f net10.0 -r linux-x64 -p:DefineConstants=DEVELOPMENT -o out/development/x64
301+
302+
303+
- name: Upload development outputs
304+
uses: actions/upload-artifact@v4
305+
with:
306+
name: kernel-development-out
307+
path: ./Source/Kernel/Server/out/development
308+
309+
dotnet-arm64-development:
310+
if: needs.release.outputs.publish == 'true'
311+
runs-on: ubuntu-24.04-arm
312+
needs: [release]
313+
314+
steps:
315+
- name: Checkout code
316+
uses: actions/checkout@v4
317+
318+
- name: Setup .Net
319+
uses: actions/setup-dotnet@v4
320+
with:
321+
dotnet-version: |
322+
${{ env.DOTNET8_VERSION }}
323+
${{ env.DOTNET9_VERSION }}
324+
${{ env.DOTNET_VERSION }}
325+
326+
- uses: actions/cache@v3
327+
id: dotnet-arm64-development-output
328+
with:
329+
path: ./Source/Kernel/Server/out/development/arm64
330+
key: ${{ env.DOTNET_ARM64_CACHE }}-development
331+
332+
- name: Build development arm64 Kernel (DEVELOPMENT symbol)
333+
working-directory: ./Source/Kernel/Server
334+
run: |
335+
dotnet publish -c Debug -f net10.0 -r linux-arm64 -p:DefineConstants=DEVELOPMENT -o out/development/arm64
336+
337+
338+
- name: Upload development outputs
339+
uses: actions/upload-artifact@v4
340+
with:
341+
name: kernel-development-out
342+
path: ./Source/Kernel/Server/out/development
343+
344+
publish-nuget-packages:
345+
if: needs.release.outputs.publish == 'true'
346+
runs-on: ubuntu-latest
347+
needs: [release, dotnet]
348+
349+
steps:
350+
- name: Checkout code
351+
uses: actions/checkout@v4
352+
353+
- uses: actions/cache@v3
354+
id: nuget-packages-output
355+
with:
356+
path: ${{ env.NUGET_OUTPUT }}
357+
key: ${{ env.DOTNET_NUGET_CACHE }}
358+
fail-on-cache-miss: true
359+
360+
- name: Setup .Net
361+
uses: actions/setup-dotnet@v4
362+
with:
363+
dotnet-version: |
364+
${{ env.DOTNET8_VERSION }}
365+
${{ env.DOTNET9_VERSION }}
366+
${{ env.DOTNET_VERSION }}
367+
249368
- name: Push NuGet packages
250369
run: dotnet nuget push --skip-duplicate '${{ env.NUGET_OUTPUT }}/*.nupkg' --timeout 900 --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
251370

@@ -263,6 +382,7 @@ jobs:
263382
with:
264383
path: ./Source/Kernel/Server/out/x64
265384
key: ${{ env.DOTNET_X64_CACHE }}
385+
fail-on-cache-miss: true
266386

267387
- uses: actions/cache@v3
268388
id: dotnet-arm64-output
@@ -291,6 +411,17 @@ jobs:
291411
username: ${{ secrets.DOCKER_USERNAME }}
292412
password: ${{ secrets.DOCKER_PASSWORD }}
293413

414+
- name: Prepare Docker tags
415+
id: docker-tags
416+
run: |
417+
TAGS="cratis/chronicle:${{ needs.release.outputs.version }}"
418+
if [ "${{ needs.release.outputs.prerelease }}" != "true" ]; then
419+
TAGS="${TAGS}\ncratis/chronicle:latest"
420+
fi
421+
echo "tags<<EOF" >> $GITHUB_OUTPUT
422+
echo -e "$TAGS" >> $GITHUB_OUTPUT
423+
echo "EOF" >> $GITHUB_OUTPUT
424+
294425
- name: Build Production Docker Image
295426
uses: docker/build-push-action@v5
296427
with:
@@ -299,9 +430,7 @@ jobs:
299430
file: ./Docker/Production/Dockerfile
300431
platforms: linux/amd64,linux/arm64
301432
push: true
302-
tags: |
303-
cratis/chronicle:${{ needs.release.outputs.version }}
304-
cratis/chronicle:latest
433+
tags: ${{ steps.docker-tags.outputs.tags }}
305434
build-args: |
306435
VERSION=${{ needs.release.outputs.version }}
307436
@@ -319,6 +448,7 @@ jobs:
319448
with:
320449
path: ./Source/Workbench/Web/wwwroot
321450
key: ${{ env.WORKBENCH_CACHE }}
451+
fail-on-cache-miss: true
322452

323453
- name: Set up QEMU
324454
uses: docker/setup-qemu-action@master
@@ -335,16 +465,25 @@ jobs:
335465
username: ${{ secrets.DOCKER_USERNAME }}
336466
password: ${{ secrets.DOCKER_PASSWORD }}
337467

468+
- name: Prepare Docker tags
469+
id: docker-tags
470+
run: |
471+
TAGS="cratis/chronicle:${{ needs.release.outputs.version }}-workbench"
472+
if [ "${{ needs.release.outputs.prerelease }}" != "true" ]; then
473+
TAGS="${TAGS}\ncratis/chronicle:latest-workbench"
474+
fi
475+
echo "tags<<EOF" >> $GITHUB_OUTPUT
476+
echo -e "$TAGS" >> $GITHUB_OUTPUT
477+
echo "EOF" >> $GITHUB_OUTPUT
478+
338479
- name: Build Workbench Image
339480
uses: docker/build-push-action@v5
340481
with:
341482
builder: ${{ steps.buildx.outputs.name }}
342483
context: .
343484
file: ./Docker/Workbench/Dockerfile
344485
push: true
345-
tags: |
346-
cratis/chronicle:${{ needs.release.outputs.version }}-workbench
347-
cratis/chronicle:latest-workbench
486+
tags: ${{ steps.docker-tags.outputs.tags }}
348487
build-args: |
349488
VERSION=${{ needs.release.outputs.version }}
350489
@@ -362,12 +501,14 @@ jobs:
362501
with:
363502
path: ./Source/Kernel/Server/out/x64
364503
key: ${{ env.DOTNET_X64_CACHE }}
504+
fail-on-cache-miss: true
365505

366506
- uses: actions/cache@v3
367507
id: dotnet-arm64-output
368508
with:
369509
path: ./Source/Kernel/Server/out/arm64
370510
key: ${{ env.DOTNET_ARM64_CACHE }}
511+
fail-on-cache-miss: true
371512

372513
- uses: actions/cache@v3
373514
id: workbench-output
@@ -390,6 +531,17 @@ jobs:
390531
username: ${{ secrets.DOCKER_USERNAME }}
391532
password: ${{ secrets.DOCKER_PASSWORD }}
392533

534+
- name: Prepare Docker tags
535+
id: docker-tags
536+
run: |
537+
TAGS="cratis/chronicle:${{ needs.release.outputs.version }}-development"
538+
if [ "${{ needs.release.outputs.prerelease }}" != "true" ]; then
539+
TAGS="${TAGS}\ncratis/chronicle:latest-development"
540+
fi
541+
echo "tags<<EOF" >> $GITHUB_OUTPUT
542+
echo -e "$TAGS" >> $GITHUB_OUTPUT
543+
echo "EOF" >> $GITHUB_OUTPUT
544+
393545
- name: Build Development Docker Image
394546
uses: docker/build-push-action@v5
395547
with:
@@ -398,9 +550,7 @@ jobs:
398550
file: ./Docker/Development/Dockerfile
399551
platforms: linux/amd64,linux/arm64
400552
push: true
401-
tags: |
402-
cratis/chronicle:${{ needs.release.outputs.version }}-development
403-
cratis/chronicle:latest-development
553+
tags: ${{ steps.docker-tags.outputs.tags }}
404554
build-args: |
405555
VERSION=${{ needs.release.outputs.version }}
406556

0 commit comments

Comments
 (0)