Comments (3)
Hey @yoramshai! 👋 I'm here to help you with any bugs, questions, or contributions you have regarding this project. Let's squash those bugs together!
The error message you're encountering after upgrading to v1.0.0-beta9 is likely due to changes in the Incident
struct, which introduced new fields that might not be handled correctly in your existing codebase. Specifically, the following fields were added to the Incident
struct in v1.0.0-beta9:
Priority
Self
Service
Status
Summary
Teams
Title
Type
Urgency
Ensure that your task options are correctly decoded and validated. The PagerDutyOptions
struct and related functions in task_data.go
should properly handle the new fields and any required parameters. Here is an example of how the task options are managed:
type PagerDutyOptions struct {
ConnectionId uint64 `json:"connectionId" mapstructure:"connectionId,omitempty"`
ServiceId string `json:"serviceId,omitempty" mapstructure:"serviceId,omitempty"`
ServiceName string `json:"serviceName,omitempty" mapstructure:"serviceName,omitempty"`
ScopeConfigId uint64 `json:"scopeConfigId,omitempty" mapstructure:"scopeConfigId,omitempty"`
ScopeConfig *models.PagerdutyScopeConfig `json:"service_name,omitempty" mapstructure:"serviceName,omitempty"`
}
type PagerDutyTaskData struct {
Options *PagerDutyOptions
Client api.RateLimitedApiClient
}
func DecodeAndValidateTaskOptions(options map[string]interface{}) (*PagerDutyOptions, errors.Error) {
op, err := DecodeTaskOptions(options)
if err != nil {
return nil, err
}
err = ValidateTaskOptions(op)
if err != nil {
return nil, err
}
return op, nil
}
func DecodeTaskOptions(options map[string]interface{}) (*PagerDutyOptions, errors.Error) {
var op PagerDutyOptions
err := api.Decode(options, &op, nil)
if err != nil {
return nil, err
}
return &op, nil
}
func EncodeTaskOptions(op *PagerDutyOptions) (map[string]interface{}, errors.Error) {
var result map[string]interface{}
err := api.Decode(op, &result, nil)
if err != nil {
return nil, err
}
return result, nil
}
func ValidateTaskOptions(op *PagerDutyOptions) errors.Error {
if op.ServiceName == "" {
return errors.BadInput.New("not enough info for Pagerduty execution")
}
if op.ServiceId == "" {
return errors.BadInput.New("not enough info for Pagerduty execution")
}
if op.ConnectionId == 0 {
return errors.BadInput.New("connectionId is invalid")
}
return nil
}
Ensure that your code handles these new fields appropriately to avoid errors [1][2].
To continue talking to Dosu, mention @dosu.
from incubator-devlake.
Hi, can you share the plan
detail of the failed pipeline?
from incubator-devlake.
@klesh absolutely
{ "id": 632, "name": "foo-Blueprint", "plan": [ [ { "plugin": "org", "subtasks": [ "setProjectMapping" ], "options": { "projectMappings": [ { "projectName": "foo", "scopes": [ { "rowId": "github:GithubRepo:1:569576293", "table": "repos" }, { "rowId": "github:GithubRepo:1:569576293", "table": "cicd_scopes" }, { "rowId": "github:GithubRepo:1:569576293", "table": "boards" }, { "rowId": "pagerduty:Service:1:P5GD7S8", "table": "cicd_scopes" }, { "rowId": "webhook:27", "table": "cicd_scopes" }, { "rowId": "webhook:27", "table": "boards" } ] } ] } } ], [ { "plugin": "github_graphql", "subtasks": [ "Collect Milestones", "Extract Milestones", "Collect Issues", "Extract Issues", "Collect Pull Requests", "Extract Pull Requests", "Collect Workflow Runs", "Extract Workflow Runs", "Collect Job Runs", "Extract Jobs", "Collect Comments", "Extract Comments", "Collect Events", "Extract Events", "Collect PR Review Comments", "Extract PR Review Comments", "Collect Users", "Extract Users", "Convert Workflow Runs", "Convert Jobs", "Enrich PR Issues", "Convert Repos", "Convert Issues", "Convert Issue Labels", "Convert PR Commits", "Convert Pull Requests", "Convert PR Reviews", "Convert PR Labels", "Convert PR Issues", "Convert Issue Assignees", "Convert Issue Comments", "Convert PR Comments", "Convert Milestones", "Convert Users", "Collect Deployments", "Extract Deployments", "Convert Deployments", "Collect Releases", "Extract Releases", "Convert Releases" ], "options": { "connectionId": 1, "fullName": "bar/foo", "githubId": 569576293, "name": "bar/foo" } }, { "plugin": "gitextractor", "subtasks": null, "options": { "fullName": "bar/foo", "name": "bar/foo", "proxy": "", "repoId": "github:GithubRepo:1:569576293", "url": "https://git:****************************************@github.com/bar/foo.git" } }, { "plugin": "pagerduty", "subtasks": [ "collectIncidents", "extractIncidents", "convertIncidents", "convertServices" ], "options": { "connectionId": 1, "serviceId": "P5G****" } } ], [ { "plugin": "dora", "subtasks": [ "generateDeployments", "generateDeploymentCommits", "enrichPrevSuccessDeploymentCommits" ], "options": { "projectName": "foo" } } ], [ { "plugin": "refdiff", "subtasks": [ "calculateDeploymentCommitsDiff" ], "options": { "projectName": "foo" } } ], [ { "plugin": "dora", "subtasks": [ "calculateChangeLeadTime", "ConnectIncidentToDeployment" ], "options": { "projectName": "foo" } } ] ], "skipOnFail": true }
from incubator-devlake.
Related Issues (20)
- [Bug][DORA] Change failure rate regression HOT 4
- [Doc][Developer Docs] Developer docs assume that users use git - they should also talk about source releases HOT 5
- [Refactor][Time Range] Allow Sync policy Time Range to be set objectively HOT 5
- [Question][GitHub] GitOps-like repos belonging to multiple projects. HOT 3
- Axios Error 504 HOT 5
- [Bug][Webhook] Can't associate an existing webhook with a project HOT 4
- [BUG].[REFDIFF].[PLUGIN] - 'SELECT * FROM refs ORDER BY created_date desc' taking too long HOT 7
- [Bug][GitHub] wrong pipeline name column if run-name is defined HOT 2
- [Bug][Jira][REST API] Unable to set up Jira connection via API due to token length issue HOT 4
- [Bug][Onboard] Option `enableGraphQL` is disabled by default. HOT 1
- [Bug][GitHub] Missing Pull Request data when changing the Time Range in Sync Policy HOT 2
- [Feature][Jira issue changelogs] Add customized jira account fields to table.accounts HOT 1
- [Bug][Sonarcloud] Error 1406 (22001): Data too long for column 'project_key' at row 1 HOT 10
- [Bug][GitLab] Sometimes Project data are automatically deleted. HOT 4
- [Bug][cicd_pipelines] Fix pipelines with Github HOT 11
- [Bug][Gitlab] v1.0.1-beta2 Data Time Range not working HOT 21
- [Bug][CircleCI Plugin] Only collecting first page of API responses HOT 6
- [Bug][Config UI] AxiosError: Request failed with status code 502 HOT 4
- [Bug][Gitlab] Component and File-Level Metrics not displaying HOT 7
- [Feature][Framework] Reminder before token is expired
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from incubator-devlake.