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

Fixes crash when plugin configuration is not defined in a job #689

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
name: Test
on: [pull_request]
on: [push,pull_request]
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.13
go-version: 1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Get dependencies
run: go get -v -t -d ./...

- name: Test without docker
run: go test -v -timeout 200s ./...

run: go test -v -timeout 200s ./...
3 changes: 3 additions & 0 deletions dkron/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ func NewJobFromProto(in *proto.Job) *Job {

procs := make(map[string]PluginConfig)
for k, v := range in.Processors {
if len(v.Config) == 0 {
v.Config = make(map[string]string)
}
procs[k] = v.Config
}
job.Processors = procs
Expand Down