-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat(inbound-filters): Add inbound filter for ChunkLoadError (OLD) #57343
Changes from 5 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,28 @@ def test_put_health_check_filter(self): | |
# option was changed by the request | ||
assert project.get_option("filters:filtered-transaction") == "0" | ||
|
||
def test_put_chunk_load_error_filter(self): | ||
""" | ||
Tests that it accepts to set the ChunkLoadError filter. | ||
""" | ||
org = self.create_organization(name="baz", slug="1", owner=self.user) | ||
team = self.create_team(organization=org, name="foo", slug="foo") | ||
project = self.create_project(name="Bar", slug="bar", teams=[team]) | ||
|
||
project.update_option("filters:chunk-load-error", "0") | ||
self.get_success_response( | ||
org.slug, project.slug, "chunk-load-error", active=True, status_code=204 | ||
) | ||
# option was changed by the request | ||
assert project.get_option("filters:chunk-load-error") == "1" | ||
|
||
project.update_option("filters:chunk-load-error", "1") | ||
Comment on lines
+60
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the option is set to a value, do we need to update it to the same value? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was just to clearly show that we set it to |
||
self.get_success_response( | ||
org.slug, project.slug, "chunk-load-error", active=False, status_code=204 | ||
) | ||
# option was changed by the request | ||
assert project.get_option("filters:chunk-load-error") == "0" | ||
|
||
def test_put_legacy_browsers(self): | ||
org = self.create_organization(name="baz", slug="1", owner=self.user) | ||
team = self.create_team(organization=org, name="foo", slug="foo") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss about this.
Would be nice if we could attribute which error message comes from which filter ( on Relay side)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, my implementation is not the best since it's hacky, I would prefer to design from first principles an integration of inbound filters that map to error messages or to top-level filters.