[pull] master from DataDog:master#647
Merged
Merged
Conversation
* Model GitHub API enum fields as StrEnum in the async client Convert response-model fields the GitHub OpenAPI description (pinned to GITHUB_API_VERSION 2022-11-28) declares as an enum into StrEnums, per the github_async guidelines: - PullRequestState (open, closed) for PullRequest.state - WorkflowJobStatus / WorkflowJobConclusion for WorkflowJob - JobStepStatus (3-value) for JobStep.status (JobStep.conclusion has no declared enum, kept str | None) - CheckRunStatus / CheckRunConclusion for CheckRun WorkflowRun.status/conclusion and GitHubUser.type declare no enum in the description, so they stay free-form strings. Add WorkflowRun.is_completed helper, retype update_check_run's conclusion param, and cover the new field types in the async client unit tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Add changelog entry Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Sort model re-exports (ruff isort) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Change changelog entry type to fixed Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Use auto() for StrEnum values in the async GitHub models Every member's declared value equals its lowercased name, and StrEnum's auto() generates exactly that, so this is behavior-preserving. Also document in the folder AGENTS.md when auto() applies and when values must stay explicit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Add stale conclusion; refactor github_async client tests to endpoint-level coverage - Add STALE to CheckRunConclusion: GitHub can return conclusion="stale" on a check run (present in the update-a-check-run request enum/docs though omitted from the response schema), so the model must accept it. - Drop the model-only tests that just exercised Pydantic; move enum-type coverage into the endpoint tests (parametrized over the API response), where a broken model breaks a real client test. - Standardize every payload-builder helper on the **overrides pattern and merge the duplicate workflow-job builder into one. - Fill endpoint-coverage gaps: get_pull_request (success/headers/http_error) and create/update_check_run http-error tests; fold is_completed into a parametrized test_get_workflow_run_success. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Drop leading underscores from test helpers in test_github_async.py Non-public module-level helpers and constants don't need a privacy underscore prefix; it's noise. Applies the convention from PR #24253 review to this branch's test file. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Give test payload builders explicit params instead of bare **overrides Each fixture builder now names the fields it expects and keeps a trailing **extra for injected/unknown fields, so callers can see the accepted parameters from the signature without scrolling to the definition. Addresses review feedback on PR #24316; call sites are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* kube_apiserver: fix typo in metric name Signed-off-by: Alexandre Lavigne <alexandre.lavigne@datadoghq.com> * kube_apiserver: mention deprecated metrics Signed-off-by: Alexandre Lavigne <alexandre.lavigne@datadoghq.com> --------- Signed-off-by: Alexandre Lavigne <alexandre.lavigne@datadoghq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )