Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "9.0.7",
"version": "10.0.12",
"commands": [
"dotnet-ef"
]
Expand Down
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,23 @@ updates:
commit-message:
include: scope
prefix: "fix: "
# Framework-aligned packages are versioned per target framework in Directory.Packages.props.
# A new major version means a new target framework block, which is added by hand.
ignore:
- dependency-name: "Microsoft.Extensions.*"
update-types: ["version-update:semver-major"]
- dependency-name: "Microsoft.EntityFrameworkCore*"
update-types: ["version-update:semver-major"]
- dependency-name: "Microsoft.AspNetCore.Authentication.JwtBearer"
update-types: ["version-update:semver-major"]
- dependency-name: "Microsoft.AspNetCore.JsonPatch"
update-types: ["version-update:semver-major"]
- dependency-name: "Microsoft.AspNetCore.Mvc.NewtonsoftJson"
update-types: ["version-update:semver-major"]
- package-ecosystem: "dotnet-sdk"
directory: "/"
schedule:
interval: "monthly"
commit-message:
include: scope
prefix: "chore: "
8 changes: 5 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ jobs:

steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
# The .NET 9 SDK supplies the net9.0 runtime for tests; global.json pins the SDK that builds.
dotnet-version: 9.0.x
global-json-file: global.json

- name: Run dotnet format
run: dotnet format jobba.sln --verify-no-changes
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build-test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Git
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token : ${{ secrets.FIREBEND_GIT_PUSH_PAT}}
fetch-depth: 0

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
# The .NET 9 SDK supplies the net9.0 runtime for tests; global.json pins the SDK that builds.
dotnet-version: 9.0.x
global-json-file: global.json

- name: Install Versionize
run: dotnet tool install --global Versionize

Expand All @@ -33,12 +40,6 @@ jobs:
if: steps.versionize.outcome != 'success'
run: echo "Skipping publishing. No release required."

- name: Setup .NET Core
if: steps.versionize.outcome == 'success'
uses: actions/setup-dotnet@v1
with:
dotnet-version: '9.0.x'

- name: Install dependencies
if: steps.versionize.outcome == 'success'
run: dotnet restore jobba.sln
Expand Down Expand Up @@ -87,7 +88,6 @@ jobs:
if: steps.versionize.outcome == 'success'
run: dotnet nuget push ./out/pack/*.nupkg --api-key ${{secrets.FIREBEND_NUGET_KEY}} --skip-duplicate --source https://api.nuget.org/v3/index.json


- name: Push version changes
if: steps.versionize.outcome == 'success'
uses: CasperWA/push-protected@v2
Expand Down
2 changes: 1 addition & 1 deletion .versionize
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"changelog": {
"header": "Lit Redis Changelog",
"header": "Jobba Changelog",
"includeAllCommits": true,
"sections": [
{
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Lit Redis Changelog
Jobba Changelog
<a name="12.0.1"></a>
## [12.0.1](https://www.github.com/firebend/jobba/releases/tag/v12.0.1) (2026-09-23)

Expand Down
12 changes: 12 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project>
<PropertyGroup>
<!-- Frameworks every packable library and test project targets. Edit this list to add or drop a framework. -->
<FirebendTargetFrameworks>net9.0;net10.0</FirebendTargetFrameworks>
<!-- Single framework for samples, benchmarks, and other runnable apps. -->
<FirebendAppTargetFramework>net10.0</FirebendAppTargetFramework>
</PropertyGroup>
<ItemGroup Condition="'$(PackageIcon)' != ''">
<!-- Embeds the repo-root icon in every package that sets PackageIcon. -->
<None Include="$(MSBuildThisFileDirectory)nuget-image.png" Pack="true" PackagePath="\" Visible="false" />
</ItemGroup>
</Project>
70 changes: 70 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>

<!--
Framework-aligned packages. Each target framework listed in FirebendTargetFrameworks
(Directory.Build.props) gets its own block with the matching servicing band.
To add a framework (for example net11.0), copy one block and change the condition and versions.
-->
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="9.0.20" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.20" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.20" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.20" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.20" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.20" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.20" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.20" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.20" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.20" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.20" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.12" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.12" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.12" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.12" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.12" />
</ItemGroup>

<!-- Packages that do not version with the framework. -->
<ItemGroup>
<PackageVersion Include="AsyncKeyedLock" Version="8.1.2" />
<PackageVersion Include="Cronos" Version="0.13.0" />
<PackageVersion Include="LitRedis.Core" Version="6.0.0" />
<!-- MassTransit v9 requires a commercial license; stay on the latest v8. -->
<PackageVersion Include="MassTransit" Version="8.5.11" />
<PackageVersion Include="MassTransit.Newtonsoft" Version="8.5.11" />
<PackageVersion Include="MassTransit.RabbitMQ" Version="8.5.11" />
<PackageVersion Include="MongoDB.Driver" Version="3.12.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="Serilog.Extensions.Hosting" Version="10.0.0" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="10.0.1" />
<PackageVersion Include="Serilog.Sinks.Console" Version="6.1.1" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="10.3.0" />
</ItemGroup>

<!-- Test packages. -->
<ItemGroup>
<PackageVersion Include="AutoFixture.AutoMoq" Version="4.18.1" />
<PackageVersion Include="coverlet.collector" Version="10.1.0" />
<!-- FluentAssertions v8 requires a commercial license; stay on the latest v7. -->
<PackageVersion Include="FluentAssertions" Version="7.2.2" />
<PackageVersion Include="Flurl.Http" Version="4.0.2" />
<PackageVersion Include="Flurl.Http.Newtonsoft" Version="0.9.1" />
<PackageVersion Include="GitHubActionsTestLogger" Version="3.0.5" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.10.1" />
<PackageVersion Include="MSTest.TestAdapter" Version="4.5.1" />
<PackageVersion Include="MSTest.TestFramework" Version="4.5.1" />
<PackageVersion Include="Neleus.LambdaCompare" Version="1.0.3" />
</ItemGroup>
</Project>
14 changes: 7 additions & 7 deletions Jobba.Core/Jobba.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Version>12.0.1</Version>
<LangVersion>latestmajor</LangVersion>
<Nullable>disable</Nullable>
<TargetFramework>net9.0</TargetFramework>
<TargetFrameworks>$(FirebendTargetFrameworks)</TargetFrameworks>
<Bumper>1</Bumper>
</PropertyGroup>

Expand All @@ -14,16 +14,16 @@
<PackageTags>firebend;Jobba;job;scheduling;durable;background;jobs</PackageTags>
<Authors>Firebend</Authors>
<RepositoryUrl>https://github.com/firebend/Jobba</RepositoryUrl>
<PackageLicenseUrl>https://github.com/firebend/Jobba/blob/main/LICENSE</PackageLicenseUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/firebend/Jobba</PackageProjectUrl>
<PackageIconUrl>https://github.com/firebend/Jobba/blob/main/nuget-image.png?raw=true</PackageIconUrl>
<PackageIcon>nuget-image.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AsyncKeyedLock" Version="8.1.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.9" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.9" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.9" />
<PackageReference Include="AsyncKeyedLock" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
</ItemGroup>


Expand Down
10 changes: 6 additions & 4 deletions Jobba.Core/Models/JobRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ namespace Jobba.Core.Models;
/// </summary>
public class JobRegistration : IJobbaEntity
{
private string _timeZoneId = "UTC";
// The TimeZoneId setter clears this cache, so it has to stay an explicit field rather than a field-backed property.
#pragma warning disable IDE0032
private TimeZoneInfo _timeZoneInfo;
#pragma warning restore IDE0032

/// <summary>
/// The Id
Expand Down Expand Up @@ -91,13 +93,13 @@ public class JobRegistration : IJobbaEntity
/// </summary>
public string TimeZoneId
{
get => _timeZoneId;
get;
set
{
_timeZoneId = value;
field = value;
_timeZoneInfo = null;
}
}
} = "UTC";

public TimeZoneInfo TimeZoneInfo => _timeZoneInfo ??= TimeZoneInfo.FindSystemTimeZoneById(TimeZoneId ?? "UTC");

Expand Down
8 changes: 3 additions & 5 deletions Jobba.Core/Models/JobbaCoreOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ public class JobbaCoreOptions
/// </summary>
public static readonly TimeSpan DefaultJobWatchInterval = TimeSpan.FromSeconds(10);

private int _staleMultiplier = 3;

/// <summary>
/// The multiplier applied to JobWatchInterval to determine when an InProgress job is considered stale.
/// If a job's LastHeartbeatTime is older than (JobWatchInterval × StaleMultiplier), it will be reclaimed.
Expand All @@ -27,9 +25,9 @@ public class JobbaCoreOptions
/// <exception cref="ArgumentOutOfRangeException">Thrown when value is less than 1.</exception>
public int StaleMultiplier
{
get => _staleMultiplier;
set => _staleMultiplier = value < 1
get;
set => field = value < 1
? throw new ArgumentOutOfRangeException(nameof(StaleMultiplier), "StaleMultiplier must be at least 1.")
: value;
}
} = 3;
}
8 changes: 4 additions & 4 deletions Jobba.Cron/Jobba.Cron.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFrameworks>$(FirebendTargetFrameworks)</TargetFrameworks>
<Version>12.0.1</Version>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>
Expand All @@ -12,17 +12,17 @@
<PackageTags>firebend;Jobba;job;scheduling;durable;background;jobs;cron</PackageTags>
<Authors>Firebend</Authors>
<RepositoryUrl>https://github.com/firebend/Jobba</RepositoryUrl>
<PackageLicenseUrl>https://github.com/firebend/Jobba/blob/main/LICENSE</PackageLicenseUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/firebend/Jobba</PackageProjectUrl>
<PackageIconUrl>https://github.com/firebend/Jobba/blob/main/nuget-image.png?raw=true</PackageIconUrl>
<PackageIcon>nuget-image.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Jobba.Core\Jobba.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Cronos" Version="0.11.1" />
<PackageReference Include="Cronos" />
</ItemGroup>

</Project>
18 changes: 9 additions & 9 deletions Jobba.IntegrationTests/Jobba.IntegrationTests.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFrameworks>$(FirebendTargetFrameworks)</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="8.7.1" />
<PackageReference Include="Flurl.Http.Newtonsoft" Version="0.9.1" />
<PackageReference Include="Flurl.Http" Version="4.0.2" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1">
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Flurl.Http.Newtonsoft" />
<PackageReference Include="Flurl.Http" />
<PackageReference Include="GitHubActionsTestLogger">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.11.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.11.0" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MSTest.TestAdapter" />
<PackageReference Include="MSTest.TestFramework" />
<PackageReference Include="coverlet.collector">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions Jobba.MassTransit/Jobba.MassTransit.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFrameworks>$(FirebendTargetFrameworks)</TargetFrameworks>
<Version>12.0.1</Version>
<LangVersion>latestmajor</LangVersion>
<Nullable>disable</Nullable>
Expand All @@ -13,17 +13,17 @@
<PackageTags>firebend;Jobba;job;scheduling;durable;background;jobs;masstransit;events</PackageTags>
<Authors>Firebend</Authors>
<RepositoryUrl>https://github.com/firebend/Jobba</RepositoryUrl>
<PackageLicenseUrl>https://github.com/firebend/Jobba/blob/main/LICENSE</PackageLicenseUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/firebend/Jobba</PackageProjectUrl>
<PackageIconUrl>https://github.com/firebend/Jobba/blob/main/nuget-image.png?raw=true</PackageIconUrl>
<PackageIcon>nuget-image.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Jobba.Core\Jobba.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="MassTransit" Version="8.5.3" />
<PackageReference Include="MassTransit" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions Jobba.Redis/Jobba.Redis.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFrameworks>$(FirebendTargetFrameworks)</TargetFrameworks>
<Version>12.0.1</Version>
<LangVersion>latestmajor</LangVersion>
<Nullable>disable</Nullable>
Expand All @@ -13,13 +13,13 @@
<PackageTags>firebend;Jobba;job;scheduling;durable;background;jobs;redis;locking;distributed</PackageTags>
<Authors>Firebend</Authors>
<RepositoryUrl>https://github.com/firebend/Jobba</RepositoryUrl>
<PackageLicenseUrl>https://github.com/firebend/Jobba/blob/main/LICENSE</PackageLicenseUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/firebend/Jobba</PackageProjectUrl>
<PackageIconUrl>https://github.com/firebend/Jobba/blob/main/nuget-image.png?raw=true</PackageIconUrl>
<PackageIcon>nuget-image.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LitRedis.Core" Version="5.0.0" />
<PackageReference Include="LitRedis.Core" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading
Loading