Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

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

Andras Bacsaiefbd64346c75
diff --git a/openapi.json b/openapi.json
index d732c04b2a..e48c0d86e1 100644
--- a/openapi.json
+++ b/openapi.json
@@ -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"
},
diff --git a/openapi.yaml b/openapi.yaml
index f471f09b8a..a0ed28c8e7 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -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:
diff --git a/tests/Unit/ParseCommandsByLineForSudoTest.php b/tests/Unit/ParseCommandsByLineForSudoTest.php
index a0ef50d1ad..9ea9bf6a46 100644
--- a/tests/Unit/ParseCommandsByLineForSudoTest.php
+++ b/tests/Unit/ParseCommandsByLineForSudoTest.php
@@ -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',