Skip to content

feat(api): Publish typed issue view creation endpoint - #123079

Merged
cvxluo merged 1 commit into
masterfrom
cvxluo/publish-typed-issue-view-creation-endpoint
Aug 31, 2026
Merged

feat(api): Publish typed issue view creation endpoint#123079
cvxluo merged 1 commit into
masterfrom
cvxluo/publish-typed-issue-view-creation-endpoint

Conversation

@cvxluo

@cvxluo cvxluo commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Publish the issue view creation endpoint. Redux of #122537
Cover it in the agent-token public API matrix with the required feature flag and payload.

Refs IS-15

@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

IS-15

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 28, 2026
@cvxluo
cvxluo marked this pull request as ready for review August 28, 2026 22:41
@cvxluo
cvxluo requested review from a team as code owners August 28, 2026 22:41
Comment thread src/sentry/api/serializers/rest_framework/groupsearchview.py
@wedamija

Copy link
Copy Markdown
Member

This reminded me that I never merged #122950, just merged it now. Could you rebase on this so we can verify that this won't break master?

@cvxluo
cvxluo force-pushed the cvxluo/publish-typed-issue-view-creation-endpoint branch from 5908584 to 7d99361 Compare August 31, 2026 15:47
"timeFilters": {"period": "14d"},
}

response = self.client.post(self.url, data)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The POST request in test_post() is missing content_type="application/json", causing the test client to send data as multipart/form-data, which fails to serialize nested objects and empty lists.
Severity: LOW

Suggested Fix

Add content_type="application/json" to the self.client.post() call to ensure the payload is correctly serialized as JSON. For example: self.client.post(self.url, data, content_type="application/json").

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: tests/apidocs/endpoints/events/test_organization_issue_views.py#L23

Potential issue: The test `test_post()` sends a POST request with a payload containing a
nested dictionary (`timeFilters`) and empty lists. Because
`content_type="application/json"` is not specified, the Django test client defaults to
`multipart/form-data`. This encoding does not correctly serialize the nested data
structures. The backend's `GroupSearchViewPostValidator` serializer will fail to
validate the malformed data, returning a 400 status code. This causes the test to fail
on the `self.validate_schema` call, which asserts that the response status code must be
in the 2xx range.

Publish the issue view creation endpoint.
Cover it in the agent-token public API matrix with the required feature flag and payload.

Refs IS-15

Co-authored-by: Codex <noreply@openai.com>
@cvxluo
cvxluo force-pushed the cvxluo/publish-typed-issue-view-creation-endpoint branch from 7d99361 to 6ab8e58 Compare August 31, 2026 17:33
@cvxluo
cvxluo merged commit 601d370 into master Aug 31, 2026
65 of 66 checks passed
@cvxluo
cvxluo deleted the cvxluo/publish-typed-issue-view-creation-endpoint branch August 31, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants