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

bump go module version, add minor lint fixes #105

Merged
merged 1 commit into from
Aug 25, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'
- name: Cache Go modules
uses: actions/cache@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'
- name: Run Tests
run: |-
cd src/
Expand Down
9 changes: 5 additions & 4 deletions src/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import (
"context"
"errors"
"fmt"
"strings"
"sync"
"time"

"github.com/getsentry/sentry-go"
opslevel_common "github.com/opslevel/opslevel-common/v2022"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/trace"
clientset "k8s.io/client-go/kubernetes"
"strings"
"sync"
"time"

"github.com/opslevel/opslevel-go/v2023"
"github.com/opslevel/opslevel-runner/pkg"
Expand Down Expand Up @@ -137,7 +138,7 @@ func jobWorker(wg *sync.WaitGroup, index int, runnerId opslevel.ID, jobQueue <-c
trace.WithAttributes(attribute.String("job", jobNumber)),
)
outcome := runner.Run(job, streamer.Stdout, streamer.Stderr)
ctx, spanFinish := tracer.Start(ctx,
_, spanFinish := tracer.Start(ctx,
"finish-job",
trace.WithSpanKind(trace.SpanKindConsumer),
trace.WithAttributes(attribute.String("job", jobNumber)))
Expand Down
2 changes: 1 addition & 1 deletion src/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/opslevel/opslevel-runner

go 1.19
go 1.20

require (
github.com/getsentry/sentry-go v0.21.0
Expand Down
5 changes: 3 additions & 2 deletions src/pkg/opslevelAppendLogProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package pkg

import (
"encoding/base64"
"time"

"github.com/opslevel/opslevel-go/v2023"
"github.com/rs/zerolog"
"time"
)

type OpsLevelAppendLogProcessor struct {
Expand Down Expand Up @@ -49,7 +50,7 @@ func (s *OpsLevelAppendLogProcessor) Process(line string) string {

s.logLinesBytesSize += lineBytesSize
s.logLines = append(s.logLines, base64.StdEncoding.EncodeToString(lineInBytes))
if s.firstLine == false {
if !s.firstLine {
s.logger.Trace().Msg("Shipping logs because its the first line ...")
s.firstLine = true
s.submit()
Expand Down
Loading