Skip to content

Commit

Permalink
Merge pull request #1064 from eventflow/prepare-v1-1
Browse files Browse the repository at this point in the history
v1: Prepare 1.1
  • Loading branch information
rasmus authored Dec 8, 2024
2 parents 0a55bce + c621ae7 commit cd4ec5a
Show file tree
Hide file tree
Showing 12 changed files with 88 additions and 277 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
2.1.x
3.1.x
6.0.x
8.0.x
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
File renamed without changes.
55 changes: 40 additions & 15 deletions .github/workflows/ci.yml → .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,47 @@
name: CI
name: pipeline

on:
push:
branches: [ develop-v1 ]
pull_request:
branches: [ develop-v1 ]
workflow_call:
inputs:
# REQUIRED ============================
version:
required: true
type: string
# OPTIONAL ============================
bake-convention:
required: false
default: 'default'
type: string
bake-version:
required: false
type: string
default: '0.30.43-beta'
environment:
required: false
type: string
default: 'develop'
secrets:
nuget-api-key:
required: false

jobs:
build:
runs-on: ubuntu-20.04
runs-on:
- ubuntu-20.04

environment:
name: ${{ inputs.environment }}

env:
HELPZ_POSTGRESQL_PASS: Password12!
EVENTFLOW_MSSQL_SERVER: 127.0.0.1,1433
EVENTFLOW_MSSQL_USER: sa
EVENTFLOW_MSSQL_PASS: Password12!
EVENTFLOW_MSSQL_PASS: Password12!
NUGET_APIKEY: ${{ secrets.nuget-api-key }}

services:
rabbitmq:
image: rabbitmq:3.12.0-management-alpine
image: rabbitmq:3-management-alpine
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
Expand Down Expand Up @@ -65,7 +89,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version:
dotnet-version: |
3.1.x
6.0.x
8.0.x
Expand All @@ -76,19 +100,20 @@ jobs:

# https://github.com/rasmus/Bake
- name: Install Bake
run: dotnet tool install -g --version 0.30.43-beta Bake
run: dotnet tool install -g --version ${{ inputs.bake-version }} Bake

- name: Run Bake
run: |
declare -i REVISION
REVISION=5000+$GITHUB_RUN_NUMBER
bake run --build-version 1.0.$REVISION
env:
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
run: |
bake run \
--convention=${{ inputs.bake-convention }} \
--build-version ${{ inputs.version }} \
--destination="nuget>github,nuget,release>github"
- name: Upload NuGet packages
uses: actions/upload-artifact@v4
if: success() || failure()
if: success()
with:
name: packages
path: "**/*nupkg"
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/pull-requests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: pull-requests

on:
push:
branches: [ develop-v1 ]
pull_request:
branches: [ develop-v1 ]

permissions:
contents: read

jobs:
pipeline:
uses: ./.github/workflows/pipeline.yaml
with:
version: "1.1.0-pr${{ github.event.number }}-b${{ github.run_number }}"
19 changes: 19 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: release

on:
push:
branches: [ release-v1 ]

permissions:
contents: write
packages: write

jobs:
pipeline:
uses: ./.github/workflows/pipeline.yaml
with:
bake-convention: 'Release'
environment: 'release'
version: "1.1.0"
secrets:
nuget-api-key: ${{ secrets.NUGET_APIKEY }}
101 changes: 0 additions & 101 deletions .github/workflows/release.yml

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Test report
name: test reports

on:
workflow_run:
workflows:
- 'CI'
- 'Release'
- 'pull-requests'
- 'release'
types:
- completed

Expand Down
4 changes: 2 additions & 2 deletions Documentation/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ public class ExampleEvent : AggregateEvent<ExampleAggregate, ExampleId>
}
```

We have applied the `[EventVersion("example", 1)]` to our event, marking it as the `example` event version `1`, which directly corresponds to the `event_name` and `event_version` from the metadata stored alongside the event mentioned. The information is used by EventFlow to tie the name and version to a specific .NET type.
We have applied the `[EventVersion("example", 1)]` to our event, marking it as the `example` event version `1`, which directly corresponds to the `event_name` and `event_version` from the metadata stored alongside the event mentioned. The information is used by EventFlow to tie the name and version to a specific .NET type. This is important when reading events from the event store as EventFlow needs to know which type to deserialize the event to. If an alternative default naming convention is needed, read our section on [event naming strategies](additional/event-naming-strategies.md).

!!! warning
Even though using the `EventVersion` attribute is optional, it is **highly recommended**. EventFlow will infer the information if it isn't provided, thus making it vulnerable to type renames among other things.
Even though using the `EventVersion` attribute is optional, it is **highly recommended**. EventFlow will infer the information if it isn't provided, thus making it vulnerable to type renames among other things. Read our section on [event naming strategies](additional/event-naming-strategies.md) if an alternative default naming convention is needed.

!!! danger
Once you have aggregates in your production environment that have emitted an event, you should never change the .NET implementation of the event! You can deprecate it, but you should never change the type or the data stored in the event store. If the event type is changed, EventFlow will not be able to deserialize the event and can produce unexpected results when reading old aggregates.
Expand Down
8 changes: 7 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
### New in 1.0 (not properly released yet)
### New in 1.1.0 (not released yet)

* New: More control of event naming by introducing the interface `IEventNamingStrategy`, see the
updated documentation at https://geteventflow.net/additional/event-naming-strategies/ for more
information (thanks @SeWaS)

### New in 1.0.5007 (released 2024-11-16)

Read the complete migration guide to get the full list of changes as well as recommendations
on how to do the migration.
Expand Down
17 changes: 0 additions & 17 deletions Test.runsettings

This file was deleted.

Loading

0 comments on commit cd4ec5a

Please sign in to comment.