Skip to content

Commit

Permalink
add jobstreamhandler back so it doesn't panic in adhoc mode (#750)
Browse files Browse the repository at this point in the history
accidently removed this before merging the last PR, here it is again :)
  • Loading branch information
smonero authored Apr 29, 2024
1 parent 146af39 commit 7c02fcd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion server/neptune/adhoc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
internalSync "github.com/runatlantis/atlantis/server/neptune/sync"
"github.com/runatlantis/atlantis/server/neptune/temporal"
neptune "github.com/runatlantis/atlantis/server/neptune/temporalworker/config"
"github.com/runatlantis/atlantis/server/neptune/temporalworker/job"
"github.com/runatlantis/atlantis/server/neptune/workflows"
"github.com/runatlantis/atlantis/server/neptune/workflows/activities"
"github.com/runatlantis/atlantis/server/static"
Expand Down Expand Up @@ -81,6 +82,14 @@ func NewServer(config *adhocconfig.Config) (*Server, error) {
"mode": "adhoc",
})

jobStore, err := job.NewStorageBackendStore(config.JobConfig, scope.SubScope("job.store"), config.CtxLogger)
if err != nil {
return nil, errors.Wrapf(err, "initializing job store")
}
receiverRegistry := job.NewReceiverRegistry()

jobStreamHandler := job.NewStreamHandler(jobStore, receiverRegistry, config.TerraformCfg.LogFilters, config.CtxLogger)

opts := &temporal.Options{
StatsReporter: statsReporter,
}
Expand Down Expand Up @@ -115,7 +124,7 @@ func NewServer(config *adhocconfig.Config) (*Server, error) {
config.ServerCfg.URL,
config.TemporalCfg.TerraformTaskQueue,
config.GithubCfg.TemporalAppInstallationID,
nil,
jobStreamHandler,
)
if err != nil {
return nil, errors.Wrap(err, "initializing terraform activities")
Expand Down

0 comments on commit 7c02fcd

Please sign in to comment.