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

[source-opsgenie] add support for additional incident fields #50880

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

nkupton
Copy link

@nkupton nkupton commented Jan 3, 2025

Adds support for the following fields: ownerTeam, extraProperties, links, impactStartDate, actions

What

It appears that the initial version of this connector was created with the OpsGenie API documentation as a primary guide. However, real world responses show several important additional fields that are supported by the /v1/incidents List API, despite not being documented in the sample response: https://docs.opsgenie.com/docs/incident-api#list-incidents

Example:

curl -XGET -H "Authorization: GenieKey <REDACTED>" 'https://api.opsgenie.com/v1/incidents?query=status%3Aopen&limit=10&sort=createdAt&order=desc'
{"totalCount":1,"data":[
    {
        "id": "b5472d66-e652-4f46-ab22-7d21f9ea66485",
        "description": "testing incident description",
        "impactedServices": [],
        "tinyId": "1001",
        "message": "testing incident message",
        "status": "open",
        "tags": [
            "source:my-scripts"
        ],
        "createdAt": "2025-01-01T19:20:00.573Z",
        "updatedAt": "2025-01-02T21:35:17.619Z",
        "priority": "P4",
        "ownerTeam": "",
        "responders": [
            {
                "type": "user",
                "id": "ef466cc4-e4a5-462f-a01e-e19a70f61022"
            }
        ],
        "extraProperties": {
            "RCA": "URL",
            "Service": "add details",
            "Deployment ID": "add deployment ID if applicable",
            "Cause Category": "Internal or External",
            "Detection Method": "Alert, Manual"
        },
        "links": {
            "web": "https://zillowgroup.app.opsgenie.com/incident/detail/b5472d66-e652-4f46-ab22-7d21f9ea66485",
            "api": "https://api.opsgenie.com/v1/incidents/b5472d66-e652-4f46-ab22-7d21f9ea66485"
        },
        "impactStartDate": "2025-01-01T19:20:00.573Z",
        "actions": []
    }
],"paging":{"first":"https://api.opsgenie.com/v1/incidents?limit=10&sort=createdAt&offset=0&order=desc&query=status%3Aopen","last":"https://api.opsgenie.com/v1/incidents?limit=10&sort=createdAt&offset=0&order=desc&query=status%3Aopen"},"took":0.036,"requestId":"99ee308b7-9503-4b85-afff-464c9ddbb9bd"}

How

Expand the schema to include fields not adequately documented in the OpsGenie API.

Review guide

extraProperties is actually what was intended by the details field, but I left both to avoid removing any. details is the term used by OpsGenie for Incident Create, but extraProperties is the term used to retrieve it by the Incident Get/List APIs.
https://docs.opsgenie.com/docs/incident-api#create-incident
https://docs.opsgenie.com/docs/incident-api#get-incident
https://docs.opsgenie.com/docs/incident-api#list-incident

User Impact

Important additional fields can be synced into Airbyte destinations.

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

The current documentation for OpsGenie's /v1/incidents API does not show the full set of fields that are actually available: https://docs.opsgenie.com/docs/incident-api#list-incidents

Adds support for the following: description, ownerTeam, extraProperties, links, impactStartDate, actions
Copy link

vercel bot commented Jan 3, 2025

@nkupton is attempting to deploy a commit to the Airbyte Growth Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Jan 3, 2025

CLA assistant check
All committers have signed the CLA.

@marcosmarxm
Copy link
Member

Hey Nick thanks for the contribution. Are you going to continue it? Need some help?

@marcosmarxm marcosmarxm changed the title Add support for additional incident fields [source-opsgenie] add support for additional incident fields Jan 10, 2025
@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Jan 10, 2025
@nkupton nkupton temporarily deployed to community-ci-auto January 10, 2025 22:34 — with GitHub Actions Inactive
@nkupton nkupton temporarily deployed to community-ci-auto January 10, 2025 22:40 — with GitHub Actions Inactive
@nkupton nkupton marked this pull request as ready for review January 10, 2025 22:45
@nkupton
Copy link
Author

nkupton commented Jan 10, 2025

Hey Nick thanks for the contribution. Are you going to continue it? Need some help?

Hi Marcos, thanks. I was able to successfully test this in my instance, and made a guess about how to proceed with versioning. Let me know how it looks to you?

@@ -1,4 +1,4 @@
version: 4.3.0
version: 0.4.6
Copy link
Member

Choose a reason for hiding this comment

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

Why are you reverting to an old version of the manifest? Please return to 4.3.0 or higher.

Copy link
Author

Choose a reason for hiding this comment

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

30157b4 - align manifest version with release notes version

It felt inconsistent to me to increment this to 4.6.0 when the release notes will be on 0.4.6. Seemed like a typo in the manifest.

Would you be willing to make the call here? What should this value be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation community connectors/source/opsgenie
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants