-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(cells): Support multi-cell jira integration #111696
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
Changes from all commits
824f18e
441ce0f
e87367a
69f2bdd
2e299cc
5f7c37b
3fc8f9f
a5b912d
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 |
|---|---|---|
|
|
@@ -68,7 +68,7 @@ def get(self, request: Request) -> Response: | |
| "content": {"type": "label", "label": {"value": "Linked Issues"}}, | ||
| "target": { | ||
| "type": "web_panel", | ||
| "url": "/extensions/jira/issue/{issue.key}/", | ||
| "url": "/extensions/jira/issue-details/{issue.key}/", | ||
|
Member
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. I don't know if Jira snapshots this into the Jira instances when the extension is added. We might need to keep the old URL around as well. |
||
| }, | ||
| "name": {"value": "Sentry "}, | ||
| "key": "sentry-issues-glance", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,16 +67,15 @@ def get_response(self) -> HttpResponseBase: | |
| if len(cells) == 0: | ||
| return self.get_default_missing_integration_response() | ||
|
|
||
| if len(cells) > 1: | ||
| # This shouldn't happen because we block multi cell install at the install time. | ||
| raise ValueError("Jira integration is installed in multiple cells") | ||
|
|
||
| if self.view_class in self.immediate_response_cell_classes: | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| try: | ||
| return self.get_response_from_cell_silo(cell=cells[0]) | ||
| except ApiError as err: | ||
| sentry_sdk.capture_exception(err) | ||
| return self.get_response_from_control_silo() | ||
| if len(cells) == 1: | ||
| try: | ||
| return self.get_response_from_cell_silo(cell=cells[0]) | ||
| except ApiError as err: | ||
| sentry_sdk.capture_exception(err) | ||
| return self.get_response_from_control_silo() | ||
| # TODO(cells): Remove once all installs have migrated to JiraSentryIssueDetailsControlView. | ||
| return JiraSentryIssueDetailsControlView.as_view()(self.request, **self.match.kwargs) | ||
|
Member
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. This looks reasonable to me. This endpoint was added in #98324 with the intention of replacing the region scoped endpoint, but the transition work wasn't completed. |
||
|
|
||
| if self.view_class in self.outbox_response_cell_classes: | ||
| return self.get_response_from_webhookpayload( | ||
|
|
||
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.
Bug: Changing
is_cell_restrictedto a read-only@propertywill cause anAttributeErrorin tests that attempt to directly assign a value to it, leading to test failures.Severity: HIGH
Suggested Fix
Update the tests that assign to
self.provider.is_cell_restricted. Instead of direct assignment, use a mocking technique to set the property's return value for the test's duration. For example, usemock.patch.objectwithnew_callable=mock.PropertyMockto temporarily override the property's behavior without triggering anAttributeError.Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.