Pretty difficult to use
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
Rechercherichtung
Beginne mit den im Bericht genannten SyntheticsApi-Einstiegspunkten—list_tests, get_api_test, patch_test und update_api_test—und stelle das Verhalten der Version 2.19.0 einschließlich des Validierungsfehlers wieder her. Untersuche außerdem das Verhalten von repr() für Monitor und dessen Feld type. Das Issue muss in umsetzbare Fehler aufgeteilt werden, mit separatem erwarteten Verhalten und Tests, bevor die Implementierung als abgeschlossen betrachtet werden kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Describe the bug
This API is just not great.
I needed to write a script to just find & replace one Slack channel that was our notifications on monitors to another. This was … difficult.
I'm going to summarize a number of usability issues here; filing a bug for each would be onerous.
-
SyntheticsApiincludes both apatch_test, and anupdate_api_test. I have absolutely no idea what the difference between "patch" and "update" is, and the docs don't tell me. -
AFAICT,
SyntheticsApi.patch_test(as documented here) is a lie? I have the latest version of the library, and AFAICT, that, and the associated types, just don't exist. -
If you
SyntheticsApi.list_tests, you get, essentially, a list ofSyntheticsTestDetails. (It is wrapped by a pointless wrapper object, but that's whatever.) However,update_api_testrequires aSyntheticsAPITest, so you can't pass the result to it! -
If you call
get_api_test, however, you'll get the right type: aSyntheticsAPITest! But attempting to then callupdate_api_testwith that results in a runtime error:HTTP response body: {'errors': ["Additional properties are not allowed ('modified_at', 'creator', 'monitor_id', 'created_at' were unexpected)"]}I attempted a number of things to attempt to remove those properties form the object, but none of which worked. … the entire point of a type system is that if you function declares itself to take a
Foo, then you should be able to pass it instances ofFoo. If you can't, you have foo instances that aren't reallyFoo. -
#1794, which was severe enough that I have split it out to a separate bug.
-
authn issues appear to return 403, which sent me down the wrong paths for a bit.
-
Many of the types in the library, when
repr'd, do not emit faithfulreprs. For example, if yourepra monitor, you'll get,… 'type': 'synthetics alert'}This led to me writing bugs such as,
monitor['type'] == 'synthetics alert'Which is
False(!) for the above. That's because the value for'type'there is not truly a string, it's aMonitorType. Thereprhere is just … lying.Python's has built-in support for enumerations in the form of the
enummodule, and it won't do stuff like this that will leave one pulling out one's hair mid debugging session.(Even the outer type there appears to be a
dictwhenrepr()'d … but its not.)
Environment and Versions (please complete the following information):
A clear and precise description of your setup:
- version for this project in use: 2.19.0 (latest, as of the time of writing)
Additional context
As you might be able to tell from the above, most of my frustration was around the synthetics portion. I was actually successful at updating non-synthetics monitors — except for running into errors with monitors that were actually synthetics (another Liskov substitutability violation, really), and then attempting to update those with SyntheticsApi. I eventually gave up, and just did it by hand … we don't have that many synthetics.
- Vorherrschende Sprache
- Python
- Sterne
- 167
- Forks
- 55
- Ø Merge
- 2 T. 23 Std.
- Gemergte PRs (30 T.)
- 74
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus DataDog/datadog-api-client-python
-
Python 3.13/3.14 SyntaxWarning in v1 LogsPipelinesApi docstringEvtl. vergeben @Mirochill hat das vor 145 Tagen übernommen. Offenstale
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 72/100
DataDog/datadog-api-client-python#3535 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
kind/bug stale
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 66/100
DataDog/datadog-api-client-python#3717 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
kind/bug stale
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 75/100
DataDog/datadog-api-client-python#3656 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
kind/bug stale
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
DataDog/datadog-api-client-python#3120 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
stale
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
DataDog/datadog-api-client-python#2986 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in DataDog/datadog-api-client-python
Ähnliche Issues
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunkEvtl. vergeben @rodricksz4h5 hat das heute übernommen. Offenarea/streaming comp/gateway P2 type/security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
NousResearch/hermes-agent#138245 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS stepEvtl. vergeben @github-actions hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
correction metadata
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
acl-org/acl-anthology#10378 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom nameEvtl. vergeben @12YYCCYY16 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
prowler-cloud/prowler#13033 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
graygarbage/HermesKey#23 ·