Skip to content

Commit

Permalink
Merge pull request #2593 from planetarium/release/200
Browse files Browse the repository at this point in the history
Backmerge 200
  • Loading branch information
U-lis authored Oct 2, 2024
2 parents 2b3dfb4 + e30eb17 commit 8c54741
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 29 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build-env
WORKDIR /app
ARG COMMIT

Expand All @@ -24,7 +24,7 @@ RUN dotnet publish NineChronicles.Headless.Executable/NineChronicles.Headless.Ex
--version-suffix $COMMIT

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
RUN apt-get update && apt-get install -y libc6-dev
COPY --from=build-env /app/out .
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.ACC
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the SDK image to build the app
FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build-env
WORKDIR /app
ARG COMMIT

Expand All @@ -21,7 +21,7 @@ RUN dotnet publish NineChronicles.Headless.AccessControlCenter/NineChronicles.He
--version-suffix $COMMIT

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
RUN apt-get update && apt-get install -y libc6-dev
COPY --from=build-env /app/out .
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.ACC.amd64
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the SDK image to build the app
FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build-env
WORKDIR /app
ARG COMMIT

Expand All @@ -21,7 +21,7 @@ RUN dotnet publish NineChronicles.Headless.AccessControlCenter/NineChronicles.He
--version-suffix $COMMIT

# Build runtime image
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim
WORKDIR /app
RUN apt-get update && apt-get install -y libc6-dev
COPY --from=build-env /app/out .
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.ACC.arm64v8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the SDK image to build the app
FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build-env
WORKDIR /app
ARG COMMIT

Expand All @@ -21,7 +21,7 @@ RUN dotnet publish NineChronicles.Headless.AccessControlCenter/NineChronicles.He
--version-suffix $COMMIT

# Build runtime image
FROM --platform=linux/arm64 mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim-arm64v8
FROM --platform=linux/arm64 mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim-arm64v8
WORKDIR /app
RUN apt-get update && apt-get install -y libc6-dev
COPY --from=build-env /app/out .
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /app
ARG COMMIT

Expand All @@ -24,7 +24,7 @@ RUN dotnet publish NineChronicles.Headless.Executable/NineChronicles.Headless.Ex
--version-suffix $COMMIT

# Build runtime image
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim
WORKDIR /app
RUN apt-get update && apt-get install -y libc6-dev liblz4-dev zlib1g-dev libsnappy-dev libzstd-dev
COPY --from=build-env /app/out .
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.arm64v8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /app
ARG COMMIT

Expand All @@ -24,7 +24,7 @@ RUN dotnet publish NineChronicles.Headless.Executable/NineChronicles.Headless.Ex
--version-suffix $COMMIT

# Build runtime image
FROM --platform=linux/arm64 mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim-arm64v8
FROM --platform=linux/arm64 mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim-arm64v8
WORKDIR /app
RUN apt-get update && apt-get install -y libc6-dev
COPY --from=build-env /app/out .
Expand Down
2 changes: 1 addition & 1 deletion Lib9c
Submodule Lib9c updated 59 files
+21 −6 .Lib9c.Tests/Action/AccountStateDeltaExtensionsTest.cs
+13 −4 .Lib9c.Tests/Action/AdventureBoss/ClaimAdventureBossRewardTest.cs
+20 −3 .Lib9c.Tests/Action/AdventureBoss/ExploreAdventureBossTest.cs
+8 −0 .Lib9c.Tests/Action/AdventureBoss/SweepAdventureBossTest.cs
+40 −0 .Lib9c.Tests/Action/ApprovePledgeTest.cs
+52 −0 .Lib9c.Tests/Action/BuyProductTest.cs
+23 −2 .Lib9c.Tests/Action/ClaimRaidRewardTest.cs
+14 −4 .Lib9c.Tests/Action/ClaimWorldBossKillRewardTest.cs
+177 −34 .Lib9c.Tests/Action/CustomEquipmentCraft/CustomEquipmentCraftTest.cs
+1 −11 .Lib9c.Tests/Action/ExceptionTest.cs
+11 −6 .Lib9c.Tests/Action/GrindingTest.cs
+70 −17 .Lib9c.Tests/Action/RaidTest.cs
+0 −45 .Lib9c.Tests/Action/RuneHelperTest.cs
+54 −0 .Lib9c.Tests/Action/WorldBossHelperTest.cs
+0 −79 .Lib9c.Tests/TableData/CustomEquipmentCraft/CustomEquipmentCraftCostSheetTest.cs
+18 −4 .Lib9c.Tests/TableData/CustomEquipmentCraft/CustomEquipmentCraftRelationshipSheetTest.cs
+0 −2 .Lib9c.Tests/TableSheets.cs
+6 −0 Lib9c.DevExtensions/Action/Craft/UnlockCraftAction.cs
+5 −0 Lib9c.DevExtensions/Action/Stage/ClearStage.cs
+89 −17 Lib9c.MessagePack/Formatters/ExceptionFormatter.cs
+4 −3 Lib9c/Action/AdventureBoss/ClaimAdventureBossReward.cs
+2 −2 Lib9c/Action/AdventureBoss/SweepAdventureBoss.cs
+8 −1 Lib9c/Action/AdventureBoss/UnlockFloor.cs
+10 −3 Lib9c/Action/AdventureBoss/Wanted.cs
+8 −0 Lib9c/Action/ApprovePledge.cs
+2 −3 Lib9c/Action/BuyProduct.cs
+15 −4 Lib9c/Action/ClaimRaidReward.cs
+4 −0 Lib9c/Action/ClaimWordBossKillReward.cs
+1 −2 Lib9c/Action/CreateAvatar.cs
+25 −18 Lib9c/Action/CustomEquipmentCraft/CustomEquipmentCraft.cs
+8 −1 Lib9c/Action/Grinding.cs
+9 −1 Lib9c/Action/Raid.cs
+18 −20 Lib9c/Action/RapidCombination.cs
+25 −16 Lib9c/Action/UnlockCombinationSlot.cs
+20 −2 Lib9c/Battle/RaidSimulator.cs
+5 −1 Lib9c/Battle/RaidSimulatorV1.cs
+5 −1 Lib9c/Battle/RaidSimulatorV2.cs
+4 −3 Lib9c/Helper/AdventureBossHelper.cs
+50 −9 Lib9c/Helper/CustomCraftHelper.cs
+0 −61 Lib9c/Helper/RuneHelper.cs
+68 −0 Lib9c/Helper/WorldBossHelper.cs
+21 −3 Lib9c/Model/Mail/ProductBuyerMail.cs
+1 −0 Lib9c/Model/Mail/ProductCancelMail.cs
+20 −3 Lib9c/Model/Mail/ProductSellerMail.cs
+16 −3 Lib9c/Module/LegacyModule.cs
+18 −18 Lib9c/TableCSV/AdventureBoss/AdventureBossFloorFirstRewardSheet.csv
+0 −5 Lib9c/TableCSV/CustomEquipmentCraft/CustomEquipmentCraftCostSheet.csv
+0 −7 Lib9c/TableCSV/CustomEquipmentCraft/CustomEquipmentCraftCostSheet.csv.meta
+5 −5 Lib9c/TableCSV/CustomEquipmentCraft/CustomEquipmentCraftRelationshipSheet.csv
+13 −13 Lib9c/TableCSV/WorldBoss/WorldBossBattleRewardSheet.csv
+13 −13 Lib9c/TableCSV/WorldBoss/WorldBossKillRewardSheet.csv
+11 −11 Lib9c/TableCSV/WorldBoss/WorldBossRankRewardSheet.csv
+13 −5 Lib9c/TableData/AdventureBoss/AdventureBossFloorFirstRewardSheet.cs
+0 −54 Lib9c/TableData/CustomEquipmentCraft/CustomEquipmentCraftCostSheet.cs
+65 −9 Lib9c/TableData/CustomEquipmentCraft/CustomEquipmentCraftRelationshipSheet.cs
+1 −0 Lib9c/TableData/IWorldBossRewardRow.cs
+6 −0 Lib9c/TableData/WorldBossBattleRewardSheet.cs
+6 −0 Lib9c/TableData/WorldBossKillRewardSheet.cs
+6 −0 Lib9c/TableData/WorldBossRankRewardSheet.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisRuleSet>..\NineChronicles.Headless.Common.ruleset</CodeAnalysisRuleSet>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void TransferAsset(
}
else
{
Assert.Contains("System.FormatException: Input string was not in a correct format.", _console.Error.ToString());
Assert.Contains("System.FormatException", _console.Error.ToString());
}
}

Expand Down Expand Up @@ -104,7 +104,7 @@ public void ClaimStakeReward(string addressString, int expectedCode)
}
else
{
Assert.Contains("System.FormatException: Input string was not in a correct format.", _console.Error.ToString());
Assert.Contains("System.FormatException", _console.Error.ToString());
}
}

Expand All @@ -131,7 +131,7 @@ public void MigrateMonsterCollection(string addressString, int expectedCode)
}
else
{
Assert.Contains("System.FormatException: Input string was not in a correct format.", _console.Error.ToString());
Assert.Contains("System.FormatException", _console.Error.ToString());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>8</LangVersion>

<IsPackable>false</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<VersionPrefix>1.0.0</VersionPrefix>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisRuleSet>..\NineChronicles.Headless.Common.ruleset</CodeAnalysisRuleSet>
Expand Down
15 changes: 11 additions & 4 deletions NineChronicles.Headless.Tests/ArenaParticipantsWorkerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ public void AvatarAddrAndScoresWithRank()
.SetLegacyState(sheetAddress, csv.Serialize())
.SetLegacyState(participantsAddr, participants.Serialize())
.SetLegacyState(arenaScore.Address, arenaScore.Serialize());
var actual = ArenaParticipantsWorker.AvatarAddrAndScoresWithRank(participants.AvatarAddresses, currentRoundData, state);
var actual =
ArenaParticipantsWorker.AvatarAddrAndScoresWithRank(participants.AvatarAddresses, currentRoundData, state);
Assert.Equal(2, actual.Count);
var first = actual.First();
Assert.Equal(avatarAddress, first.avatarAddr);
Expand Down Expand Up @@ -131,7 +132,9 @@ public void GetArenaParticipants()
// equipment
var equipmentSheet = tableSheets.EquipmentItemSheet;
var random = new Random(0);
var equipment = (Equipment)ItemFactory.CreateItem(equipmentSheet.Values.First(r => r.ItemSubType == ItemSubType.Armor), random);
var equipment =
(Equipment)ItemFactory.CreateItem(equipmentSheet.Values.First(r => r.ItemSubType == ItemSubType.Armor),
random);
equipment.equipped = true;
avatarState.inventory.AddItem(equipment);
avatarState2.inventory.AddItem(equipment);
Expand Down Expand Up @@ -182,8 +185,12 @@ public void GetArenaParticipants()
{
state = state.SetLegacyState(Addresses.GetSheetAddress(key), s.Serialize());
}
var avatarAddrAndScoresWithRank = ArenaParticipantsWorker.AvatarAddrAndScoresWithRank(participants.AvatarAddresses, currentRoundData, state);
var actual = ArenaParticipantsWorker.GetArenaParticipants(state, participants.AvatarAddresses, avatarAddrAndScoresWithRank);

var avatarAddrAndScoresWithRank =
ArenaParticipantsWorker.AvatarAddrAndScoresWithRank(participants.AvatarAddresses, currentRoundData, state);
var actual =
ArenaParticipantsWorker.GetArenaParticipants(state, participants.AvatarAddresses,
avatarAddrAndScoresWithRank);
Assert.Equal(2, actual.Count);
var first = actual.First();
Assert.Equal(avatarAddress, first.AvatarAddr);
Expand Down
7 changes: 6 additions & 1 deletion NineChronicles.Headless.Tests/Common/Fixtures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
using Libplanet.Common;
using Libplanet.Crypto;
using Libplanet.Types.Assets;
using Nekoyume;
using Nekoyume.Model;
using Nekoyume.Model.Item;
using Nekoyume.Model.Quest;
using Nekoyume.Model.State;
using Nekoyume.TableData;

namespace NineChronicles.Headless.Tests
{
Expand Down Expand Up @@ -54,7 +58,8 @@ public static ShopState ShopStateFX()
var equipment = ItemFactory.CreateItemUsable(row, Guid.Empty, 0);
if (equipment is ITradableItem tradableItem)
{
var shopItem = new ShopItem(UserAddress, AvatarAddress, Guid.NewGuid(), index * CurrencyFX, tradableItem);
var shopItem = new ShopItem(UserAddress, AvatarAddress, Guid.NewGuid(), index * CurrencyFX,
tradableItem);
shopState.Register(shopItem);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPublishable>false</IsPublishable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
Expand Down
3 changes: 2 additions & 1 deletion NineChronicles.Headless/ActionEvaluationPublisher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ public IdGroupFinder(IMemoryCache memoryCache)
var serializedInput = "key";

// Check cache
if (_memoryCache.TryGetValue(serializedInput, out List<(HashSet<string> IPs, HashSet<string> IDs)> cachedResult))
List<(HashSet<string> IPs, HashSet<string> IDs)> cachedResult = new();
if (_memoryCache.TryGetValue(serializedInput, out cachedResult!))
{
return cachedResult;
}
Expand Down
2 changes: 1 addition & 1 deletion NineChronicles.Headless/MemoryCacheExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static byte[] SetSheet(this MemoryCache cache, string cacheKey, IValue va

public static bool TryGetSheet<T>(this MemoryCache cache, string cacheKey, out T cached)
{
return cache.TryGetValue(cacheKey, out cached);
return cache.TryGetValue(cacheKey, out cached!);
}

public static string? GetSheet(this MemoryCache cache, string cacheKey)
Expand Down
2 changes: 1 addition & 1 deletion NineChronicles.Headless/NineChronicles.Headless.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisRuleSet>..\NineChronicles.Headless.Common.ruleset</CodeAnalysisRuleSet>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.0",
"version": "8.0.0",
"rollForward": "minor"
}
}

0 comments on commit 8c54741

Please sign in to comment.