fix(log-drains): support Axiom edge domains and sudo shell operators

This commit is contained in:
Andras Bacsai
2026-10-27 18:56:55 +01:00
parent d59899469c
commit efbd64346c
3 changed files with 29 additions and 0 deletions
+14
View File
@@ -17172,6 +17172,12 @@
"null"
]
},
"logdrain_axiom_domain": {
"type": [
"string",
"null"
]
},
"logdrain_axiom_api_key": {
"description": "Only present with read:sensitive.",
"type": "string"
@@ -17270,6 +17276,10 @@
"logdrain_axiom_dataset_name": {
"type": "string"
},
"logdrain_axiom_domain": {
"description": "Base domain of the Axiom edge deployment. Default: us-east-1.aws.edge.axiom.co. Use eu-central-1.aws.edge.axiom.co for EU datasets.",
"type": "string"
},
"logdrain_axiom_api_key": {
"type": "string"
},
@@ -26043,6 +26053,10 @@
"logdrain_axiom_dataset_name": {
"type": "string"
},
"logdrain_axiom_domain": {
"type": "string",
"description": "Base domain of the Axiom edge deployment, for example us-east-1.aws.edge.axiom.co or eu-central-1.aws.edge.axiom.co."
},
"logdrain_cloudwatch_region": {
"type": "string"
},
+7
View File
@@ -10930,6 +10930,7 @@ paths:
logdrain_newrelic_base_uri: { type: [string, 'null'] }
is_logdrain_axiom_enabled: { type: boolean }
logdrain_axiom_dataset_name: { type: [string, 'null'] }
logdrain_axiom_domain: { type: [string, 'null'] }
logdrain_axiom_api_key: { description: 'Only present with read:sensitive.', type: string }
is_logdrain_custom_enabled: { type: boolean }
logdrain_custom_config: { description: 'Only present with read:sensitive.', type: string }
@@ -10978,6 +10979,9 @@ paths:
type: boolean
logdrain_axiom_dataset_name:
type: string
logdrain_axiom_domain:
description: 'Base domain of the Axiom edge deployment. Default: us-east-1.aws.edge.axiom.co. Use eu-central-1.aws.edge.axiom.co for EU datasets.'
type: string
logdrain_axiom_api_key:
type: string
is_logdrain_custom_enabled:
@@ -16672,6 +16676,9 @@ components:
type: string
logdrain_axiom_dataset_name:
type: string
logdrain_axiom_domain:
type: string
description: 'Base domain of the Axiom edge deployment, for example us-east-1.aws.edge.axiom.co or eu-central-1.aws.edge.axiom.co.'
logdrain_cloudwatch_region:
type: string
logdrain_cloudwatch_group:
@@ -73,6 +73,14 @@ test('preserves quoted backup container and file arguments for a non-root server
expect($result)->toBe(['sudo '.$command]);
});
test('does not add sudo to && and || inside a docker exec sh -c script', function () {
$command = "docker exec postgres sh -c '/tmp/restore.sh && rm -f /tmp/restore.sql || exit 1'";
$result = parseCommandsByLineForSudo(collect([$command]), $this->server);
expect($result[0])->toBe("sudo bash -c 'docker exec postgres sh -c '\\''/tmp/restore.sh && rm -f /tmp/restore.sql || exit 1'\\'''");
});
test('wraps complex Docker install command with multiple fallbacks', function () {
$commands = collect([
'curl --max-time 300 https://releases.rancher.com/install-docker/27.3.sh | sh || curl https://get.docker.com | sh -s -- --version 27.3',