fix: collector connection to opamp without orgID (#7474)

This commit is contained in:
Nityananda Gohain 2025-03-28 20:19:37 +05:30 committed by GitHub
parent 031d62ca44
commit 8fc43a00f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,11 +145,12 @@ func (ic *LogParsingPipelineController) getEffectivePipelinesByVersion(
// todo(nitya): remove this once we fix agents in multitenancy
defaultOrgID, err := ic.GetDefaultOrgID(ctx)
if err != nil {
return nil, model.WrapApiError(err, "failed to get default org ID")
// we don't want to fail the request if we can't get the default org ID
// we will just return an empty list of pipelines
zap.L().Warn("failed to get default org ID", zap.Error(err))
return result, nil
}
fmt.Println("defaultOrgID", defaultOrgID)
if version >= 0 {
savedPipelines, errors := ic.getPipelinesByVersion(ctx, defaultOrgID, version)
if errors != nil {