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

[CI Visibility] Fix errors detected from error tracking. #6222

Merged
merged 2 commits into from
Oct 30, 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
1 change: 0 additions & 1 deletion Datadog.Trace.OSX.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
"tracer\\test\\test-applications\\regression\\Sandbox.AutomaticInstrumentation\\Sandbox.AutomaticInstrumentation.csproj",
"tracer\\test\\test-applications\\regression\\Sandbox.ManualTracing\\Sandbox.ManualTracing.csproj",
"tracer\\test\\test-applications\\regression\\ServiceBus.Minimal.MassTransit\\ServiceBus.Minimal.MassTransit.csproj",
"tracer\\test\\test-applications\\regression\\ServiceBus.Minimal.NServiceBus\\ServiceBus.Minimal.NServiceBus.csproj",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😕

Copy link
Member Author

@tonyredondo tonyredondo Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without that it doesn't build in Rider for mac... it's the filter file

"tracer\\test\\test-applications\\regression\\ServiceBus.Minimal.Rebus\\ServiceBus.Minimal.Rebus.csproj",
"tracer\\test\\test-applications\\regression\\StackExchange.Redis.AssemblyConflict.LegacyProject\\StackExchange.Redis.AssemblyConflict.LegacyProject.csproj",
"tracer\\test\\test-applications\\regression\\StackExchange.Redis.AssemblyConflict.SdkProject\\StackExchange.Redis.AssemblyConflict.SdkProject.csproj",
Expand Down
9 changes: 7 additions & 2 deletions tracer/src/Datadog.Trace/Ci/GitInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,15 @@ private static bool TryGetFrom(DirectoryInfo gitDirectory, out GitInfo gitInfo)

private static DirectoryInfo GetParentGitFolder(string innerFolder)
{
DirectoryInfo dirInfo = new DirectoryInfo(innerFolder);
if (string.IsNullOrEmpty(innerFolder))
{
return null;
}

var dirInfo = new DirectoryInfo(innerFolder);
while (dirInfo != null)
{
DirectoryInfo[] gitDirectories = dirInfo.GetDirectories(".git");
var gitDirectories = dirInfo.GetDirectories(".git");
if (gitDirectories.Length > 0)
{
foreach (var gitDir in gitDirectories)
Expand Down
8 changes: 8 additions & 0 deletions tracer/src/Datadog.Trace/Ci/IntelligentTestRunnerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,14 @@ public async Task<long> SendObjectsPackFileAsync(string commitSha, string[]? com
long totalUploadSize = 0;
foreach (var packFile in packFilesObject.Files)
{
if (!File.Exists(packFile))
{
// Pack files must be sent in order, if a pack file is missing, we stop the upload of the rest of the pack files
// Previous pack files will enrich the backend with some of the data.
Log.Error("ITR: Pack file '{PackFile}' is missing, cancelling upload.", packFile);
break;
}

// Send PackFile content
Log.Information("ITR: Sending {PackFile}", packFile);
totalUploadSize += await WithRetries(InternalSendObjectsPackFileAsync, packFile, MaxRetries).ConfigureAwait(false);
Expand Down
Loading