diff --git a/CHANGELOG.md b/CHANGELOG.md index 26181d95..b0653824 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - option to auto-cancel pending builds when newer build enqueued, by [@bradrydzewski](https://github.com/bradrydzewski). [#1980](https://github.com/drone/drone/issues/1980). - endpoint to list all repositories in the database, by [@bradrydzewski](https://github.com/bradrydzewski). [#2785](https://github.com/drone/drone/issues/2785). +### Fixed +- improve sync to handle duplicate repository names with different unique identifiers, by [@bradrydzewski](https://github.com/bradrydzewski). [#2658](https://github.com/drone/drone/issues/2658). _You can revert to the previous sync logic with DRONE_DATABASE_LEGACY_BATCH=true_. + ## [1.5.1] - 2019-09-30 ### Added - allow organization admins access to organization secret endpoints, by [@bradrydzewski](https://github.com/bradrydzewski). [#2838](https://github.com/drone/drone/issues/2838). diff --git a/cmd/drone-server/config/config.go b/cmd/drone-server/config/config.go index 40c82f48..59d59112 100644 --- a/cmd/drone-server/config/config.go +++ b/cmd/drone-server/config/config.go @@ -109,7 +109,7 @@ type ( Secret string `envconfig:"DRONE_DATABASE_SECRET"` // Feature flag - ExperimentalBatch bool `envconfig:"DRONE_DATABASE_EXPERIMENTAL_BATCH"` + LegacyBatch bool `envconfig:"DRONE_DATABASE_LEGACY_BATCH"` } // Docker provides docker configuration diff --git a/cmd/drone-server/inject_store.go b/cmd/drone-server/inject_store.go index 34dbc23d..40af303d 100644 --- a/cmd/drone-server/inject_store.go +++ b/cmd/drone-server/inject_store.go @@ -135,8 +135,8 @@ func provideUserStore(db *db.DB) core.UserStore { // provideBatchStore is a Wire provider function that provides a // batcher. If the experimental batcher is enabled it is returned. func provideBatchStore(db *db.DB, config config.Config) core.Batcher { - if config.Database.ExperimentalBatch { - return batch2.New(db) + if config.Database.LegacyBatch { + return batch.New(db) } - return batch.New(db) + return batch2.New(db) }