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

feat(dora): add incident related tables #7652

Merged
merged 10 commits into from
Jul 9, 2024
Merged

feat(dora): add incident related tables #7652

merged 10 commits into from
Jul 9, 2024

Conversation

d4x1
Copy link
Contributor

@d4x1 d4x1 commented Jun 21, 2024

⚠️ Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

  • I have read through the Contributing Documentation.
  • I have added relevant tests.
  • I have added relevant documentation.
  • I will add labels to the PR, such as pr-type/bug-fix, pr-type/feature-development, etc.

Summary

What does this PR do?

  1. Add new tables: incidents and incident_assignees
    • Records in incidents are from issues(with type = 'INCIDNET') or pull_requests(whose lables satisfy some rules, rules are still WIP)
  2. Rename table project_issue_metrics to project_incident_deployment_relationships
  3. DORA plugin: add new tasks
    • ConvertIssuesToIncidents generates incidents from issues
    • ConvertPullRequestToIncidents generates incidents from pull_requests
  4. Update webhook, create/close incident directly.

Does this close any open issues?

Closes N/A

Screenshots

Include any relevant screenshots here.

incident_assignees

image

incidents

image

Other Information

Any other information that is important to this PR.

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jun 21, 2024
@d4x1 d4x1 self-assigned this Jun 21, 2024
@d4x1 d4x1 added the pr-type/feature-development This PR is to develop a new feature label Jun 21, 2024
@dosubot dosubot bot added the component/plugins This issue or PR relates to plugins label Jun 21, 2024
@d4x1
Copy link
Contributor Author

d4x1 commented Jun 21, 2024

I am not sure whether this pr should be cherry picked to release-v1.0 or not.

@d4x1 d4x1 requested review from abeizn and klesh July 1, 2024 02:50
case OPEN:
return ticket.TODO
case CLOSED:
return ticket.OTHER
Copy link
Contributor

Choose a reason for hiding this comment

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

CLOSE?

Copy link
Contributor

Choose a reason for hiding this comment

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

And after your PR is merged, devtable will probably need to change the sql uniformly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. CLOSED pull requests should be OTHER.

Copy link
Contributor

@abeizn abeizn left a comment

Choose a reason for hiding this comment

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

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 9, 2024
@d4x1 d4x1 merged commit d4eabc4 into main Jul 9, 2024
11 checks passed
@d4x1 d4x1 deleted the dev0620 branch July 9, 2024 02:46
d4x1 added a commit that referenced this pull request Jul 29, 2024
* feat(dora): add incident related tables

* fix(ci): fix lint/e2e/test errors

* fix(ci): fix unit test errors

* feat(webhook): issues with type = "INCIDENT" will be stored/updated in table `incidents`

* fix(incident): fix method `IsIncident`

* feat(dora): add new option `DisableIssueToIncidentGenerator`

* fix(dora): fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/plugins This issue or PR relates to plugins lgtm This PR has been approved by a maintainer pr-type/feature-development This PR is to develop a new feature size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants