Skip to content

feat(logs): read project logs - #66

Merged
swkeever merged 2 commits into
mainfrom
skeever/logs-read
Sep 2, 2026
Merged

swkeever merged 2 commits into
mainfrom
skeever/logs-read

Conversation

@swkeever

@swkeever swkeever commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Expose authenticated logs.search and logs.activity facades backed by generated OpenAPI operations. Return immutable native response envelopes, document usage, enforce generated-operation provenance, and cover transport, errors, validation, typing, packaging, and Hosting contract compatibility.

@swkeever

swkeever commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-02T18:21:48.642282Z b8a5931 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25d5e55859

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/volcano_sdk/_transport.py Outdated
response = search_project_logs.sync_detailed(
UUID(project_id),
client=client,
body=LogSearchRequest.from_dict(plain_request),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject unknown log fields instead of dropping them

When a caller misspells a filter, such as supplying query instead of q, LogSearchRequest.from_dict() silently discards the unrecognized field and serializes a broader, otherwise valid request. Because the public facade accepts arbitrary mappings and performs no key validation, the caller receives unfiltered log results rather than the validation error required by the schema's additionalProperties: false; the activity request at line 1565 has the same behavior. Validate top-level and nested selector keys before conversion, or avoid this lossy model round-trip.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b8a5931 by preserving the caller's exact JSON on the generated request path so Hosting enforces unknown-field rejection, while generated response parsing remains in use.

@swkeever

swkeever commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8a59311a1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

plain_request = cast("dict[str, Any]", _plain_json(request))
with self._client(authorization) as client:
request_kwargs = log_search_kwargs(
UUID(project_id), body=LogSearchRequest.from_dict(plain_request)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid parsing malformed requests before sending them

When a request omits the required resource field, LogSearchRequest.from_dict() raises a bare KeyError before the raw-body override or HTTP request runs, so Hosting cannot return its 400 response and the facade cannot map it to ValidationError; malformed known timestamps or resource IDs similarly leak ValueError. The post-fix override preserves unknown fields only for bodies that the generated parser already accepts, and the activity path has the same ordering, so construct the generated URL without parsing the caller body or translate these local failures consistently.

Useful? React with 👍 / 👎.

@swkeever
swkeever marked this pull request as ready for review September 2, 2026 18:22
@swkeever
swkeever merged commit 0c686d6 into main Sep 2, 2026
2 checks passed
@swkeever
swkeever deleted the skeever/logs-read branch September 2, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant