Skip to content

Commit

Permalink
Merge pull request ravendb#18831 from ppekrol/release/v5.4
Browse files Browse the repository at this point in the history
5.4 to release/5.4 merge
  • Loading branch information
ppekrol authored Jul 10, 2024
2 parents 567734c + 1877996 commit 5145dfd
Show file tree
Hide file tree
Showing 201 changed files with 3,904 additions and 535 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/FastTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- v5.4

env:
DOTNET_VERSION: 8.0.300
DOTNET_VERSION: 8.0.303


jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/FastTestsARM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- cron: '30 6 * * *'

env:
DOTNET_VERSION: 8.0.300
DOTNET_VERSION: 8.0.303

jobs:
release:
Expand Down
2 changes: 1 addition & 1 deletion bench/BulkInsert.Benchmark/BulkInsert.Benchmark.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeFrameworkVersion>8.0.5</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>8.0.7</RuntimeFrameworkVersion>
<AssemblyName>BulkInsert.Benchmark</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>BulkInsert.Benchmark</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion bench/Indexing.Benchmark/Indexing.Benchmark.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeFrameworkVersion>8.0.5</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>8.0.7</RuntimeFrameworkVersion>
<AssemblyName>Indexing.Benchmark</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Indexing.Benchmark</PackageId>
Expand Down
4 changes: 3 additions & 1 deletion bench/Micro.Benchmark/Micro.Benchmark.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeFrameworkVersion>8.0.5</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>8.0.7</RuntimeFrameworkVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>Micro.Benchmark</AssemblyName>
<OutputType>Exe</OutputType>
Expand All @@ -15,6 +15,8 @@
<ItemGroup>
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.12" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
</ItemGroup>
Expand Down
4 changes: 3 additions & 1 deletion bench/Regression.Benchmark/Regression.Benchmark.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeFrameworkVersion>8.0.5</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>8.0.7</RuntimeFrameworkVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>Regression.Benchmark</AssemblyName>
<PackageId>Regression.Benchmark</PackageId>
Expand All @@ -16,6 +16,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Microsoft.NETCore.Jit" Version="2.0.8" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RuntimeFrameworkVersion>8.0.5</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>8.0.7</RuntimeFrameworkVersion>
<CodeAnalysisRuleSet>..\..\RavenDB.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeFrameworkVersion>8.0.5</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>8.0.7</RuntimeFrameworkVersion>
<AssemblyName>Subscriptions.Benchmark</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Subscriptions.Benchmark</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion bench/TimeSeries.Benchmark/TimeSeries.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RuntimeFrameworkVersion>8.0.5</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>8.0.7</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion bench/Voron.Benchmark/Voron.Benchmark.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeFrameworkVersion>8.0.5</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>8.0.7</RuntimeFrameworkVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>Voron.Benchmark</AssemblyName>
<OutputType>Exe</OutputType>
Expand Down
26 changes: 25 additions & 1 deletion docker/common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ function GetUbuntuImageTags($repo, $version, $arch) {
switch ($arch) {
"x64" {
return @(
"$($repo):latest-lts",
"$($repo):ubuntu-latest-lts",
"$($repo):5.4-ubuntu-latest",
"$($repo):$($version)-ubuntu.22.04-x64"
Expand Down Expand Up @@ -89,3 +88,28 @@ function GetWindowsImageTags($repo, $version, $WinVer) {
}

}

function GetManifestTags {
param (
$repo
)

return @(
"${repo}:latest-lts",
"${repo}:5.4-latest"
)
}

function GetImageTagsForManifest {
param (
[string]$repo
)

return @(
"${repo}:5.4-ubuntu-latest",
"${repo}:5.4-ubuntu-arm32v7-latest",
"${repo}:5.4-ubuntu-arm64v8-latest",
"${repo}:5.4-windows-1809-latest",
"${repo}:5.4-windows-ltsc2022-latest"
)
}
57 changes: 57 additions & 0 deletions docker/publish-multiarch.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
param(
$Repo = "ravendb/ravendb",
[switch]$DryRun = $False)

$ErrorActionPreference = "Stop"

. ".\common.ps1"

if ($env:DRY_RUN) {
$DryRun = $True
}

function CreateDockerManifests {
param (
[string]$repo,
[string[]]$manifestTags,
[string[]]$tags
)

Write-Host "Creating docker manifests combining: $tags"

foreach ($manifestTag in $manifestTags) {
Write-Host "Creating docker manifest $manifestTag."

$command = "docker manifest create $manifestTag"
foreach ($tag in $tags) {
$command += " --amend $tag"
}

Invoke-Expression $command
}
}

function PushDockerManifests {
param (
[string[]]$manifests
)

Write-Host "Pushing manifests to docker."

foreach ($manifest in $manifests) {
if ($DryRun) {
Write-Host "DRY RUN: docker manifest push $manifest"
}
else {
Write-Host "Pushing manifest $manifest"
docker manifest push $manifest
}
}

}

$tags = GetImageTagsForManifest $Repo
$manifestTags = GetManifestTags $Repo

CreateDockerManifests $Repo $manifestTags $tags
PushDockerManifests $manifestTags
23 changes: 20 additions & 3 deletions docker/ravendb-nanoserver/run-raven.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,31 @@ $ErrorActionPreference = 'Stop'

$COMMAND=".\Raven.Server.exe"
$hostname = & "hostname.exe"
if ([string]::IsNullOrEmpty($env:RAVEN_ServerUrl) -eq $True) {
$env:RAVEN_ServerUrl = "http://$($hostname):8080"
}

if ([string]::IsNullOrEmpty($env:RAVEN_SETTINGS) -eq $False) {
Set-Content -Path "settings.json" -Value "$env:RAVEN_SETTINGS"
}

function Get-RavenServerScheme {
if (Get-Content "settings.json" -Raw | Select-String -Pattern "Server.Certificate.Path|Server.Certificate.Load.Exec") {
return "https"
}
elseif (![string]::IsNullOrEmpty($env:RAVEN_Server_Certificate_Path) -or
![string]::IsNullOrEmpty($env:RAVEN_Server_Certificate_Load_Exec) -or
$env:RAVEN_ARGS -like "*--Server.Certificate.Path*" -or
$env:RAVEN_ARGS -like "*--Server.Certificate.Load.Exec*") {
return "https"
}
else {
return "http"
}
}

if ([string]::IsNullOrEmpty($env:RAVEN_ServerUrl)) {
$RAVEN_SERVER_SCHEME = Get-RavenServerScheme
$env:RAVEN_ServerUrl = "$($RAVEN_SERVER_SCHEME)://$($hostname):8080"
}

if ([string]::IsNullOrEmpty($env:RAVEN_ARGS) -eq $False) {
$COMMAND = "$COMMAND $($env:RAVEN_ARGS)"
}
Expand Down
22 changes: 20 additions & 2 deletions docker/ravendb-ubuntu/run-raven.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
#!/bin/bash
COMMAND="./Raven.Server"
[ -z "$RAVEN_ServerUrl" ] && export RAVEN_ServerUrl="http://$(hostname):8080"

if [ ! -z "$RAVEN_SETTINGS" ]; then
if [ -n "$RAVEN_SETTINGS" ]; then
echo "$RAVEN_SETTINGS" > settings.json
fi

check_for_certificates() {
if grep -q "Server.Certificate.Path" settings.json || \
grep -q "Server.Certificate.Load.Exec" settings.json || \
[ -n "$RAVEN_Server_Certificate_Path" ] || \
[ -n "$RAVEN_Server_Certificate_Load_Exec" ] || \
[[ "$RAVEN_ARGS" == *"--Server.Certificate.Path"* ]] || \
[[ "$RAVEN_ARGS" == *"--Server.Certificate.Load.Exec"* ]]; then
RAVEN_SERVER_SCHEME="https"
else
RAVEN_SERVER_SCHEME="http"
fi
}

if [ -z "$RAVEN_ServerUrl" ]; then
check_for_certificates
RAVEN_ServerUrl="${RAVEN_SERVER_SCHEME}://$(hostname):8080"
export RAVEN_ServerUrl
fi

if [ ! -z "$RAVEN_ARGS" ]; then
COMMAND="$COMMAND ${RAVEN_ARGS}"
fi
Expand Down
27 changes: 19 additions & 8 deletions scripts/linux/pkg/deb/assets/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DEST_DIR=/build
release=$(lsb_release -sr | cut -d. -f1)

if [[ $release -ge 22 ]]; then
mv -v $ASSETS_DIR/ravendb/debian/control_$release $ASSETS_DIR/ravendb/debian/control
mv -v $ASSETS_DIR/ravendb/debian/control_22 $ASSETS_DIR/ravendb/debian/control
else
apt install dh-systemd
mv -v $ASSETS_DIR/ravendb/debian/control_legacy $ASSETS_DIR/ravendb/debian/control
Expand Down Expand Up @@ -41,15 +41,26 @@ DOTNET_VERSION_MINOR=$(egrep -o -e '^[0-9]+.[0-9]+' <<< $DOTNET_FULL_VERSION)
export DOTNET_DEPS_VERSION="$DOTNET_FULL_VERSION"
export DOTNET_RUNTIME_VERSION="$DOTNET_VERSION_MINOR"

# Show dependencies for amd64 since that's the only platform Microsoft ships package for,
# however the dependencies are the same at the moment.
DOTNET_RUNTIME_DEPS_PKG="dotnet-runtime-deps-$DOTNET_RUNTIME_VERSION:amd64"
DOTNET_RUNTIME_DEPS=$(apt show $DOTNET_RUNTIME_DEPS_PKG 2>/dev/null | sed -n -e 's/Depends: //p')
if [ -z "$DOTNET_RUNTIME_DEPS" ]; then
echo "Could not extract dependencies from $DOTNET_RUNTIME_DEPS_PKG package."
exit 1
if [[ $release -eq 24 && $RAVEN_PLATFORM == "raspberry-pi" ]]; then
DOTNET_RUNTIME_DEPS="libicu74, libc6 (>= 2.38), libgcc-s1 (>= 3.0), liblttng-ust1t64 (>= 2.13.0), libssl3t64 (>= 3.0.0), libstdc++6 (>= 13.1), zlib1g (>= 1:1.1.4)"
else
if [[ $release -ge 24 ]]; then
DOTNET_RUNTIME_DEPS_PKG="dotnet-runtime-$DOTNET_RUNTIME_VERSION"
else
# Show dependencies for amd64 since that's the only platform Microsoft ships package for,
# however the dependencies are the same at the moment.
DOTNET_RUNTIME_DEPS_PKG="dotnet-runtime-deps-$DOTNET_RUNTIME_VERSION:amd64"
fi

# get depenencies and remove dotnet-host* dependencies
DOTNET_RUNTIME_DEPS=$(apt show $DOTNET_RUNTIME_DEPS_PKG 2>/dev/null | sed -n -e 's/Depends: //p' | sed -E 's/(^|, )dotnet-host[^,]*(, |$)/\1/; s/, $//')
if [ -z "$DOTNET_RUNTIME_DEPS" ]; then
echo "Could not extract dependencies from $DOTNET_RUNTIME_DEPS_PKG package."
exit 1
fi
fi


export DEB_DEPS="${DOTNET_RUNTIME_DEPS}, libc6-dev (>= 2.27)"

echo ".NET Runtime: $DOTNET_FULL_VERSION"
Expand Down
7 changes: 7 additions & 0 deletions scripts/linux/pkg/deb/build-deb_ubuntu-noble_amd64.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$env:OUTPUT_DIR = "$PSScriptRoot/dist"

.\set-ubuntu-noble.ps1
.\set-raven-platform-amd64.ps1
.\set-raven-version-env.ps1

.\build-deb.ps1
3 changes: 3 additions & 0 deletions scripts/linux/pkg/deb/set-ubuntu-noble.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$env:DISTRO_NAME = "ubuntu"
$env:DISTRO_VERSION = "24.04"
$env:DISTRO_VERSION_NAME ="noble"
3 changes: 3 additions & 0 deletions scripts/linux/pkg/deb/set-ubuntu-noble.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export DISTRO_NAME="ubuntu"
export DISTRO_VERSION="24.04"
export DISTRO_VERSION_NAME="noble"
2 changes: 1 addition & 1 deletion src/Corax/Corax.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>Corax - Low level indexing engine</Description>
<Authors>Hibernating Rhinos</Authors>
<TargetFramework>net8.0</TargetFramework>
<RuntimeFrameworkVersion>8.0.5</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>8.0.7</RuntimeFrameworkVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>Corax</AssemblyName>
<PackageId>Corax</PackageId>
Expand Down
Loading

0 comments on commit 5145dfd

Please sign in to comment.