Skip to content

Commit

Permalink
release: 21-10-24 (v38) (#2522)
Browse files Browse the repository at this point in the history
* refactor: Use the bucket public url (#2486)

* fix: Use the bucket public url

* fix: Branch name reference

* refactor: Use a defined github var

* add support for global sounds (#2495)

* fix: Scene Parallax Dynamic Branching fix (#2459)

* Scene Parallax Dynamic Branching fix

* Add the Mac shaders

* chore: 'Cannot connect to destination hsot' mac mitigation (#2425)

* Hacky force unload

* More force unloading

* private force unloading

* Remove dependency unload

* Remove Resources.Unload in aggresive strategy. Not useful

* Fix cacheable url

* Fixed dependency unloading

* Fix main asset unload

* Fix test

* Fixed more tests

* Fixed more tests

* more mote tests

* Revert priority

* null check in GatherGLTFAssetsSystem.cs

* Revert "Remove Resources.Unload in aggresive strategy. Not useful"

This reverts commit 383e5fe.

* refactored unload strategy

* Test coverage

* Textures leaked when leaving and entering Genesis plaza (#2129) (#2484)

* fix: Unable to recover initial memory state in GP (#2129)

Now cached texture intentions are compared using the texture file hash instead of the URL that was used to download it. Now it does not matter which content server is the candidate to get the texture from, if the instance was previously stored, it will reuse it when entering Genesis plaza.

* Cleaning code, step 1

Created a separated method to get the file hash.

* Cleaning step 2

* Cleaning step 3

* Null check (#2501)

* replaced data type in query: (#2504)

* chore: sync main to dev (#2507)

Co-authored-by: Ashley Canning <[email protected]>

* added missing IFinalizeWorldSystem implementation in system (#2506)

* Fix: UnityWebRequest exception request aborted (#2498)

## What does this PR change?
Add dispose for the request and exception not thrown after that

## How to test the changes?
not needed

* Fix: Handle RunConnectCycleStepAsync safer (#2478)

* Handle RunConnectCycleStepAsync safer

* Add logs in case of failed delivery

* More logs

* Preserve the previous connection if the players returns to the scene

* Fix connectedScene assigning

* Restore ConnectiveRoom.Fake

* fix: bind connection status panel visibility to debug command (#2441)

* fix: weekly release page (#2513)

Signed-off-by: Juan Ignacio Molteni <[email protected]>

* chore: move alpha_texture from PBRMaterial to UnlitMaterial (#2482)

Implemented support for alpha texture on SDK unlit material component

* fix: Textures in the panels at Genesis plaza main spawn area are not appearing (#2514)

Those panels use textures downloaded from arbitrary URLs and not from the content servers, which means they will not have a file hash available. File hashes were being used as "key" in the texture cache (GetTextureIntention are the actual key, but they compare using a hash partially formed by the file hash). Now either the hash or the source URL is used to form the key/hash, depending on whether the file hash is available.

* bumped cache version for landscape (#2515)

## What does this PR change?
see title 

## How to test the changes?

check if [#2190](#2190) is fixed

---------

Signed-off-by: Juan Ignacio Molteni <[email protected]>
Co-authored-by: Gabriel Díaz <[email protected]>
Co-authored-by: Nicolas Lorusso <[email protected]>
Co-authored-by: Geoff Birch <[email protected]>
Co-authored-by: Juan Ignacio Molteni <[email protected]>
Co-authored-by: Alex Villalba <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pravus <[email protected]>
Co-authored-by: Vitaly Popuzin <[email protected]>
Co-authored-by: Mikhail Agapov <[email protected]>
Co-authored-by: lorenzo-ranciaffi <[email protected]>
Co-authored-by: Alejandro Alvarez Melucci <[email protected]>
  • Loading branch information
12 people authored Oct 22, 2024
1 parent b050c32 commit b9fe15a
Show file tree
Hide file tree
Showing 85 changed files with 827 additions and 418 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-release-main-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: 'main'

- name: Get version
id: get_version
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/pr-comment-artifact-url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ jobs:
if [[ $GITHUB_REF == refs/tags/v* ]]; then
ARTIFACT_S3_DESTINATION_PATH="@dcl/$REPO/releases/$GITHUB_REF_NAME"
else
ARTIFACT_S3_DESTINATION_PATH="@dcl/$REPO/branch/${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}"
HEAD_BRANCH=$(jq -r '.pull_requests[0].head.ref' \
<<< "$WORKFLOW_RUN_EVENT_OBJ")
ARTIFACT_S3_DESTINATION_PATH="@dcl/$REPO/branch/$HEAD_BRANCH"
fi
echo "Artifact S3 Destination Path: $ARTIFACT_S3_DESTINATION_PATH"
Expand Down Expand Up @@ -90,9 +92,9 @@ jobs:
env:
JOB_PATH: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ env.PREVIOUS_JOB_ID }}"
WINDOWS_ARTIFACT_URL: "${{ github.server_url }}/${{ github.repository }}/suites/${{ env.SUITE_ID }}/artifacts/${{ env.WINDOWS_ARTIFACT_ID }}"
WINDOWS_ARTIFACT_S3_URL: "${{ format('https://{0}.s3.amazonaws.com/{1}/Decentraland_windows64.zip', secrets.EXPLORER_TEAM_S3_BUCKET, env.ARTIFACT_S3_DESTINATION_PATH) }}"
WINDOWS_ARTIFACT_S3_URL: "${{ format('{0}/{1}/Decentraland_windows64.zip', vars.EXPLORER_TEAM_S3_BUCKET_PUBLIC_URL, env.ARTIFACT_S3_DESTINATION_PATH) }}"
MAC_ARTIFACT_URL: "${{ github.server_url }}/${{ github.repository }}/suites/${{ env.SUITE_ID }}/artifacts/${{ env.MAC_ARTIFACT_ID }}"
MAC_ARTIFACT_S3_URL: "${{ format('https://{0}.s3.amazonaws.com/{1}/Decentraland_macos.zip', secrets.EXPLORER_TEAM_S3_BUCKET, env.ARTIFACT_S3_DESTINATION_PATH) }}"
MAC_ARTIFACT_S3_URL: "${{ format('{0}/{1}/Decentraland_macos.zip', vars.EXPLORER_TEAM_S3_BUCKET_PUBLIC_URL, env.ARTIFACT_S3_DESTINATION_PATH) }}"
HEAD_SHA: "${{ env.HEAD_SHA }}"
uses: peter-evans/create-or-update-comment@v3
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ private void CompleteWearableABThumbnailDownload(Entity entity, ref IAvatarAttac
if (promise.TryConsume(World, out var result))
{
wearable.ThumbnailAssetResult = result.ToFullRectSpriteData(LoadThumbnailsUtils.DEFAULT_THUMBNAIL);

World.Destroy(entity);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private async UniTaskVoid SendSelfAsync(string message)

if (identity == null)
{
ReportHub.LogWarning(ReportCategory.ARCHIPELAGO_REQUEST, "SelfResendChatMessageBus.Send: Identity is null, can't send message");
ReportHub.LogWarning(ReportCategory.COMMS_SCENE_HANDLER, "SelfResendChatMessageBus.Send: Identity is null, can't send message");
return;
}

Expand Down
14 changes: 0 additions & 14 deletions Explorer/Assets/DCL/CommunicationData/URLHelpers/URLAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,11 @@ namespace CommunicationData.URLHelpers
public readonly struct URLAddress : IEquatable<URLAddress>, IEquatable<string>
{
public static readonly URLAddress EMPTY = new (string.Empty);

public readonly string Value;
private readonly string CacheableURL;

private static readonly string HTTP_STARTER = "https";
private static readonly string VALIDATION_PATTERN = "/v[0-9]+/";

internal URLAddress(string value)
{
Value = value;

if (!string.IsNullOrEmpty(Value) && Value.StartsWith(HTTP_STARTER))
CacheableURL = Regex.Replace(Value, VALIDATION_PATTERN, "/");
else
CacheableURL = Value;
}

public static implicit operator string(in URLAddress address) =>
Expand Down Expand Up @@ -56,9 +46,5 @@ public override int GetHashCode() =>
public override string ToString() =>
Value;

public string GetCacheableURL()
{
return CacheableURL;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ static GlobalDeferredLoadingSystem()
CreateQuery<GetWearableAssetBundleManifestIntention, SceneAssetBundleManifest>(),
CreateQuery<GetAssetBundleIntention, AssetBundleData>(),
CreateQuery<GetGLTFIntention, GLTFData>(),
CreateQuery<GetProfileIntention, Profile>(),
CreateQuery<GetTextureIntention, Texture2D>(),
CreateQuery<GetNFTShapeIntention, Texture2D>(),
CreateQuery<GetProfileIntention, ProfileData>(),
CreateQuery<GetTextureIntention, Texture2DData>(),
CreateQuery<GetNFTShapeIntention, Texture2DData>(),
CreateQuery<GetEmotesByPointersFromRealmIntention, EmotesDTOList>(),
CreateQuery<GetOwnedEmotesFromRealmIntention, EmotesResolution>(),
CreateQuery<GetAudioClipIntention, AudioClip>(),
CreateQuery<GetAudioClipIntention, AudioClipData>(),
};
}

Expand Down
3 changes: 1 addition & 2 deletions Explorer/Assets/DCL/Landscape/TerrainGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
using Unity.Jobs;
using Unity.Mathematics;
using UnityEngine;
using UnityEngine.Profiling;
using Utility;
using JobHandle = Unity.Jobs.JobHandle;

Expand All @@ -28,7 +27,7 @@ public class TerrainGenerator : IDisposable, IContainParcel
private const float ROOT_VERTICAL_SHIFT = -0.01f; // fix for not clipping with scene (potential) floor

// increment this number if we want to force the users to generate a new terrain cache
private const int CACHE_VERSION = 7;
private const int CACHE_VERSION = 8;

private const float PROGRESS_COUNTER_EMPTY_PARCEL_DATA = 0.1f;
private const float PROGRESS_COUNTER_TERRAIN_DATA = 0.3f;
Expand Down
2 changes: 1 addition & 1 deletion Explorer/Assets/DCL/MapPins/Systems/MapPinLoaderSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private bool TryCreateGetTexturePromise(in TextureComponent? textureComponent, r

DereferenceTexture(ref promise);

promise = Promise.Create(World, new GetTextureIntention(textureComponentValue.Src, textureComponentValue.WrapMode, textureComponentValue.FilterMode, attemptsCount: ATTEMPTS_COUNT), partitionComponent);
promise = Promise.Create(World, new GetTextureIntention(textureComponentValue.Src, textureComponentValue.FileHash, textureComponentValue.WrapMode, textureComponentValue.FilterMode, attemptsCount: ATTEMPTS_COUNT), partitionComponent);
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class AutoReconnectLiveConnection : IArchipelagoLiveConnection

public AutoReconnectLiveConnection(IArchipelagoLiveConnection origin) : this(
origin,
m => ReportHub.Log(ReportCategory.ARCHIPELAGO_REQUEST, m)
m => ReportHub.Log(ReportCategory.COMMS_SCENE_HANDLER, m)
) { }

public AutoReconnectLiveConnection(IArchipelagoLiveConnection origin, Action<string> log)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public bool IsConnected
if (previousConnected != result)
{
ReportHub
.WithReport(ReportCategory.ARCHIPELAGO_REQUEST)
.WithReport(ReportCategory.COMMS_SCENE_HANDLER)
.Log($"ArchipelagoLiveConnection connected: {result}");
previousConnected = result;
}
Expand All @@ -40,46 +40,46 @@ public LogArchipelagoLiveConnection(IArchipelagoLiveConnection origin)
public async UniTask<Result> ConnectAsync(string adapterUrl, CancellationToken token)
{
ReportHub
.WithReport(ReportCategory.ARCHIPELAGO_REQUEST)
.WithReport(ReportCategory.COMMS_SCENE_HANDLER)
.Log($"ArchipelagoLiveConnection ConnectAsync start to: {adapterUrl}");
var result = await origin.ConnectAsync(adapterUrl, token);
ReportHub
.WithReport(ReportCategory.ARCHIPELAGO_REQUEST)
.WithReport(ReportCategory.COMMS_SCENE_HANDLER)
.Log($"ArchipelagoLiveConnection ConnectAsync finished to: {adapterUrl} with result: {result.Success}");
return result;
}

public async UniTask DisconnectAsync(CancellationToken token)
{
ReportHub
.WithReport(ReportCategory.ARCHIPELAGO_REQUEST)
.WithReport(ReportCategory.COMMS_SCENE_HANDLER)
.Log("ArchipelagoLiveConnection DisconnectAsync start");
await origin.DisconnectAsync(token);
ReportHub
.WithReport(ReportCategory.ARCHIPELAGO_REQUEST)
.WithReport(ReportCategory.COMMS_SCENE_HANDLER)
.Log("ArchipelagoLiveConnection DisconnectAsync finished");
}

public async UniTask<EnumResult<IArchipelagoLiveConnection.ResponseError>> SendAsync(MemoryWrap data, CancellationToken token)
{
ReportHub
.WithReport(ReportCategory.ARCHIPELAGO_REQUEST)
.WithReport(ReportCategory.COMMS_SCENE_HANDLER)
.Log($"ArchipelagoLiveConnection SendAsync start with size: {data.Length} and content: {data.HexReadableString()}");
var result = await origin.SendAsync(data, token);
ReportHub
.WithReport(ReportCategory.ARCHIPELAGO_REQUEST)
.WithReport(ReportCategory.COMMS_SCENE_HANDLER)
.Log($"ArchipelagoLiveConnection SendAsync finished with size: {data.Length} and content: {data.HexReadableString()}");
return result;
}

public async UniTask<EnumResult<MemoryWrap, IArchipelagoLiveConnection.ResponseError>> ReceiveAsync(CancellationToken token)
{
ReportHub
.WithReport(ReportCategory.ARCHIPELAGO_REQUEST)
.WithReport(ReportCategory.COMMS_SCENE_HANDLER)
.Log("ArchipelagoLiveConnection ReceiveAsync start");
var result = await origin.ReceiveAsync(token);
ReportHub
.WithReport(ReportCategory.ARCHIPELAGO_REQUEST)
.WithReport(ReportCategory.COMMS_SCENE_HANDLER)
.Log($"ArchipelagoLiveConnection ReceiveAsync finished with error: {result.Error?.Message ?? "no error"}, size: {(result.Success ? result.Value.Length : 0)}");
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ private async UniTask SendHeartbeatAsync(ConnectToRoomAsyncDelegate connectDeleg
var result = await signFlow.SendHeartbeatAsync(position, token);

if (result.Success == false)
ReportHub.LogWarning(ReportCategory.ARCHIPELAGO_REQUEST, $"Cannot send heartbeat, connection is closed: {result.ErrorMessage}");
ReportHub.LogWarning(ReportCategory.COMMS_SCENE_HANDLER, $"Cannot send heartbeat, connection is closed: {result.ErrorMessage}");
}

private void OnNewConnectionString(string connectionString, CancellationToken token)
{
if (CurrentState() is IConnectiveRoom.State.Stopped) throw new InvalidOperationException("Room is not running");
connectToRoomAsyncDelegate.EnsureNotNull("Connection delegate is not passed yet");
connectToRoomAsyncDelegate!(connectionString, token).Forget();
connectToRoomAsyncDelegate!(connectionString, static () => RoomSelection.NEW, token).Forget();
}

private async UniTask ConnectToArchipelagoAsync(CancellationToken token)
Expand All @@ -127,12 +127,12 @@ private async UniTask<LightResult<string>> WelcomePeerIdAsync(string adapterUrl,
if (messageForSignResult.Success == false ||
!HandshakePayloadIsValid(messageForSignResult.Result))
{
ReportHub.LogError(ReportCategory.ARCHIPELAGO_REQUEST, $"Cannot obtain a message to sign a welcome peer");
ReportHub.LogError(ReportCategory.COMMS_SCENE_HANDLER, "Cannot obtain a message to sign a welcome peer");
return LightResult<string>.FAILURE;
}

string signedMessage = identity.Sign(messageForSignResult.Result).ToJson();
ReportHub.Log(ReportCategory.ARCHIPELAGO_REQUEST, $"Signed message: {signedMessage}");
ReportHub.Log(ReportCategory.COMMS_SCENE_HANDLER, $"Signed message: {signedMessage}");
return await signFlow.WelcomePeerIdAsync(signedMessage, token);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private async UniTask RunConnectCycleStepAsync(ConnectToRoomAsyncDelegate connec
if (connectiveRoom.CurrentState() is not IConnectiveRoom.State.Running)
{
string connectionString = await ConnectionStringAsync(token);
await connectToRoomAsyncDelegate(connectionString, token);
await connectToRoomAsyncDelegate(connectionString, static () => RoomSelection.NEW, token);
}
}

Expand All @@ -56,7 +56,7 @@ private async UniTask<string> ConnectionStringAsync(CancellationToken token)
var result = webRequests.SignedFetchPostAsync(adapterUrl, metadata, token);
AdapterResponse response = await result.CreateFromJson<AdapterResponse>(WRJsonParser.Unity);
string connectionString = response.fixedAdapter;
ReportHub.WithReport(ReportCategory.ARCHIPELAGO_REQUEST).Log($"String is: {connectionString}");
ReportHub.WithReport(ReportCategory.COMMS_SCENE_HANDLER).Log($"String is: {connectionString}");
return connectionString;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class LogArchipelagoSignFlow : IArchipelagoSignFlow

public LogArchipelagoSignFlow(IArchipelagoSignFlow origin) : this(
origin,
m => ReportHub.Log(ReportCategory.ARCHIPELAGO_REQUEST, m)
m => ReportHub.Log(ReportCategory.COMMS_SCENE_HANDLER, m)
) { }

public LogArchipelagoSignFlow(IArchipelagoSignFlow origin, Action<string> log)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ public interface ISceneRoomMetaDataSource
/// </summary>
bool ScenesCommunicationIsIsolated { get; }

UniTask<MetaData> MetaDataAsync(CancellationToken token);
MetaData.Input GetMetadataInput();

UniTask WaitForMetaDataIsDirtyAsync(CancellationToken token);
UniTask<MetaData> MetaDataAsync(MetaData.Input input, CancellationToken token);

bool MetadataIsDirty { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,49 @@ namespace DCL.Multiplayer.Connections.GateKeeper.Meta
[SuppressMessage("ReSharper", "NotAccessedField.Local")]
public struct MetaData : IEquatable<MetaData>
{
public readonly struct Input : IEquatable<Input>
{
public readonly string RealmName;
public readonly Vector2Int Parcel;

public Input(string realmName, Vector2Int parcel)
{
RealmName = realmName;
Parcel = parcel;
}

public bool Equals(Input other) =>
RealmName == other.RealmName && Parcel.Equals(other.Parcel);

public override bool Equals(object? obj) =>
obj is Input other && Equals(other);

public override int GetHashCode() =>
HashCode.Combine(RealmName, Parcel);

public override string ToString() =>
$"Realm: {RealmName}, Parcel: {Parcel}";
}

public string realmName;
public string? sceneId;

[NonSerialized]
public readonly Vector2Int Parcel;

public MetaData(string realmName, string? sceneId, Vector2Int parcel)
public MetaData(string? sceneId, Input input)
{
this.realmName = realmName;
realmName = input.RealmName;
Parcel = input.Parcel;
this.sceneId = sceneId;
Parcel = parcel;
}

public string ToJson() =>
JsonUtility.ToJson(this)!;

public override string ToString() =>
$"Realm: {realmName}, Scene: {sceneId}, Parcel: {Parcel}";

public bool Equals(MetaData other) =>
realmName == other.realmName && sceneId == other.sceneId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public class SceneRoomLogMetaDataSource : ISceneRoomMetaDataSource
private const string PREFIX = "MetaDataSource:";

private readonly ISceneRoomMetaDataSource origin;
private readonly Action<string> log;

public SceneRoomLogMetaDataSource(ISceneRoomMetaDataSource origin)
{
Expand All @@ -19,19 +18,21 @@ public SceneRoomLogMetaDataSource(ISceneRoomMetaDataSource origin)

public bool ScenesCommunicationIsIsolated => origin.ScenesCommunicationIsIsolated;

public async UniTask<MetaData> MetaDataAsync(CancellationToken token)
public MetaData.Input GetMetadataInput()
{
ReportHub.WithReport(ReportCategory.LIVEKIT).Log($"{PREFIX} MetaDataAsync start");
MetaData result = await origin.MetaDataAsync(token);
ReportHub.WithReport(ReportCategory.LIVEKIT).Log($"{PREFIX} MetaDataAsync finish {result.realmName} {result.sceneId}");
ReportHub.WithReport(ReportCategory.LIVEKIT).Log($"{PREFIX} {nameof(GetMetadataInput)}");
MetaData.Input result = origin.GetMetadataInput();
return result;
}

public async UniTask WaitForMetaDataIsDirtyAsync(CancellationToken token)
public async UniTask<MetaData> MetaDataAsync(MetaData.Input input, CancellationToken token)
{
ReportHub.WithReport(ReportCategory.LIVEKIT).Log($"{PREFIX} WaitForMetaDataIsDirtyAsync start");
await origin.WaitForMetaDataIsDirtyAsync(token);
ReportHub.WithReport(ReportCategory.LIVEKIT).Log($"{PREFIX} WaitForMetaDataIsDirtyAsync finish");
ReportHub.WithReport(ReportCategory.LIVEKIT).Log($"{PREFIX} {nameof(MetaDataAsync)} start: {input}");
MetaData result = await origin.MetaDataAsync(input, token);
ReportHub.WithReport(ReportCategory.LIVEKIT).Log($"{PREFIX} {nameof(MetaDataAsync)} finish {result.realmName} {result.sceneId}");
return result;
}

public bool MetadataIsDirty => origin.MetadataIsDirty;
}
}
Loading

0 comments on commit b9fe15a

Please sign in to comment.