Skip to content

Commit 72144eb

Browse files
authored
Merge branch 'main' into fix/masstransit-multi-transport-queue-parsing
2 parents e089172 + 8518bf3 commit 72144eb

5 files changed

Lines changed: 183 additions & 110 deletions

File tree

.github/workflows/all_solutions.yml

Lines changed: 141 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,143 @@ jobs:
180180
actions: write
181181
contents: read
182182

183+
# ---------------------------------------------------------------------------
184+
# Compute the set of test namespaces to run, after applying exclusions from
185+
# GitHub repo variables. To skip a namespace, add it to the JSON-array
186+
# variable in Settings > Secrets and variables > Actions > Variables:
187+
# INTEGRATION_EXCLUDE_NAMESPACES (e.g. ["LLM","OpenTelemetry"])
188+
# UNBOUNDED_EXCLUDE_NAMESPACES (e.g. ["Couchbase"])
189+
# ---------------------------------------------------------------------------
190+
get-test-namespaces:
191+
name: Get Test Namespaces
192+
needs: check-modified-files
193+
if: github.actor != 'dependabot[bot]' && (needs.check-modified-files.outputs.source-files-changed == 'true' || github.event.release || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
194+
runs-on: ubuntu-latest
195+
outputs:
196+
integration-namespaces: ${{ steps.compute.outputs.integration }}
197+
unbounded-namespaces: ${{ steps.compute.outputs.unbounded }}
198+
steps:
199+
- name: Harden Runner
200+
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
201+
with:
202+
disable-sudo: true
203+
egress-policy: audit
204+
205+
- name: Compute namespace lists
206+
id: compute
207+
env:
208+
INTEGRATION_EXCLUDE: ${{ vars.INTEGRATION_EXCLUDE_NAMESPACES }}
209+
UNBOUNDED_EXCLUDE: ${{ vars.UNBOUNDED_EXCLUDE_NAMESPACES }}
210+
run: |
211+
# ── Canonical namespace lists ──────────────────────────────────
212+
# maintain alphabetical order, please!
213+
integration_all='[
214+
"AgentFeatures",
215+
"AgentLogs",
216+
"AgentMetrics",
217+
"Api",
218+
"AppDomainCaching",
219+
"AspNetCore",
220+
"AwsLambda.AutoInstrumentation",
221+
"AwsLambda.CloudWatch",
222+
"AwsLambda.Custom",
223+
"AwsLambda.DynamoDb",
224+
"AwsLambda.General",
225+
"AwsLambda.Kinesis",
226+
"AwsLambda.S3",
227+
"AwsLambda.Ses",
228+
"AwsLambda.Sns",
229+
"AwsLambda.Sqs",
230+
"AwsLambda.WebRequest",
231+
"AwsSdk",
232+
"AzureFunction",
233+
"BasicInstrumentation",
234+
"Blazor",
235+
"CatInbound",
236+
"CatOutbound",
237+
"CodeLevelMetrics",
238+
"Configuration",
239+
"CSP",
240+
"CustomAttributes",
241+
"CustomInstrumentation",
242+
"DataTransmission",
243+
"DistributedTracing",
244+
"Errors",
245+
"HttpClientInstrumentation",
246+
"HybridHttpContextStorage",
247+
"InfiniteTracing",
248+
"LLM",
249+
"Logging.AuditLog",
250+
"Logging.ContextData",
251+
"Logging.HsmAndCsp",
252+
"Logging.LocalDecoration",
253+
"Logging.LogLevelDetection",
254+
"Logging.MaxSamplesStored",
255+
"Logging.MetricsAndForwarding",
256+
"Logging.ZeroMaxSamplesStored",
257+
"MassTransit",
258+
"OpenTelemetry",
259+
"Owin",
260+
"ReJit.NetCore",
261+
"ReJit.NetFramework",
262+
"RequestHandling",
263+
"RequestHeadersCapture.AspNet",
264+
"RequestHeadersCapture.AspNetCore",
265+
"RequestHeadersCapture.EnvironmentVariables",
266+
"RequestHeadersCapture.Owin",
267+
"RequestHeadersCapture.WCF",
268+
"RestSharp",
269+
"WCF.Client.IIS.ASPDisabled",
270+
"WCF.Client.IIS.ASPEnabled",
271+
"WCF.Client.Self",
272+
"WCF.Service.IIS.ASPDisabled",
273+
"WCF.Service.IIS.ASPEnabled",
274+
"WCF.Service.Self"
275+
]'
276+
277+
unbounded_all='[
278+
"AzureServiceBus",
279+
"CosmosDB",
280+
"Couchbase",
281+
"Elasticsearch",
282+
"MongoDB",
283+
"Msmq",
284+
"MsSql",
285+
"MySql",
286+
"NServiceBus",
287+
"NServiceBus5",
288+
"Oracle",
289+
"Postgres",
290+
"RabbitMq",
291+
"Redis"
292+
]'
293+
294+
# ── Read exclusion variables (default to empty array) ─────────
295+
integration_exclude="${INTEGRATION_EXCLUDE:-[]}"
296+
unbounded_exclude="${UNBOUNDED_EXCLUDE:-[]}"
297+
298+
# ── Apply exclusions ──────────────────────────────────────────
299+
integration=$(jq -c '. - $ex' --argjson ex "$integration_exclude" <<< "$integration_all")
300+
unbounded=$(jq -c '. - $ex' --argjson ex "$unbounded_exclude" <<< "$unbounded_all")
301+
302+
# ── Log what was excluded ─────────────────────────────────────
303+
int_removed=$(jq -c '. as $all | $all - ($all - $ex)' --argjson ex "$integration_exclude" <<< "$integration_all")
304+
unb_removed=$(jq -c '. as $all | $all - ($all - $ex)' --argjson ex "$unbounded_exclude" <<< "$unbounded_all")
305+
306+
echo "::group::Integration test namespaces"
307+
echo "Excluded: $int_removed"
308+
echo "Running: $integration"
309+
echo "::endgroup::"
310+
311+
echo "::group::Unbounded test namespaces"
312+
echo "Excluded: $unb_removed"
313+
echo "Running: $unbounded"
314+
echo "::endgroup::"
315+
316+
echo "integration=$integration" >> "$GITHUB_OUTPUT"
317+
echo "unbounded=$unbounded" >> "$GITHUB_OUTPUT"
318+
shell: bash
319+
183320
build-integration-tests:
184321
needs: build-fullagent-msi
185322
name: Build IntegrationTests
@@ -400,73 +537,12 @@ jobs:
400537
if-no-files-found: error
401538

402539
run-integration-tests:
403-
needs: [build-integration-tests]
540+
needs: [build-integration-tests, get-test-namespaces]
404541
name: Run IntegrationTests
405542
runs-on: windows-2025-vs2026
406543
strategy:
407544
matrix:
408-
namespace: [
409-
AgentFeatures,
410-
AgentLogs,
411-
AgentMetrics,
412-
Api,
413-
AppDomainCaching,
414-
AspNetCore,
415-
AwsLambda.AutoInstrumentation,
416-
AwsLambda.CloudWatch,
417-
AwsLambda.Custom,
418-
AwsLambda.DynamoDb,
419-
AwsLambda.General,
420-
AwsLambda.Kinesis,
421-
AwsLambda.S3,
422-
AwsLambda.Ses,
423-
AwsLambda.Sns,
424-
AwsLambda.Sqs,
425-
AwsLambda.WebRequest,
426-
AwsSdk,
427-
AzureFunction,
428-
BasicInstrumentation,
429-
Blazor,
430-
CatInbound,
431-
CatOutbound,
432-
CodeLevelMetrics,
433-
Configuration,
434-
CSP,
435-
CustomAttributes,
436-
CustomInstrumentation,
437-
DataTransmission,
438-
DistributedTracing,
439-
Errors,
440-
HttpClientInstrumentation,
441-
HybridHttpContextStorage,
442-
InfiniteTracing,
443-
LLM,
444-
Logging.AuditLog,
445-
Logging.ContextData,
446-
Logging.HsmAndCsp,
447-
Logging.LocalDecoration,
448-
Logging.LogLevelDetection,
449-
Logging.MaxSamplesStored,
450-
Logging.MetricsAndForwarding,
451-
Logging.ZeroMaxSamplesStored,
452-
OpenTelemetry,
453-
Owin,
454-
MassTransit,
455-
ReJit.NetCore,
456-
ReJit.NetFramework,
457-
RequestHandling,
458-
RequestHeadersCapture.AspNet,
459-
RequestHeadersCapture.AspNetCore,
460-
RequestHeadersCapture.EnvironmentVariables,
461-
RequestHeadersCapture.Owin,
462-
RequestHeadersCapture.WCF,
463-
RestSharp,
464-
WCF.Client.IIS.ASPDisabled,
465-
WCF.Client.IIS.ASPEnabled,
466-
WCF.Client.Self,
467-
WCF.Service.IIS.ASPDisabled,
468-
WCF.Service.IIS.ASPEnabled,
469-
WCF.Service.Self] # maintain alphabetical order, please!
545+
namespace: ${{ fromJson(needs.get-test-namespaces.outputs.integration-namespaces) }}
470546
fail-fast: false # we don't want one test failure in one namespace to kill the other runs
471547

472548
env:
@@ -657,28 +733,12 @@ jobs:
657733
if-no-files-found: error
658734

659735
run-unbounded-tests:
660-
needs: [build-unbounded-tests]
736+
needs: [build-unbounded-tests, get-test-namespaces]
661737
name: Run Unbounded Tests
662738
runs-on: windows-2025-vs2026
663739
strategy:
664740
matrix:
665-
namespace:
666-
[
667-
AzureServiceBus,
668-
CosmosDB,
669-
Couchbase,
670-
Elasticsearch,
671-
MongoDB,
672-
Msmq,
673-
MsSql,
674-
MySql,
675-
NServiceBus,
676-
NServiceBus5,
677-
Oracle,
678-
Postgres,
679-
RabbitMq,
680-
Redis,
681-
]
741+
namespace: ${{ fromJson(needs.get-test-namespaces.outputs.unbounded-namespaces) }}
682742
fail-fast: false # we don't want one test failure in one namespace to kill the other runs
683743

684744
env:

build/Packaging/AzureSiteExtension/Content/web.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@
99
<staticContent>
1010
<mimeMap fileExtension=".log" mimeType="text/plain" />
1111
</staticContent>
12+
<httpProtocol>
13+
<customHeaders>
14+
<add name="X-Frame-Options" value="SAMEORIGIN" />
15+
</customHeaders>
16+
</httpProtocol>
1217
</system.webServer>
1318
</configuration>

tests/Agent/IntegrationTests/UnboundedServices/couchbase/configure-server.sh

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
#!/bin/sh
2-
set -e
2+
set -e
33
/entrypoint.sh couchbase-server &
44

5-
if [ ! -f /nr-container-configured ]; then
5+
# wait for the server to be up and running
6+
# when the file /opt/couchbase/var/lib/couchbase/container-configured exists, the server is ready
7+
while [ ! -f /opt/couchbase/var/lib/couchbase/container-configured ]; do
8+
sleep 1
9+
done
610

7-
# wait for the server to be up and running
8-
# when the file /opt/couchbase/var/lib/couchbase/container-configured exists, the server is ready
9-
while [ ! -f /opt/couchbase/var/lib/couchbase/container-configured ]; do
10-
sleep 1
11-
done
11+
echo "Waiting a bit longer for the server to be ready..."
12+
sleep 15s
1213

13-
echo "Waiting a bit longer for the server to be ready..."
14-
sleep 15s
14+
# Always reset the administrator password on startup to ensure it matches
15+
# the expected value, even after container restarts where the sandbox image
16+
# may have re-initialized with its default password.
17+
echo "Resetting administrator password"
18+
/opt/couchbase/bin/couchbase-cli reset-admin-password --new-password ${COUCHBASE_ADMINISTRATOR_PASSWORD} || { echo "Error: Failed to reset administrator password"; exit 1; }
1519

16-
# use the couchbase cli to change the administrator password
17-
echo "Changing administrator password"
18-
/opt/couchbase/bin/couchbase-cli reset-admin-password --new-password ${COUCHBASE_ADMINISTRATOR_PASSWORD} || { echo "Error: Failed to reset administrator password"; exit 1; }
20+
# Only create the FTS index on first run (idempotent but avoids noisy errors on restart)
21+
if [ ! -f /nr-container-configured ]; then
1922

2023
# Get UUID of travel-sample bucket
2124
uuid=$(curl -u Administrator:${COUCHBASE_ADMINISTRATOR_PASSWORD} http://127.0.0.1:8091/pools/default/buckets/travel-sample | jq '. | .uuid') || { echo "Error: Failed to retrieve UUID"; exit 1; }
2225

2326
echo "Creating a full text search index on the hotel collection in the inventory scope"
24-
27+
2528
curl -XPUT -H "Content-Type: application/json" -u Administrator:${COUCHBASE_ADMINISTRATOR_PASSWORD} \
2629
http://localhost:8094/api/bucket/travel-sample/scope/inventory/index/index-hotel-description \
2730
-d '{

tests/Agent/IntegrationTests/UnboundedServices/deploy_to_aks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ for manifest in k8s/*.yaml; do
3333
fi
3434

3535
echo "Applying $manifest..."
36-
envsubst < $manifest | kubectl apply -f -
36+
envsubst '${RESOURCE_GROUP} ${PUBLIC_IP_NAME} ${PUBLIC_IP}' < $manifest | kubectl apply -f -
3737
done
3838

3939
echo "Deployment to AKS completed successfully!"

tests/Agent/IntegrationTests/UnboundedServices/k8s/couchbase.yaml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,26 @@ spec:
3232
secretKeyRef:
3333
name: unboundedservices-secrets
3434
key: COUCHBASE_ADMINISTRATOR_PASSWORD
35-
# livenessProbe:
36-
# exec:
37-
# command:
38-
# - /bin/sh
39-
# - -c
40-
# - "couchbase-cli server-info -c localhost:8091 -u Administrator -p $COUCHBASE_ADMINISTRATOR_PASSWORD | grep -q '\"status\": \"healthy\"' || exit 1"
41-
# initialDelaySeconds: 120 # wait a while because couchbase takes time to start
42-
# periodSeconds: 60
43-
# timeoutSeconds: 5
44-
# failureThreshold: 3
45-
# resources:
46-
# requests:
47-
# memory: "8Gi"
48-
# limits:
49-
# memory: "8Gi"
35+
readinessProbe:
36+
exec:
37+
command:
38+
- /bin/sh
39+
- -c
40+
- "couchbase-cli server-info -c localhost:8091 -u Administrator -p $COUCHBASE_ADMINISTRATOR_PASSWORD | grep -q '\"status\": \"healthy\"' || exit 1"
41+
initialDelaySeconds: 90
42+
periodSeconds: 15
43+
timeoutSeconds: 10
44+
failureThreshold: 3
45+
livenessProbe:
46+
exec:
47+
command:
48+
- /bin/sh
49+
- -c
50+
- "couchbase-cli server-info -c localhost:8091 -u Administrator -p $COUCHBASE_ADMINISTRATOR_PASSWORD | grep -q '\"status\": \"healthy\"' || exit 1"
51+
initialDelaySeconds: 120
52+
periodSeconds: 60
53+
timeoutSeconds: 10
54+
failureThreshold: 3
5055
---
5156
apiVersion: v1
5257
kind: Service

0 commit comments

Comments
 (0)