Skip to content

Commit da087c6

Browse files
fix: add tls insecure to generated otlp exporter config
The OTLP endpoint otlp.actions.self-hosted-runners.internal:4317 uses a self-signed certificate that does not match its hostname. The existing github.yaml config already sets tls.insecure: true for the same endpoint. Add the same setting to the generated exporter fragment to prevent the TLS handshake failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 28090db commit da087c6

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

actions/enable-log-forwarding/enable_log_forwarding.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ def build_config(
217217
config["exporters"] = {
218218
exporter_name: {
219219
"endpoint": resolved_endpoint,
220+
"tls": {"insecure": True},
220221
}
221222
}
222223

actions/enable-log-forwarding/tests/test_enable_log_forwarding.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def test_build_config_exporter_block_is_conditionally_defined(
159159
assert ("exporters" in config) is has_exporters_block
160160
if has_exporters_block:
161161
assert config["exporters"][module.EXPORTER_NAME]["endpoint"] == "otel:4318"
162+
assert config["exporters"][module.EXPORTER_NAME]["tls"] == {"insecure": True}
162163

163164

164165
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)