Skip to content

Commit

Permalink
Merge pull request #2835 from decentraland/release/release-19-11-2024
Browse files Browse the repository at this point in the history
release: 19-11-2024
  • Loading branch information
aixaCode authored Nov 19, 2024
2 parents 772435a + 1f75eff commit b12b09d
Show file tree
Hide file tree
Showing 26 changed files with 138 additions and 65 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/s3-latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ on:
jobs:
check-latest-release:
runs-on: ubuntu-latest
container:
image: amazon/aws-cli:latest
steps:
- name: Install jq and curl
run: |
yum update -y
yum install -y jq curl
- name: Check if current release is the latest release
id: check_latest
run: |
Expand Down Expand Up @@ -43,6 +49,4 @@ jobs:
"version": "${{ env.latest_release }}",
"timestamp": "'$(date -u +"%Y-%m-%dT%H:%M:%SZ")'"
}' > latest.json
cat latest.json
aws s3 ls s3://$EXPLORER_TEAM_S3_BUCKET/
aws s3 cp latest.json s3://$EXPLORER_TEAM_S3_BUCKET/$RELEASES_PATH/latest.json --debug
aws s3 cp latest.json s3://$EXPLORER_TEAM_S3_BUCKET/$RELEASES_PATH/latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ namespace DCL.ApplicationVersionGuard
{
public class ApplicationVersionGuard
{
public const string ENABLE_VERSION_CONTROL_CLI_ARG = "versionControl";
public const string SIMULATE_VERSION_CLI_ARG = "simulateVersion";

private const string LAUNCHER_EXECUTABLE_NAME = "Decentraland Launcher";
private const string LAUNCHER_PATH_MAC = "/Applications/" + LAUNCHER_EXECUTABLE_NAME + ".app";
private const string LAUNCHER_PATH_WIN_MAIN = @"C:\Program Files\Decentraland Launcher\" + LAUNCHER_EXECUTABLE_NAME + ".exe";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public async UniTask<int> GetOwnedEmotesAsync(Web3Address userId, CancellationTo
IEmoteProvider.OwnedEmotesRequestOptions requestOptions,
List<IEmote> output)
{
if (!appArgs.TryGetValue("self-preview-emotes", out string? emotesCsv))
if (!appArgs.TryGetValue(AppArgsFlags.SELF_PREVIEW_EMOTES, out string? emotesCsv))
return await source.GetOwnedEmotesAsync(userId, ct, requestOptions, output);

URN[] pointers = emotesCsv!.Split(',', StringSplitOptions.RemoveEmptyEntries)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public ApplicationParametersWearablesProvider(IAppArgs appArgs,
string? name = null,
List<IWearable>? results = null)
{
if (!appArgs.TryGetValue("self-preview-wearables", out string? wearablesCsv))
if (!appArgs.TryGetValue(AppArgsFlags.SELF_PREVIEW_WEARABLES, out string? wearablesCsv))
return await source.GetAsync(pageSize, pageNumber, ct, sortingField, orderBy, category, collectionType, name, results);

URN[] pointers = wearablesCsv!.Split(',', StringSplitOptions.RemoveEmptyEntries)
Expand Down
11 changes: 5 additions & 6 deletions Explorer/Assets/DCL/Character/CharacterCamera/CameraMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
{
public enum CameraMode : byte
{
Unknown = 0,
FirstPerson = 1,
ThirdPerson = 2,
DroneView = 3,
SDKCamera = 4,
FirstPerson = 0,
ThirdPerson = 1,
DroneView = 2,
SDKCamera = 3,

/// <summary>
/// Free-fly, does not follow character, intercepts controls designated for character movement
/// </summary>
Free = 5,
Free = 4,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,8 @@ MonoBehaviour:
<Camera>k__BackingField: {fileID: 4997933640858091397}
<Speed>k__BackingField: 10
<DefaultPosition>k__BackingField: {x: 0, y: 25, z: 0}
inWorldCameraData:
<Camera>k__BackingField: {fileID: 8825178219543001937}
<Speed>k__BackingField: 5
<DefaultPosition>k__BackingField: {x: 0, y: 10, z: 0}
shoulderChangeSpeed: 4
<DefaultCameraMode>k__BackingField: 2
<DefaultCameraMode>k__BackingField: 1
<Brain>k__BackingField: {fileID: 1924827267997815873}
--- !u!1 &2902897560403827600
GameObject:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ namespace DCL.FeatureFlags
{
public static class FeatureFlagsProviderExtensions
{
private const string ARG_URL = "feature-flags-url";
private const string ARG_HOSTNAME = "feature-flags-hostname";

public static async UniTask<FeatureFlagsConfiguration> InitializeAsync(
this IFeatureFlagsProvider featureFlagsProvider,
IDecentralandUrlsSource decentralandUrlsSource,
Expand All @@ -25,10 +22,10 @@ public static async UniTask<FeatureFlagsConfiguration> InitializeAsync(
// #!/bin/bash
// ./Decentraland.app --feature-flags-url https://feature-flags.decentraland.zone --feature-flags-hostname localhost

if(appParameters.TryGetValue(ARG_URL, out string featureFlagsUrl))
if(appParameters.TryGetValue(AppArgsFlags.FeatureFlags.URL, out string featureFlagsUrl))
options.URL = URLDomain.FromString(featureFlagsUrl);

if(appParameters.TryGetValue(ARG_HOSTNAME, out string hostName))
if(appParameters.TryGetValue(AppArgsFlags.FeatureFlags.HOSTNAME, out string hostName))
options.Hostname = hostName;

options.UserId = userAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ namespace DCL.PerformanceAndDiagnostics.Analytics
{
public class StaticCommonTraitsPlugin : EventPlugin
{
private const string DCL_EDITOR = "dcl-editor";
private const string UNITY_EDITOR = "unity-editor";
private const string DEBUG = "debug";
private const string RELEASE = "release";
Expand Down Expand Up @@ -37,8 +36,8 @@ private static string ChooseRuntime(IAppArgs appArgs)
if (Application.isEditor)
return UNITY_EDITOR;

if (appArgs.HasFlag(DCL_EDITOR))
return DCL_EDITOR;
if (appArgs.HasFlag(AppArgsFlags.DCL_EDITOR))
return AppArgsFlags.DCL_EDITOR;

if (Debug.isDebugBuild || appArgs.HasDebugFlag())
return DEBUG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ public void AddCurrentSceneToScope(Scope scope, SceneShortInfo sceneInfo)
scope.SetTag("current_scene.name", sceneInfo.Name);
}

public void AddRealmInfoToScope(Scope scope, string baseCatalystUrl, string baseContentUrl, string baseLambdaUrl)
{
scope.SetTag("base_catalyst_url", baseCatalystUrl);
scope.SetTag("base_content_url", baseContentUrl);
scope.SetTag("base_lambda_url", baseLambdaUrl);
}

public void AddScopeConfigurator(ConfigureScope configureScope)
{
scopeConfigurators.Add(configureScope);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace DCL.PluginSystem.Global
{
public class MultiplayerMovementPlugin : IDCLGlobalPlugin<MultiplayerCommunicationSettings>
{
private const string COMPRESSION_ARG_FLAG = "compression";
private readonly IAssetsProvisioner assetsProvisioner;
private readonly MultiplayerMovementMessageBus messageBus;
private readonly IDebugContainerBuilder debugBuilder;
Expand Down Expand Up @@ -72,7 +71,7 @@ public async UniTask InitializeAsync(MultiplayerCommunicationSettings settings,

private void ConfigureCompressionUsage()
{
if (appArgs.TryGetValue(COMPRESSION_ARG_FLAG, out string? compression))
if (appArgs.TryGetValue(AppArgsFlags.Multiplayer.COMPRESSION, out string? compression))
{
this.settings.Value.UseCompression = compression == "true";
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"GUID:3640f3c0b42946b0b8794a1ed8e06ca5",
"GUID:f1eaef1b40a68e74cb90cbedebf57bbf",
"GUID:8c4c611b27046bc4a848721d1fdd4a9f",
"GUID:4725c02394ab4ce19f889e4e8001f989"
"GUID:4725c02394ab4ce19f889e4e8001f989",
"GUID:e25ef972de004615a22937e739de2def"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public RealUserInAppInitializationFlow(
IAppArgs appParameters,
IDebugSettings debugSettings,
IPortableExperiencesController portableExperiencesController,
IRoomHub roomHub
IRoomHub roomHub,
DiagnosticsContainer diagnosticsContainer
)
{
this.loadingStatus = loadingStatus;
Expand All @@ -78,6 +79,7 @@ IRoomHub roomHub
restartRealmStartupOperation = new RestartRealmStartupOperation(loadingStatus, realmController);
var teleportStartupOperation = new TeleportStartupOperation(loadingStatus, realmNavigator, startParcel);
var loadGlobalPxOperation = new LoadGlobalPortableExperiencesStartupOperation(loadingStatus, selfProfile, featureFlagsCache, debugSettings, portableExperiencesController);
var sentryDiagnostics = new SentryDiagnosticStartupOperation(realmController, diagnosticsContainer);

startupOperation = new SequentialStartupOperation(
loadingStatus,
Expand All @@ -90,7 +92,8 @@ IRoomHub roomHub
checkOnboardingStartupOperation,
restartRealmStartupOperation,
teleportStartupOperation,
loadGlobalPxOperation
loadGlobalPxOperation,
sentryDiagnostics
).WithHandleExceptions();
}

Expand Down Expand Up @@ -119,8 +122,8 @@ public async UniTask ExecuteAsync(UserInAppInitializationFlowParameters paramete

if (parameters.FromLogout)
{
// If we are coming from a logout, we teleport the user to Genesis Plaza
var teleportResult = await realmNavigator.TryInitializeTeleportToParcelAsync(Vector2Int.zero, ct);
// If we are coming from a logout, we teleport the user to Genesis Plaza and force realm change to reset the scene properly
var teleportResult = await realmNavigator.TryInitializeTeleportToParcelAsync(Vector2Int.zero, ct, forceChangeRealm: true);
// Restart livekit connection
await roomHub.StartAsync().Timeout(TimeSpan.FromSeconds(10));
result = teleportResult.Success ? teleportResult : Result.ErrorResult(teleportResult.ErrorMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ namespace DCL.UserInAppInitializationFlow.StartupOperations
public class CheckOnboardingStartupOperation : IStartupOperation
{
private const int TUTORIAL_STEP_DONE_MARK = 256;
private const string APP_PARAMETER_REALM = "realm";
private const string APP_PARAMETER_LOCAL_SCENE = "local-scene";
private const string APP_PARAMETER_POSITION = "position";


private readonly ILoadingStatus loadingStatus;
private readonly ISelfProfile selfProfile;
Expand Down Expand Up @@ -59,7 +57,7 @@ public async UniTask<Result> ExecuteAsync(AsyncLoadProcessReport report, Cancell
private async UniTask CheckOnboardingAsync(CancellationToken ct)
{
// It the app is open from any external way, we will ignore the onboarding flow
if (appParameters.HasFlag(APP_PARAMETER_REALM) || appParameters.HasFlag(APP_PARAMETER_POSITION) || appParameters.HasFlag(APP_PARAMETER_LOCAL_SCENE))
if (appParameters.HasFlag(AppArgsFlags.REALM) || appParameters.HasFlag(AppArgsFlags.POSITION) || appParameters.HasFlag(AppArgsFlags.LOCAL_SCENE))
return;

isProfilePendingToBeUpdated = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Cysharp.Threading.Tasks;
using DCL.AsyncLoadReporting;
using DCL.Diagnostics;
using ECS.SceneLifeCycle.Realm;
using System;
using System.Threading;
using Utility.Types;

namespace DCL.UserInAppInitializationFlow.StartupOperations
{
public class SentryDiagnosticStartupOperation : IStartupOperation
{
private readonly IRealmController realmController;
private readonly DiagnosticsContainer diagnosticsContainer;

public SentryDiagnosticStartupOperation(
IRealmController realmController, DiagnosticsContainer diagnosticsContainer)
{
this.realmController = realmController;
this.diagnosticsContainer = diagnosticsContainer;
}

public async UniTask<Result> ExecuteAsync(AsyncLoadProcessReport report, CancellationToken ct)
{
diagnosticsContainer.AddSentryScopeConfigurator((scope) =>
{
diagnosticsContainer.Sentry?.AddRealmInfoToScope(scope,
realmController.RealmData.Ipfs.CatalystBaseUrl.Value,
realmController.RealmData.Ipfs.ContentBaseUrl.Value,
realmController.RealmData.Ipfs.LambdasBaseUrl.Value);
});
return Result.SuccessResult();
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ UniTask<Result> TryChangeRealmAsync(URLDomain realm, CancellationToken ct,
UniTask<bool> CheckRealmIsReacheableAsync(URLDomain realm, CancellationToken ct);

UniTask<Result> TryInitializeTeleportToParcelAsync(Vector2Int parcel, CancellationToken ct,
bool isLocal = false);
bool isLocal = false, bool forceChangeRealm = false);

UniTask InitializeTeleportToSpawnPointAsync(AsyncLoadProcessReport teleportLoadReport, CancellationToken ct, Vector2Int parcelToTeleport = default);

Expand Down
41 changes: 41 additions & 0 deletions Explorer/Assets/Scripts/Global/AppArgs/AppArgsFlags.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
namespace Global.AppArgs
{
public static class AppArgsFlags
{
public const string DEBUG = "debug";
public const string DCL_EDITOR = "dcl-editor";

public const string ENABLE_VERSION_CONTROL = "versionControl";
public const string SIMULATE_VERSION = "simulateVersion";

public const string SCENE_CONSOLE = "scene-console";

public const string ENVIRONMENT = "dclenv";
public const string REALM = "realm";
public const string LOCAL_SCENE = "local-scene";
public const string POSITION = "position";

public const string FORCED_EMOTES = "self-force-emotes";
public const string SELF_PREVIEW_EMOTES = "self-preview-emotes";
public const string SELF_PREVIEW_WEARABLES = "self-preview-wearables";

public const string CAMERA_REEL = "camera-reel";

public static class Multiplayer
{
public const string COMPRESSION = "compression";
}

public static class FeatureFlags
{
public const string URL = "feature-flags-url";
public const string HOSTNAME = "feature-flags-hostname";
}

public static class Analytics
{
public const string SESSION_ID = "session_id";
public const string LAUNCHER_ID = "launcher_anonymous_id";
}
}
}
3 changes: 3 additions & 0 deletions Explorer/Assets/Scripts/Global/AppArgs/AppArgsFlags.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ApplicationParametersParser : IAppArgs

private static readonly IReadOnlyDictionary<string, string> ALWAYS_IN_EDITOR = new Dictionary<string, string>
{
[IAppArgs.DEBUG_FLAG] = string.Empty,
[AppArgsFlags.DEBUG] = string.Empty,
};

public ApplicationParametersParser() : this(Environment.GetCommandLineArgs()) { }
Expand Down
4 changes: 1 addition & 3 deletions Explorer/Assets/Scripts/Global/AppArgs/IAppArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ namespace Global.AppArgs
{
public interface IAppArgs
{
public const string DEBUG_FLAG = "debug";

bool HasFlag(string flagName);

bool TryGetValue(string flagName, out string? value);
Expand All @@ -16,6 +14,6 @@ public interface IAppArgs
public static class AppArgsExtensions
{
public static bool HasDebugFlag(this IAppArgs args) =>
args.HasFlag(IAppArgs.DEBUG_FLAG);
args.HasFlag(AppArgsFlags.DEBUG);
}
}
6 changes: 3 additions & 3 deletions Explorer/Assets/Scripts/Global/Dynamic/BootstrapContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ await bootstrapContainer.InitializeContainerAsync<BootstrapContainer, BootstrapS
(container.Bootstrap, container.Analytics) = await CreateBootstrapperAsync(debugSettings, applicationParametersParser, container, container.settings, realmLaunchSettings, world, container.settings.BuildData, ct);
(container.IdentityCache, container.VerifiedEthereumApi, container.Web3Authenticator) = CreateWeb3Dependencies(sceneLoaderSettings, web3AccountFactory, browser, container, decentralandUrlsSource);

bool enableSceneDebugConsole = realmLaunchSettings.IsLocalSceneDevelopmentRealm || applicationParametersParser.HasFlag("scene-console");
bool enableSceneDebugConsole = realmLaunchSettings.IsLocalSceneDevelopmentRealm || applicationParametersParser.HasFlag(AppArgsFlags.SCENE_CONSOLE);
container.DiagnosticsContainer = container.enableAnalytics
? DiagnosticsContainer.Create(container.ReportHandlingSettings, enableSceneDebugConsole, (ReportHandler.DebugLog, new CriticalLogsAnalyticsHandler(container.Analytics)))
: DiagnosticsContainer.Create(container.ReportHandlingSettings, enableSceneDebugConsole);
Expand Down Expand Up @@ -134,8 +134,8 @@ void AddIdentityToSentryScope(Scope scope)
{
IAnalyticsService service = CreateAnalyticsService(analyticsConfig, ct);

appArgs.TryGetValue("launcher_anonymous_id", out string? launcherAnonymousId);
appArgs.TryGetValue("session_id", out string? sessionId);
appArgs.TryGetValue(AppArgsFlags.Analytics.LAUNCHER_ID, out string? launcherAnonymousId);
appArgs.TryGetValue(AppArgsFlags.Analytics.SESSION_ID, out string? sessionId);

LauncherTraits launcherTraits = new LauncherTraits
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ namespace Global.Dynamic
[CreateAssetMenu(fileName = "DynamicSceneLoaderSettings", menuName = "SO/DynamicSceneLoaderSettings")]
public class DynamicSceneLoaderSettings : ScriptableObject
{
private const string ENV_PARAM = "dclenv";

[field: SerializeField] public DecentralandEnvironment DecentralandEnvironment { get; private set; }
[field: SerializeField] public List<string> Realms { get; private set; }
[field: SerializeField] public List<string> Web3WhitelistMethods { get; private set; }

public void ApplyConfig(IAppArgs applicationParametersParser)
{
if (applicationParametersParser.TryGetValue(ENV_PARAM, out string? environment))
if (applicationParametersParser.TryGetValue(AppArgsFlags.ENVIRONMENT, out string? environment))
ParseEnvironment(environment!);
}

Expand Down
Loading

0 comments on commit b12b09d

Please sign in to comment.