mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 19:47:34 +00:00
Revert "fix(mirror): include fields in mirror projections (#9884)"
This reverts commit 5e66851c69
.
This commit is contained in:
@@ -285,13 +285,6 @@ func execProjections(ctx context.Context, instances <-chan string, failedInstanc
|
||||
continue
|
||||
}
|
||||
|
||||
err = projection.ProjectInstanceFields(ctx)
|
||||
if err != nil {
|
||||
logging.WithFields("instance", instance).WithError(err).Info("trigger fields failed")
|
||||
failedInstances <- instance
|
||||
continue
|
||||
}
|
||||
|
||||
err = auth_handler.ProjectInstance(ctx)
|
||||
if err != nil {
|
||||
logging.WithFields("instance", instance).OnError(err).Info("trigger auth handler failed")
|
||||
|
@@ -101,7 +101,6 @@ type projection interface {
|
||||
|
||||
var (
|
||||
projections []projection
|
||||
fields []*handler.FieldHandler
|
||||
)
|
||||
|
||||
func Create(ctx context.Context, sqlClient *database.DB, es handler.EventStore, config Config, keyEncryptionAlgorithm crypto.EncryptionAlgorithm, certEncryptionAlgorithm crypto.EncryptionAlgorithm, systemUsers map[string]*internal_authz.SystemAPIUser) error {
|
||||
@@ -183,7 +182,6 @@ func Create(ctx context.Context, sqlClient *database.DB, es handler.EventStore,
|
||||
MembershipFields = newFillMembershipFields(applyCustomConfig(projectionConfig, config.Customizations[fieldsMemberships]))
|
||||
|
||||
newProjectionsList()
|
||||
newFieldsList()
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -217,18 +215,6 @@ func ProjectInstance(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func ProjectInstanceFields(ctx context.Context) error {
|
||||
for i, fieldProjection := range fields {
|
||||
logging.WithFields("name", fieldProjection.ProjectionName(), "instance", internal_authz.GetInstance(ctx).InstanceID(), "index", fmt.Sprintf("%d/%d", i, len(fields))).Info("starting fields projection")
|
||||
err := fieldProjection.Trigger(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
logging.WithFields("name", fieldProjection.ProjectionName(), "instance", internal_authz.GetInstance(ctx).InstanceID()).Info("fields projection done")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func ApplyCustomConfig(customConfig CustomConfig) handler.Config {
|
||||
return applyCustomConfig(projectionConfig, customConfig)
|
||||
}
|
||||
@@ -253,17 +239,6 @@ func applyCustomConfig(config handler.Config, customConfig CustomConfig) handler
|
||||
return config
|
||||
}
|
||||
|
||||
// we know this is ugly, but we need to have a singleton slice of all projections
|
||||
// and are only able to initialize it after all projections are created
|
||||
// as setup and start currently create them individually, we make sure we get the right one
|
||||
// will be refactored when changing to new id based projections
|
||||
func newFieldsList() {
|
||||
fields = []*handler.FieldHandler{
|
||||
ProjectGrantFields,
|
||||
OrgDomainVerifiedFields,
|
||||
}
|
||||
}
|
||||
|
||||
// we know this is ugly, but we need to have a singleton slice of all projections
|
||||
// and are only able to initialize it after all projections are created
|
||||
// as setup and start currently create them individually, we make sure we get the right one
|
||||
|
Reference in New Issue
Block a user