getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.9k stars 4.17k forks source link

Linear integration fails #79263

Open skbogner opened 2 hours ago

skbogner commented 2 hours ago

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Hi, "Linear" here. We have a customer whose Linear/Sentry integration fails.

When they visit an issue page the integration shows up like this:

Image

We've tried debugging the issue together:

On the page the customer is seeing the following response to /sentry-app-components:

[{
    "uuid": "9c01fc1f-b1b7-4b38-b8aa-be2f6badf3ea",
    "type": "issue-link",
    "schema": {
        "type": "issue-link",
        "create": {
            "required_fields": [{
                "default": "issue.title",
                "type": "text",
                "name": "title",
                "label": "Title"
            }, {
                "default": "issue.description",
                "type": "textarea",
                "name": "description",
                "label": "Description"
            }, {
                "label": "Team",
                "type": "select",
                "uri": "/hooks/sentry/issues/teams",
                "name": "teamId"
            }],
            "uri": "/hooks/sentry/issues/create",
            "optional_fields": [{
                "name": "assigneeId",
                "skip_load_on_open": true,
                "depends_on": ["teamId"],
                "uri": "/hooks/sentry/issues/assignees",
                "label": "Assignee",
                "type": "select"
            }, {
                "type": "select",
                "uri": "/hooks/sentry/issues/labels",
                "name": "labelId",
                "label": "Label",
                "depends_on": ["teamId"],
                "skip_load_on_open": true
            }, {
                "default": "0",
                "label": "Priority",
                "type": "select",
                "options": [["0", "No priority"], ["1", "Urgent"], ["2", "High"], ["3", "Medium"], ["4", "Low"]],
                "name": "priority"
            }, {
                "type": "select",
                "uri": "/hooks/sentry/issues/projects",
                "name": "projectId",
                "label": "Project",
                "depends_on": ["teamId"],
                "skip_load_on_open": true
            }, {
                "type": "select",
                "uri": "/hooks/sentry/issues/statuses",
                "name": "stateId",
                "label": "Status",
                "depends_on": ["teamId"],
                "skip_load_on_open": true
            }]
        },
        "link": {
            "required_fields": [{
                "type": "select",
                "uri": "/hooks/sentry/issues/search",
                "name": "issueId",
                "label": "Search for issue",
                "skip_load_on_open": true
            }],
            "uri": "/hooks/sentry/issues/link"
        }
    },
    "error": true,
    "sentryApp": {
        "uuid": "3e2913b8-1f00-4e8e-8b4f-280a060daa34",
        "slug": "linear",
        "name": "Linear",
        "avatars": [{
            "avatarType": "upload",
            "avatarUuid": "bb9d4ae02e0e4e059463f5fd0c6c7305",
            "avatarUrl": "https://sentry.io/sentry-app-avatar/bb9d4ae02e0e4e059463f5fd0c6c7305/",
            "color": true
        }, {
            "avatarType": "upload",
            "avatarUuid": "b88f53c8382c47acbe348759a2e23201",
            "avatarUrl": "https://sentry.io/sentry-app-avatar/b88f53c8382c47acbe348759a2e23201/",
            "color": false
        }]
    }
}, {
    "uuid": "609dde06-88ee-40d4-8a06-20f8c60037e7",
    "type": "alert-rule-action",
    "schema": {
        "type": "alert-rule-action",
        "title": "Create a Linear issue",
        "settings": {
            "type": "alert-rule-settings",
            "uri": "/hooks/sentry/alert-rule-action",
            "description": "When the alert fires automatically create a Linear issue with the following properties.",
            "required_fields": [{
                "name": "teamId",
                "label": "Team",
                "type": "select",
                "uri": "/hooks/sentry/issues/teams"
            }],
            "optional_fields": [{
                "name": "assigneeId",
                "label": "Assignee",
                "type": "select",
                "uri": "/hooks/sentry/issues/assignees",
                "depends_on": ["teamId"]
            }, {
                "name": "labelId",
                "label": "Label",
                "type": "select",
                "uri": "/hooks/sentry/issues/labels",
                "depends_on": ["teamId"]
            }, {
                "name": "priority",
                "label": "Priority",
                "type": "select",
                "default": "0",
                "options": [["0", "No priority"], ["1", "Urgent"], ["2", "High"], ["3", "Medium"], ["4", "Low"]]
            }, {
                "type": "select",
                "uri": "/hooks/sentry/issues/projects",
                "name": "projectId",
                "label": "Project",
                "depends_on": ["teamId"],
                "skip_load_on_open": true
            }, {
                "type": "select",
                "uri": "/hooks/sentry/issues/statuses",
                "name": "stateId",
                "label": "Status",
                "depends_on": ["teamId"],
                "skip_load_on_open": true
            }]
        }
    },
    "error": true,
    "sentryApp": {
        "uuid": "3e2913b8-1f00-4e8e-8b4f-280a060daa34",
        "slug": "linear",
        "name": "Linear",
        "avatars": [{
            "avatarType": "upload",
            "avatarUuid": "bb9d4ae02e0e4e059463f5fd0c6c7305",
            "avatarUrl": "https://sentry.io/sentry-app-avatar/bb9d4ae02e0e4e059463f5fd0c6c7305/",
            "color": true
        }, {
            "avatarType": "upload",
            "avatarUuid": "b88f53c8382c47acbe348759a2e23201",
            "avatarUrl": "https://sentry.io/sentry-app-avatar/b88f53c8382c47acbe348759a2e23201/",
            "color": false
        }]
    }
}]

Notice the error: true on both issue-link and alert-rule-action. On our end we can't see any error logs in the developer dashboard, for example the customer goes to the page at 10:50:40 and there's no logs for us (there's nothing at xx:50:xx):

Image

I think the error the user is seeing would be consistent with us returning a 400, but I can't see us doing that from our own logs and I can't tell from the developer dashboard logs either what kind of error you're running into?

Can you help debug this further. If we're returning an error then what is it (and why can't I see it in the dashboard) and if not, is this on your end potentially?

Best, Sebastian @ Linear

Customer is @guillaumekh and their org is 131802/spectre-yh

Expected Result

All explained above

Actual Result

All explained above

Product Area

Settings - Integrations

Link

No response

DSN

No response

Version

No response

getsantry[bot] commented 2 hours ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 1 hour ago

Routing to @getsentry/product-owners-settings-integrations for triage ⏲️