Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move all RC int values to long, to mirror RC backend #6219

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public ApplyDetails(string filename)

public string Filename { get; }

public uint ApplyState { get; set; }
public ulong ApplyState { get; set; }

public string? Error { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Datadog.Trace.RemoteConfigurationManagement.Protocol
{
internal class RcmCachedTargetFile
{
public RcmCachedTargetFile(string path, int length, List<RcmCachedTargetFileHash> hashes)
public RcmCachedTargetFile(string path, long length, List<RcmCachedTargetFileHash> hashes)
{
Path = path;
Length = length;
Expand All @@ -21,7 +21,7 @@ public RcmCachedTargetFile(string path, int length, List<RcmCachedTargetFileHash
public string Path { get; }

[JsonProperty("length")]
public int Length { get; }
public long Length { get; }

[JsonProperty("hashes")]
public List<RcmCachedTargetFileHash> Hashes { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Datadog.Trace.RemoteConfigurationManagement.Protocol
{
internal class RcmClientState
{
public RcmClientState(int rootVersion, int targetsVersion, List<RcmConfigState> configStates, bool hasError, string error, string backendClientState)
public RcmClientState(long rootVersion, long targetsVersion, List<RcmConfigState> configStates, bool hasError, string error, string backendClientState)
{
RootVersion = rootVersion;
TargetsVersion = targetsVersion;
Expand All @@ -21,7 +21,7 @@ public RcmClientState(int rootVersion, int targetsVersion, List<RcmConfigState>
}

[JsonProperty("root_version")]
public int RootVersion { get; }
public long RootVersion { get; }

[JsonProperty("targets_version")]
public long TargetsVersion { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Datadog.Trace.RemoteConfigurationManagement.Protocol
{
internal class RcmConfigState
{
public RcmConfigState(string id, int version, string product, uint applyState, string applyError = null)
public RcmConfigState(string id, long version, string product, ulong applyState, string applyError = null)
{
Id = id;
Version = version;
Expand All @@ -22,13 +22,13 @@ public RcmConfigState(string id, int version, string product, uint applyState, s
public string Id { get; }

[JsonProperty("version")]
public int Version { get; }
public long Version { get; }
andrewlock marked this conversation as resolved.
Show resolved Hide resolved

[JsonProperty("product")]
public string Product { get; }

[JsonProperty("apply_state")]
public uint ApplyState { get; }
public ulong ApplyState { get; }

[JsonProperty("apply_error")]
public string ApplyError { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class Signed
public Dictionary<string, Target> Targets { get; set; } = new();

[JsonProperty("version")]
public int Version { get; set; }
public long Version { get; set; }

[JsonProperty("custom")]
public TargetsCustom Custom { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ internal class Target
public Dictionary<string, string> Hashes { get; set; } = new();

[JsonProperty("length")]
public int Length { get; set; }
public long Length { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ namespace Datadog.Trace.RemoteConfigurationManagement.Protocol.Tuf
internal class TargetCustom
{
[JsonProperty("v")]
public int V { get; set; }
public long V { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ internal class RcmSubscriptionManager : IRcmSubscriptionManager
private IReadOnlyList<ISubscription> _subscriptions = [];

private string? _backendClientState;
private int _targetsVersion;
private long _targetsVersion;
private BigInteger _capabilities;
private string? _lastPollError;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ internal class RemoteConfiguration : IEquatable<RemoteConfiguration>
public RemoteConfiguration(
RemoteConfigurationPath path,
byte[] contents,
int length,
long length,
Dictionary<string, string> hashes,
int version)
long version)
{
Path = path;
Contents = contents;
Expand All @@ -29,11 +29,11 @@ public RemoteConfiguration(

public byte[] Contents { get; }

public int Length { get; }
public long Length { get; }

public Dictionary<string, string> Hashes { get; }

public int Version { get; }
public long Version { get; }

public override bool Equals(object o)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Datadog.Trace.RemoteConfigurationManagement
{
internal class RemoteConfigurationCache
{
public RemoteConfigurationCache(RemoteConfigurationPath path, int length, Dictionary<string, string> hashes, int version)
public RemoteConfigurationCache(RemoteConfigurationPath path, long length, Dictionary<string, string> hashes, long version)
{
Path = path;
Length = length;
Expand All @@ -20,13 +20,13 @@ public RemoteConfigurationCache(RemoteConfigurationPath path, int length, Dictio

public RemoteConfigurationPath Path { get; }

public int Length { get; }
public long Length { get; }

public Dictionary<string, string> Hashes { get; }

public int Version { get; }
public long Version { get; }

public uint ApplyState { get; private set; } = ApplyStates.UNACKNOWLEDGED;
public ulong ApplyState { get; private set; } = ApplyStates.UNACKNOWLEDGED;

public string Error { get; private set; }

Expand Down
Loading