Skip to content

Commit

Permalink
remove feature allocator?
Browse files Browse the repository at this point in the history
  • Loading branch information
smonero committed Apr 12, 2024
1 parent c514142 commit bc427f1
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions server/neptune/adhoc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (

"github.com/palantir/go-githubapp/githubapp"
"github.com/runatlantis/atlantis/server/legacy/events/vcs"
"github.com/runatlantis/atlantis/server/neptune/lyft/feature"
"github.com/runatlantis/atlantis/server/neptune/sync/crons"
ghClient "github.com/runatlantis/atlantis/server/neptune/workflows/activities/github"
"github.com/runatlantis/atlantis/server/vcs/provider/github"
Expand Down Expand Up @@ -103,17 +102,6 @@ func NewServer(config *adhocconfig.Config) (*Server, error) {
Logger: config.CtxLogger,
}

/*
config.TerraformCfg,
config.ValidationConfig,
config.App,
config.DataDir,
config.ServerCfg.URL,
config.TemporalCfg.TerraformTaskQueue,
config.GithubCfg.TemporalAppInstallationID,
jobStreamHandler,
*/

terraformActivities, err := activities.NewTerraform(
config.TerraformCfg,
config.ValidationConfig,
Expand All @@ -136,33 +124,15 @@ func NewServer(config *adhocconfig.Config) (*Server, error) {
return nil, errors.Wrap(err, "client creator")
}

repoConfig := feature.RepoConfig{
Owner: config.FeatureConfig.FFOwner,
Repo: config.FeatureConfig.FFRepo,
Branch: config.FeatureConfig.FFBranch,
Path: config.FeatureConfig.FFPath,
}
installationFetcher := &github.InstallationRetriever{
ClientCreator: clientCreator,
}
fileFetcher := &github.SingleFileContentsFetcher{
ClientCreator: clientCreator,
}
retriever := &feature.CustomGithubInstallationRetriever{
InstallationFetcher: installationFetcher,
FileContentsFetcher: fileFetcher,
Cfg: repoConfig,
}
featureAllocator, err := feature.NewGHSourcedAllocator(retriever, config.CtxLogger)
if err != nil {
return nil, errors.Wrap(err, "initializing feature allocator")
}

githubActivities, err := activities.NewGithub(
clientCreator,
config.GithubCfg.TemporalAppInstallationID,
config.DataDir,
featureAllocator,
nil,
)
if err != nil {
return nil, errors.Wrap(err, "initializing github activities")
Expand Down

0 comments on commit bc427f1

Please sign in to comment.