You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The synthetics api for running tests triggered from ci with metadata included produces a 502 error. HTTP response body: {"errors": ["'pipeline' should be object"]}
With the metadata removed, the synthetics test is triggers successfully but without the metadata present, it's impossible to tell which branch/commit triggered the test.
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import synthetics_api
from datadog_api_client.v1.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = synthetics_api.SyntheticsApi(api_client)
body = SyntheticsCITestBody(
tests=[
SyntheticsCITest(
metadata=SyntheticsCITestMetadata(
ci=SyntheticsCITestMetadataCi(
pipeline="pipeline_example",
provider="provider_example",
),
git=SyntheticsCITestMetadataGit(
branch="branch_example",
commit_sha="commit_sha_example",
),
),
public_id="A_VALID_TEST_ID",
),
],
) # SyntheticsCITestBody | Details of the test to trigger.
# example passing only required values which don't have defaults set
try:
# Trigger tests from CI/CD pipelines
api_response = api_instance.trigger_ci_tests(body)
print(api_response)
except ApiException as e:
print("Exception when calling SyntheticsApi->trigger_ci_tests: %s\n" % e)
Expected behavior
The synthetic test is triggered, and is displayed in datadog with the supplied metadata (branch, pipeline, commit etc.)
Environment and Versions (please complete the following information):
datadogpy v0.42.0
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
Verify that you can still reproduce the issue in the latest version of this project.
Comment that the issue is still reproducible and include updated details requested in the issue template.
Describe the bug
The synthetics api for running tests triggered from ci with metadata included produces a 502 error.
HTTP response body: {"errors": ["'pipeline' should be object"]}
With the metadata removed, the synthetics test is triggers successfully but without the metadata present, it's impossible to tell which branch/commit triggered the test.
To Reproduce
Tested with curl:
Also tested with python client using the example in the docs from https://datadoghq.dev/datadog-api-client-python/v1/SyntheticsApi/#trigger_ci_tests.
This is simplified by removing everything else not needed, keeping the metadata.
Expected behavior
The synthetic test is triggered, and is displayed in datadog with the supplied metadata (branch, pipeline, commit etc.)
Environment and Versions (please complete the following information):
datadogpy v0.42.0
The text was updated successfully, but these errors were encountered: