Skip to content

Commit f6f3328

Browse files
committed
more refactoring in TriggerAuditHook and workflow config snapshot
1 parent d1c1fb9 commit f6f3328

File tree

6 files changed

+105
-158
lines changed

6 files changed

+105
-158
lines changed

pkg/workflow/trigger/audit/bean/WorkflowTriggerAuditBean.go

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,31 @@
1717
package bean
1818

1919
import (
20-
"github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig"
21-
repository4 "github.com/devtron-labs/devtron/pkg/cluster/environment/repository"
2220
"github.com/devtron-labs/devtron/pkg/pipeline/types"
2321
"github.com/devtron-labs/devtron/pkg/workflow/trigger/audit/repository"
2422
"time"
2523
)
2624

2725
// CiTriggerAuditRequest represents the request for CI trigger audit
2826
type CiTriggerAuditRequest struct {
29-
WorkflowId int `json:"workflowId"`
30-
Pipeline *pipelineConfig.CiPipeline `json:"pipeline"`
27+
WorkflowId int
28+
PipelineId int
3129
*CommonAuditRequest
3230
}
3331

3432
// CdTriggerAuditRequest represents the request for CD trigger audit (Pre-CD, Post-CD)
3533
type CdTriggerAuditRequest struct {
36-
WorkflowRunnerId int `json:"workflowRunnerId"`
37-
Pipeline *pipelineConfig.Pipeline `json:"pipeline"`
38-
Environment *repository4.Environment `json:"environment"`
34+
WorkflowRunnerId int
35+
PipelineId int
36+
EnvironmentId int
37+
WorkflowType repository.WorkflowType
3938
*CommonAuditRequest
4039
}
4140
type CommonAuditRequest struct {
42-
WorkflowRequest *types.WorkflowRequest `json:"workflowRequest"`
43-
ArtifactId int `json:"artifactId"`
44-
TriggerType string `json:"triggerType"` // MANUAL, AUTO, WEBHOOK
45-
TriggeredBy int32 `json:"triggeredBy"`
46-
InfraConfigTriggerHistoryId int `json:"infraConfigTriggerHistoryId"`
41+
WorkflowRequest *types.WorkflowRequest
42+
ArtifactId int
43+
TriggerType string
44+
TriggeredBy int32
4745
}
4846

4947
// WorkflowTriggerAuditResponse represents the response for workflow trigger audit

pkg/workflow/trigger/audit/hook/TriggerAuditHook.go

Lines changed: 35 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
package hook
1818

1919
import (
20-
"github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig"
21-
repository4 "github.com/devtron-labs/devtron/pkg/cluster/environment/repository"
22-
"github.com/devtron-labs/devtron/pkg/pipeline/types"
2320
"github.com/devtron-labs/devtron/pkg/workflow/trigger/audit/bean"
2421
"github.com/devtron-labs/devtron/pkg/workflow/trigger/audit/service"
2522
"go.uber.org/zap"
@@ -28,19 +25,10 @@ import (
2825
// TriggerAuditHook provides common hooks for auditing workflow triggers
2926
type TriggerAuditHook interface {
3027
// AuditCiTrigger audits CI trigger
31-
AuditCiTrigger(workflowId int, pipeline *pipelineConfig.CiPipeline, workflowRequest *types.WorkflowRequest,
32-
triggerType string, triggeredBy int32,
33-
infraConfigTriggerHistoryId int) error
28+
AuditCiTrigger(ciTriggerAuditRequest *bean.CiTriggerAuditRequest) error
3429

35-
// AuditPreCdTrigger audits Pre-CD trigger
36-
AuditPreCdTrigger(workflowRunnerId int, pipeline *pipelineConfig.Pipeline, environment *repository4.Environment,
37-
workflowRequest *types.WorkflowRequest,
38-
triggerType string, triggeredBy int32, infraConfigTriggerHistoryId int) error
39-
40-
// AuditPostCdTrigger audits Post-CD trigger
41-
AuditPostCdTrigger(workflowRunnerId int, pipeline *pipelineConfig.Pipeline, environment *repository4.Environment,
42-
workflowRequest *types.WorkflowRequest,
43-
triggerType string, triggeredBy int32, infraConfigTriggerHistoryId int) error
30+
// AuditPrePostCdTrigger audits Pre-CD trigger
31+
AuditPrePostCdTrigger(cdTriggerAuditRequest *bean.CdTriggerAuditRequest) error
4432

4533
// GetRetriggerConfig gets configuration for retrigger
4634
//GetRetriggerConfig(auditId int) (*bean.RetriggerWorkflowConfig, error)
@@ -58,86 +46,54 @@ func NewTriggerAuditHookImpl(logger *zap.SugaredLogger, workflowTriggerAuditServ
5846
}
5947
}
6048

61-
func (impl *TriggerAuditHookImpl) AuditCiTrigger(workflowId int, pipeline *pipelineConfig.CiPipeline,
62-
workflowRequest *types.WorkflowRequest, triggerType string, triggeredBy int32, infraConfigTriggerHistoryId int) error {
49+
func (impl *TriggerAuditHookImpl) AuditCiTrigger(ciTriggerAuditRequest *bean.CiTriggerAuditRequest) error {
6350

64-
impl.logger.Infow("auditing CI trigger", "workflowId", workflowId, "pipelineId", pipeline.Id, "triggeredBy", triggeredBy)
51+
impl.logger.Infow("auditing CI trigger", "workflowId", ciTriggerAuditRequest.WorkflowId, "pipelineId", ciTriggerAuditRequest.PipelineId, "triggeredBy", ciTriggerAuditRequest.TriggeredBy)
6552

66-
request := &bean.CiTriggerAuditRequest{
67-
WorkflowId: workflowId,
68-
Pipeline: pipeline,
69-
CommonAuditRequest: &bean.CommonAuditRequest{
70-
WorkflowRequest: workflowRequest,
71-
TriggerType: triggerType,
72-
TriggeredBy: triggeredBy,
73-
InfraConfigTriggerHistoryId: infraConfigTriggerHistoryId,
74-
},
75-
}
53+
//request := &bean.CiTriggerAuditRequest{
54+
// WorkflowId: workflowId,
55+
// Pipeline: pipeline,
56+
// CommonAuditRequest: &bean.CommonAuditRequest{
57+
// WorkflowRequest: workflowRequest,
58+
// TriggerType: triggerType,
59+
// TriggeredBy: triggeredBy,
60+
// },
61+
//}
7662

77-
_, err := impl.workflowTriggerAuditService.SaveCiTriggerAudit(request)
63+
_, err := impl.workflowTriggerAuditService.SaveCiTriggerAudit(ciTriggerAuditRequest)
7864
if err != nil {
79-
impl.logger.Errorw("error in auditing CI trigger", "err", err, "workflowId", workflowId)
80-
// Don't fail the trigger if audit fails, just log the error
81-
return nil
65+
impl.logger.Errorw("error in auditing CI trigger", "workflowId", ciTriggerAuditRequest.WorkflowId, "err", err)
66+
// Don't fail/return the trigger if audit fails, just log the error
8267
}
8368

84-
impl.logger.Infow("successfully audited CI trigger", "workflowId", workflowId, "pipelineId", pipeline.Id)
69+
impl.logger.Infow("successfully audited CI trigger", "workflowId", ciTriggerAuditRequest.WorkflowId, "pipelineId", ciTriggerAuditRequest.PipelineId)
8570
return nil
8671
}
8772

88-
func (impl *TriggerAuditHookImpl) AuditPreCdTrigger(workflowRunnerId int, pipeline *pipelineConfig.Pipeline,
89-
environment *repository4.Environment, workflowRequest *types.WorkflowRequest, triggerType string, triggeredBy int32, infraConfigTriggerHistoryId int) error {
90-
91-
impl.logger.Infow("auditing Pre-CD trigger", "workflowRunnerId", workflowRunnerId, "pipelineId", pipeline.Id, "triggeredBy", triggeredBy)
92-
93-
request := &bean.CdTriggerAuditRequest{
94-
WorkflowRunnerId: workflowRunnerId,
95-
Pipeline: pipeline,
96-
Environment: environment,
97-
CommonAuditRequest: &bean.CommonAuditRequest{
98-
WorkflowRequest: workflowRequest,
99-
TriggerType: triggerType,
100-
TriggeredBy: triggeredBy,
101-
InfraConfigTriggerHistoryId: infraConfigTriggerHistoryId,
102-
},
103-
}
73+
func (impl *TriggerAuditHookImpl) AuditPrePostCdTrigger(cdTriggerAuditRequest *bean.CdTriggerAuditRequest) error {
10474

105-
_, err := impl.workflowTriggerAuditService.SavePreCdTriggerAudit(request)
106-
if err != nil {
107-
impl.logger.Errorw("error in auditing Pre-CD trigger", "err", err, "workflowRunnerId", workflowRunnerId)
108-
// Don't fail the trigger if audit fails, just log the error
109-
return nil
110-
}
75+
impl.logger.Infow("auditing Pre/Post-CD trigger", "workflowRunnerId", cdTriggerAuditRequest.WorkflowRunnerId, "pipelineId", cdTriggerAuditRequest.PipelineId, "workflowType", cdTriggerAuditRequest.WorkflowType, "triggeredBy", cdTriggerAuditRequest.TriggeredBy)
11176

112-
impl.logger.Infow("successfully audited Pre-CD trigger", "workflowRunnerId", workflowRunnerId, "pipelineId", pipeline.Id)
113-
return nil
114-
}
115-
116-
func (impl *TriggerAuditHookImpl) AuditPostCdTrigger(workflowRunnerId int, pipeline *pipelineConfig.Pipeline,
117-
environment *repository4.Environment, workflowRequest *types.WorkflowRequest, triggerType string, triggeredBy int32, infraConfigTriggerHistoryId int) error {
118-
119-
impl.logger.Infow("auditing Post-CD trigger", "workflowRunnerId", workflowRunnerId, "pipelineId", pipeline.Id, "triggeredBy", triggeredBy)
120-
121-
request := &bean.CdTriggerAuditRequest{
122-
WorkflowRunnerId: workflowRunnerId,
123-
Pipeline: pipeline,
124-
Environment: environment,
125-
CommonAuditRequest: &bean.CommonAuditRequest{
126-
WorkflowRequest: workflowRequest,
127-
TriggerType: triggerType,
128-
TriggeredBy: triggeredBy,
129-
InfraConfigTriggerHistoryId: infraConfigTriggerHistoryId,
130-
},
131-
}
77+
//request := &bean.CdTriggerAuditRequest{
78+
// WorkflowRunnerId: workflowRunnerId,
79+
// Pipeline: pipeline,
80+
// Environment: environment,
81+
// WorkflowType: workflowType,
82+
// CommonAuditRequest: &bean.CommonAuditRequest{
83+
// WorkflowRequest: workflowRequest,
84+
// TriggerType: triggerType,
85+
// TriggeredBy: triggeredBy,
86+
// },
87+
//}
13288

133-
_, err := impl.workflowTriggerAuditService.SavePostCdTriggerAudit(request)
89+
_, err := impl.workflowTriggerAuditService.SaveCdTriggerAudit(cdTriggerAuditRequest)
13490
if err != nil {
135-
impl.logger.Errorw("error in auditing Post-CD trigger", "err", err, "workflowRunnerId", workflowRunnerId)
136-
// Don't fail the trigger if audit fails, just log the error
91+
impl.logger.Errorw("error in auditing Pre/Post-CD trigger", "workflowRunnerId", cdTriggerAuditRequest.WorkflowRunnerId, "err", err)
92+
// Don't fail/return the trigger if audit fails, just log the error
13793
return nil
13894
}
13995

140-
impl.logger.Infow("successfully audited Post-CD trigger", "workflowRunnerId", workflowRunnerId, "pipelineId", pipeline.Id)
96+
impl.logger.Infow("successfully audited Pre/Post-CD trigger", "workflowRunnerId", cdTriggerAuditRequest.WorkflowRunnerId, "pipelineId", cdTriggerAuditRequest.PipelineId)
14197
return nil
14298
}
14399

pkg/workflow/trigger/audit/repository/WorkflowConfigSnapshotRepository.go

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,36 @@ import (
2222
"go.uber.org/zap"
2323
)
2424

25+
type WorkflowType string
26+
27+
const (
28+
CI_WORKFLOW_TYPE WorkflowType = "CI"
29+
PRE_CD_WORKFLOW_TYPE WorkflowType = "PRE_CD"
30+
POST_CD_WORKFLOW_TYPE WorkflowType = "POST_CD"
31+
)
32+
33+
type TriggerType string
34+
35+
const (
36+
MANUAL_TRIGGER TriggerType = "MANUAL"
37+
AUTO_TRIGGER TriggerType = "AUTO"
38+
WEBHOOK_TRIGGER TriggerType = "WEBHOOK"
39+
)
40+
41+
type WorkflowConfigSnapshot struct {
42+
tableName struct{} `sql:"workflow_config_snapshot" pg:",discard_unknown_columns"`
43+
Id int `sql:"id,pk"`
44+
WorkflowId int `sql:"workflow_id,notnull"`
45+
WorkflowType WorkflowType `sql:"workflow_type,notnull"`
46+
PipelineId int `sql:"pipeline_id,notnull"`
47+
ArtifactId int `sql:"artifact_id"`
48+
TriggerType TriggerType `sql:"trigger_type,notnull"`
49+
TriggeredBy int32 `sql:"triggered_by,notnull"`
50+
WorkflowRequestJson string `sql:"workflow_request_json,notnull"`
51+
WorkflowRequestSchemaVersion string `sql:"workflow_request_schema_version"`
52+
sql.AuditLog
53+
}
54+
2555
type WorkflowConfigSnapshotRepository interface {
2656
Save(snapshot *WorkflowConfigSnapshot) (*WorkflowConfigSnapshot, error)
2757
SaveWithTx(tx *pg.Tx, snapshot *WorkflowConfigSnapshot) (*WorkflowConfigSnapshot, error)
@@ -49,38 +79,6 @@ func NewWorkflowConfigSnapshotRepositoryImpl(dbConnection *pg.DB, logger *zap.Su
4979
}
5080
}
5181

52-
type WorkflowType string
53-
54-
const (
55-
CI_WORKFLOW_TYPE WorkflowType = "CI"
56-
PRE_CD_WORKFLOW_TYPE WorkflowType = "PRE_CD"
57-
POST_CD_WORKFLOW_TYPE WorkflowType = "POST_CD"
58-
)
59-
60-
type TriggerType string
61-
62-
const (
63-
MANUAL_TRIGGER TriggerType = "MANUAL"
64-
AUTO_TRIGGER TriggerType = "AUTO"
65-
WEBHOOK_TRIGGER TriggerType = "WEBHOOK"
66-
)
67-
68-
type WorkflowConfigSnapshot struct {
69-
tableName struct{} `sql:"workflow_config_snapshot" pg:",discard_unknown_columns"`
70-
Id int `sql:"id,pk"`
71-
WorkflowId int `sql:"workflow_id,notnull"`
72-
WorkflowType WorkflowType `sql:"workflow_type,notnull"`
73-
PipelineId int `sql:"pipeline_id,notnull"`
74-
ArtifactId int `sql:"artifact_id"`
75-
TriggerType TriggerType `sql:"trigger_type,notnull"`
76-
TriggeredBy int32 `sql:"triggered_by,notnull"`
77-
TriggerMetadata string `sql:"trigger_metadata"`
78-
InfraConfigTriggerHistoryId int `sql:"infra_config_trigger_history_id"`
79-
WorkflowRequestJson string `sql:"workflow_request_json,notnull"`
80-
WorkflowRequestVersion string `sql:"workflow_request_version"`
81-
sql.AuditLog
82-
}
83-
8482
func (impl *WorkflowConfigSnapshotRepositoryImpl) Save(snapshot *WorkflowConfigSnapshot) (*WorkflowConfigSnapshot, error) {
8583
err := impl.dbConnection.Insert(snapshot)
8684
if err != nil {

pkg/workflow/trigger/audit/service/WorkflowTriggerAuditService.go

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@ type WorkflowTriggerAuditService interface {
3131
// SaveCiTriggerAudit saves audit data for CI trigger
3232
SaveCiTriggerAudit(request *bean.CiTriggerAuditRequest) (*repository.WorkflowConfigSnapshot, error)
3333

34-
// SavePreCdTriggerAudit saves audit data for Pre-CD trigger
35-
SavePreCdTriggerAudit(request *bean.CdTriggerAuditRequest) (*repository.WorkflowConfigSnapshot, error)
36-
37-
// SavePostCdTriggerAudit saves audit data for Post-CD trigger
38-
SavePostCdTriggerAudit(request *bean.CdTriggerAuditRequest) (*repository.WorkflowConfigSnapshot, error)
34+
// SaveCdTriggerAudit saves audit data for Pre-CD trigger
35+
SaveCdTriggerAudit(request *bean.CdTriggerAuditRequest) (*repository.WorkflowConfigSnapshot, error)
3936

4037
// GetTriggerAuditByWorkflowId retrieves audit data by workflow ID and type
4138
GetTriggerAuditByWorkflowId(workflowId int, workflowType repository.WorkflowType) (*bean.WorkflowTriggerAuditResponse, error)
@@ -79,7 +76,7 @@ func (impl *WorkflowTriggerAuditServiceImpl) SaveCiTriggerAudit(request *bean.Ci
7976
defer impl.RollbackTx(tx)
8077

8178
// Create consolidated workflow config snapshot
82-
configSnapshot, err := impl.createWorkflowConfigSnapshot(request.WorkflowRequest, repository.CI_WORKFLOW_TYPE, request.Pipeline, nil, request.WorkflowId, request.TriggerType, request.TriggeredBy, request.InfraConfigTriggerHistoryId, 0)
79+
configSnapshot, err := impl.createWorkflowConfigSnapshot(request.WorkflowRequest, repository.CI_WORKFLOW_TYPE, request.Pipeline, nil, request.WorkflowId, request.TriggerType, request.TriggeredBy, 0)
8380
if err != nil {
8481
impl.logger.Errorw("error in creating workflow config snapshot for CI", "err", err)
8582
return nil, err
@@ -100,45 +97,37 @@ func (impl *WorkflowTriggerAuditServiceImpl) SaveCiTriggerAudit(request *bean.Ci
10097
return savedSnapshot, nil
10198
}
10299

103-
func (impl *WorkflowTriggerAuditServiceImpl) SavePreCdTriggerAudit(request *bean.CdTriggerAuditRequest) (*repository.WorkflowConfigSnapshot, error) {
104-
return impl.saveCdTriggerAudit(request, repository.PRE_CD_WORKFLOW_TYPE)
105-
}
106-
107-
func (impl *WorkflowTriggerAuditServiceImpl) SavePostCdTriggerAudit(request *bean.CdTriggerAuditRequest) (*repository.WorkflowConfigSnapshot, error) {
108-
return impl.saveCdTriggerAudit(request, repository.POST_CD_WORKFLOW_TYPE)
109-
}
110-
111-
func (impl *WorkflowTriggerAuditServiceImpl) saveCdTriggerAudit(request *bean.CdTriggerAuditRequest, workflowType repository.WorkflowType) (*repository.WorkflowConfigSnapshot, error) {
100+
func (impl *WorkflowTriggerAuditServiceImpl) SaveCdTriggerAudit(request *bean.CdTriggerAuditRequest) (*repository.WorkflowConfigSnapshot, error) {
112101
tx, err := impl.StartTx()
113102
if err != nil {
114-
impl.logger.Errorw("error in starting transaction for CD trigger audit", "err", err, "workflowType", workflowType)
103+
impl.logger.Errorw("error in starting transaction for CD trigger audit", "err", err, "workflowType", request.WorkflowType)
115104
return nil, err
116105
}
117106
defer impl.RollbackTx(tx)
118107

119108
// Create consolidated workflow config snapshot
120-
configSnapshot, err := impl.createWorkflowConfigSnapshot(request.WorkflowRequest, workflowType, request.Pipeline, request.Environment, request.WorkflowRunnerId, request.TriggerType, request.TriggeredBy, request.TriggerMetadata, request.InfraConfigTriggerHistoryId, request.ArtifactId)
109+
configSnapshot, err := impl.createWorkflowConfigSnapshot(request.WorkflowRequest, request.WorkflowType, request.Pipeline, request.WorkflowRunnerId, request.TriggerType, request.TriggeredBy, request.ArtifactId)
121110
if err != nil {
122-
impl.logger.Errorw("error in creating workflow config snapshot for CD", "err", err, "workflowType", workflowType)
111+
impl.logger.Errorw("error in creating workflow config snapshot for CD", "err", err, "workflowType", request.WorkflowType)
123112
return nil, err
124113
}
125114

126115
savedSnapshot, err := impl.workflowConfigSnapshotRepository.SaveWithTx(tx, configSnapshot)
127116
if err != nil {
128-
impl.logger.Errorw("error in saving CD trigger audit", "err", err, "workflowType", workflowType)
117+
impl.logger.Errorw("error in saving CD trigger audit", "err", err, "workflowType", request.WorkflowType)
129118
return nil, err
130119
}
131120

132121
err = impl.CommitTx(tx)
133122
if err != nil {
134-
impl.logger.Errorw("error in committing transaction for CD trigger audit", "err", err, "workflowType", workflowType)
123+
impl.logger.Errorw("error in committing transaction for CD trigger audit", "err", err, "workflowType", request.WorkflowType)
135124
return nil, err
136125
}
137126

138127
return savedSnapshot, nil
139128
}
140129

141-
func (impl *WorkflowTriggerAuditServiceImpl) createWorkflowConfigSnapshot(workflowRequest *types.WorkflowRequest, workflowType repository.WorkflowType, pipeline interface{}, environment interface{}, workflowId int, triggerType string, triggeredBy int32, triggerMetadata interface{}, infraConfigTriggerHistoryId int, artifactId int) (*repository.WorkflowConfigSnapshot, error) {
130+
func (impl *WorkflowTriggerAuditServiceImpl) createWorkflowConfigSnapshot(workflowRequest *types.WorkflowRequest, workflowType repository.WorkflowType, pipeline interface{}, workflowId int, triggerType string, triggeredBy int32, artifactId int) (*repository.WorkflowConfigSnapshot, error) {
142131
// Sanitize secrets before storing
143132
sanitizedWorkflowRequest, err := impl.secretSanitizer.SanitizeWorkflowRequest(workflowRequest)
144133
if err != nil {
@@ -168,19 +157,18 @@ func (impl *WorkflowTriggerAuditServiceImpl) createWorkflowConfigSnapshot(workfl
168157
}
169158

170159
configSnapshot := &repository.WorkflowConfigSnapshot{
171-
WorkflowId: workflowId,
172-
WorkflowType: workflowType,
173-
PipelineId: pipelineId,
174-
AppId: appId,
175-
EnvironmentId: environmentId,
176-
ArtifactId: artifactId,
177-
TriggerType: impl.getTriggerType(triggerType),
178-
TriggeredBy: triggeredBy,
179-
TriggerMetadata: impl.marshalTriggerMetadata(triggerMetadata),
180-
InfraConfigTriggerHistoryId: infraConfigTriggerHistoryId,
181-
WorkflowRequestJson: string(workflowRequestJson),
182-
WorkflowRequestVersion: "V1", // for backward compatibility
183-
AuditLog: sql.NewDefaultAuditLog(triggeredBy),
160+
WorkflowId: workflowId,
161+
WorkflowType: workflowType,
162+
PipelineId: pipelineId,
163+
AppId: appId,
164+
EnvironmentId: environmentId,
165+
ArtifactId: artifactId,
166+
TriggerType: impl.getTriggerType(triggerType),
167+
TriggeredBy: triggeredBy,
168+
TriggerMetadata: impl.marshalTriggerMetadata(triggerMetadata),
169+
WorkflowRequestJson: string(workflowRequestJson),
170+
WorkflowRequestVersion: "V1", // for backward compatibility
171+
AuditLog: sql.NewDefaultAuditLog(triggeredBy),
184172
}
185173

186174
return configSnapshot, nil

pkg/workflow/wire_workflow.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@ package workflow
1919
import (
2020
"github.com/devtron-labs/devtron/pkg/workflow/cd"
2121
"github.com/devtron-labs/devtron/pkg/workflow/status"
22+
"github.com/devtron-labs/devtron/pkg/workflow/trigger/audit/hook"
2223
"github.com/google/wire"
2324
)
2425

2526
var WorkflowWireSet = wire.NewSet(
2627
cd.CdWorkflowWireSet,
2728
status.WorkflowStatusWireSet,
29+
hook.NewTriggerAuditHookImpl,
30+
wire.Bind(new(hook.TriggerAuditHook), new(*hook.TriggerAuditHookImpl)),
31+
hook.NewTriggerAuditHookImpl,
32+
wire.Bind(new(hook.TriggerAuditHook), new(*hook.TriggerAuditHookImpl)),
2833
)

0 commit comments

Comments
 (0)