Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤖 Add Feature Flag for Event Attachments in StreamGroupSerializer #82278

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sentry-autofix[bot]
Copy link
Contributor

👋 Hi there! This PR was automatically generated by Autofix 🤖

This fix was triggered by Josh Ferge

Fixes SENTRY-3KQ6

This pull request introduces a feature flag for event attachments in the StreamGroupSerializer. It modifies the StreamGroupSerializerSnuba class to check for the 'organizations:event-attachments' feature flag during serialization. If the feature is disabled, a ValidationError is raised when attempting to access event attachments. Additionally, a new test case is added in test_group_stream.py to verify the behavior of the serializer when the feature flag is toggled, ensuring it properly handles both enabled and disabled states.

If you have any questions or feedback for the Sentry team about this fix, please email [email protected] with the Run ID: 2437.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 17, 2024
Copy link

codecov bot commented Dec 18, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
17330 1 17329 191
View the top 1 failed tests by shortest run time
tests.sentry.api.serializers.test_group_stream.StreamGroupSerializerTestCase::test_event_attachments_feature_flag
Stack Traces | 2.87s run time
#x1B[1m#x1B[.../api/serializers/test_group_stream.py#x1B[0m:98: in test_event_attachments_feature_flag
    serializer.get_attrs(item_list=[group], user=request.user, request=request)
#x1B[1m#x1B[.../serializers/models/group_stream.py#x1B[0m:402: in get_attrs
    item.project.organization,
#x1B[1m#x1B[31mE   UnboundLocalError: cannot access local variable 'item' where it is not associated with a value#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@getsantry
Copy link
Contributor

getsantry bot commented Jan 8, 2025

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added Stale and removed Stale labels Jan 8, 2025
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.

0 participants