Route console diagnostics and stage progress through native reporting
This commit is contained in:
@@ -87,6 +87,9 @@ func (a *configurationAcquisition) Pipeline(ctx context.Context) (*config.Pipeli
|
||||
return nil, err
|
||||
}
|
||||
a.pipeline, a.pipelinePath = cfg, path
|
||||
if a.deps.reporter != nil {
|
||||
a.deps.reporter.Info("selected pipeline configuration", "source", path, "overlay", a.selection.Overlay.Value)
|
||||
}
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
@@ -121,6 +124,9 @@ func (a *configurationAcquisition) Campaign(ctx context.Context) (*config.Campai
|
||||
return nil, &config.SessionIdentityError{Source: path, Field: "campaign_id", Expected: a.selection.Campaign.Value, Actual: config.CampaignID(cfg)}
|
||||
}
|
||||
a.campaign, a.campaignPath = cfg, path
|
||||
if a.deps.reporter != nil {
|
||||
a.deps.reporter.Info("selected campaign configuration", "campaign", config.CampaignID(cfg), "source", path)
|
||||
}
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
@@ -145,6 +151,9 @@ func (a *configurationAcquisition) Party(ctx context.Context) (*config.ResolvedP
|
||||
return nil, err
|
||||
}
|
||||
a.party = &party
|
||||
if a.deps.reporter != nil {
|
||||
a.deps.reporter.Info("selected party configuration", "source", party.Source.Path)
|
||||
}
|
||||
return a.party, nil
|
||||
}
|
||||
|
||||
@@ -174,6 +183,9 @@ func (a *configurationAcquisition) Session(ctx context.Context) (*config.Session
|
||||
return nil, err
|
||||
}
|
||||
a.session = &acquiredSession{Config: session, Path: path, Source: config.SessionSource{Source: "session_config", LocalPath: path}}
|
||||
if a.deps.reporter != nil {
|
||||
a.deps.reporter.Info("selected session configuration", "session", session.SessionID, "source", path)
|
||||
}
|
||||
return session, nil
|
||||
}
|
||||
session, path, err := config.DiscoverSession(config.DefaultSessionConfigSearchPaths, opts)
|
||||
@@ -186,6 +198,9 @@ func (a *configurationAcquisition) Session(ctx context.Context) (*config.Session
|
||||
return nil, err
|
||||
}
|
||||
a.session = &acquiredSession{Config: session, Path: path, Source: config.SessionSource{Source: "session_config", LocalPath: path}}
|
||||
if a.deps.reporter != nil {
|
||||
a.deps.reporter.Info("selected session configuration", "session", session.SessionID, "source", path)
|
||||
}
|
||||
return session, nil
|
||||
}
|
||||
if a.selection.Session.Value == "" {
|
||||
@@ -205,6 +220,9 @@ func (a *configurationAcquisition) Session(ctx context.Context) (*config.Session
|
||||
return nil, err
|
||||
}
|
||||
a.session = loaded
|
||||
if a.deps.reporter != nil {
|
||||
a.deps.reporter.Info("selected session configuration", "session", loaded.Config.SessionID, "source", loaded.Source.Source, "key", loaded.Source.S3Key)
|
||||
}
|
||||
if err := ctx.Err(); err != nil {
|
||||
return nil, errors.Join(err, a.Close())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user