1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 00:22:50 -05:00

[PM-5052] Upgrade to .NET 8 (#3461)

* Upgrade to .NET 8

* Linting

* Clean up old JSON deserialization code

* More .NET 8-oriented linting

* Light feedback

* Get rid of old test we don't know the root issue for

* Fix a new test

* Remove now-unnecessary Renovate constraint

* Use Any()

* Somehow a 6.0 tooling config we don't need snuck back in

* Space out properties that always change per release

* Bump a few core packages since the last update
This commit is contained in:
Matt Bishop
2024-02-05 13:03:42 -05:00
committed by GitHub
parent 3c5e9ac1aa
commit ae1fdb0992
38 changed files with 82 additions and 132 deletions

View File

@ -104,13 +104,13 @@ public class AzureQueueHostedService : IHostedService, IDisposable
var root = jsonDocument.RootElement;
if (root.ValueKind == JsonValueKind.Array)
{
var indexedEntities = root.ToObject<List<EventMessage>>()
var indexedEntities = root.Deserialize<List<EventMessage>>()
.SelectMany(e => EventTableEntity.IndexEvent(e));
events.AddRange(indexedEntities);
}
else if (root.ValueKind == JsonValueKind.Object)
{
var eventMessage = root.ToObject<EventMessage>();
var eventMessage = root.Deserialize<EventMessage>();
events.AddRange(EventTableEntity.IndexEvent(eventMessage));
}

View File

@ -1,11 +1,11 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:8.0
LABEL com.bitwarden.product="bitwarden"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gosu \
curl \
gosu \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV ASPNETCORE_URLS http://+:5000