Skip to content

Commit c0e73ee

Browse files
committed
# This is a combination of 3 commits.
# This is the 1st commit message: Only require endpoint name to be present to consider an endpoint detected # This is the commit message #2: Isolate changes # This is the commit message #3: More rollbacks Only require endpoint name to be available when detecting receiving endpoint details Fix merge
1 parent 3b02216 commit c0e73ee

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ public async Task Should_include_headers_required_by_ServicePulse()
4545
{
4646
c.AddMinimalRequiredHeaders();
4747

48-
// This is needed for ServiceControl to be able to detect both endpoint (via failed q header) and host via the processing machine header
49-
// Missing endpoint or host will cause a null ref in ServicePulse
50-
c.Headers[Headers.ProcessingMachine] = "MyMachine";
51-
5248
c.Headers[FaultsHeaderKeys.ExceptionType] = "SomeExceptionType";
5349
c.Headers[FaultsHeaderKeys.Message] = "Some message";
5450
})
@@ -63,7 +59,6 @@ public async Task Should_include_headers_required_by_ServicePulse()
6359
// ServicePulse assumes that the receiving endpoint name is present
6460
Assert.That(failure.ReceivingEndpoint, Is.Not.Null);
6561
Assert.That(failure.ReceivingEndpoint.Name, Is.EqualTo(context.EndpointNameOfReceivingEndpoint));
66-
Assert.That(failure.ReceivingEndpoint.Host, Is.EqualTo("MyMachine"));
6762

6863
// ServicePulse needs both an exception type and description to render the UI in a resonable way
6964
Assert.That(failure.Exception.ExceptionType, Is.EqualTo("SomeExceptionType"));

src/ServiceControl/Operations/EndpointDetailsParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public static EndpointDetails ReceivingEndpoint(IReadOnlyDictionary<string, stri
8080
endpoint.Host = queueAndMachinename.Machine;
8181
}
8282

83-
// If we've been now able to get the endpoint details, return the new info.
84-
if (!string.IsNullOrEmpty(endpoint.Name) && !string.IsNullOrEmpty(endpoint.Host))
83+
// If we've been now able to get at least the endpoint name, return the new info.
84+
if (!string.IsNullOrEmpty(endpoint.Name))
8585
{
8686
return endpoint;
8787
}

0 commit comments

Comments
 (0)