Pretty difficult to use
Mantenedores costumam responder em até 2 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 20/100
Direção de pesquisa
Comece pelos pontos de entrada de SyntheticsApi mencionados no relatório—list_tests, get_api_test, patch_test e update_api_test—e reproduza o comportamento da versão 2.19.0, incluindo o erro de validação. Inspecione também o comportamento de repr() para Monitor e seu campo type. A issue precisa ser delimitada em bugs acionáveis, com comportamento esperado e testes separados, antes que a implementação possa ser considerada concluída.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 167
- Forks
- 55
- Merge médio
- 3d 17h
- PRs com merge (30d)
- 80
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de DataDog/datadog-api-client-python
-
Python 3.13/3.14 SyntaxWarning in v1 LogsPipelinesApi docstringTalvez já em andamento @Mirochill assumiu há 143 dias. Abertastale
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 72/100
DataDog/datadog-api-client-python#3535 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
kind/bug stale
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 66/100
DataDog/datadog-api-client-python#3717 · 3 comentários ·
Mantenedores costumam responder em até 2 dias
-
kind/bug stale
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 75/100
DataDog/datadog-api-client-python#3656 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
kind/bug stale
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 38/100
DataDog/datadog-api-client-python#3120 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
stale
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 45/100
DataDog/datadog-api-client-python#2986 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
Todas as issues de DataDog/datadog-api-client-python
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 63/100
GAM-team/got-your-back#547 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
UKGovernmentBEIS/inspect_ai#5821 ·
Mantenedores costumam responder em até 1 dia
-
docs help wanted
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 75/100
-
evidence wanted good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
open-coder-ai/agentseam#195 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia