Ryan Slade

Results 26 comments of Ryan Slade

Strange, we appear to already have this constraint in our DB: https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph@39addfbfe2ef2002cb5ab550e03b5a9810209c19/-/blob/internal/database/schema.md?L1180:6

I believe this can happen on instances that have encryption enabled since the encrypted value even of an empty string will be non empty.

FYI: I'm looking into a related issue where it seems we're not validating external service config when we do an upsert, but we *do* validate when we create or update...

External service config is now properly validated over all code paths via https://github.com/sourcegraph/sourcegraph/pull/41985

> Should we instead say the config has to be _parseable_? @eseliger I'm going to look into this today. We already have the [MakeValidateExternalServiceConfigFunc](https://github.com/sourcegraph/sourcegraph/blob/fad6910997c7b627f7271c26461523e1a41212e3/internal/database/external_services.go#L335) function which appears to do what...

> Might be that this PR would fix it, too (didn't dive too deep): #42039 That PR assumes we were doing the validation correctly in all cases, but we weren't...

This change has broken *a lot* of tests outside of the `internal/database` package. I'll go though and update them. I think in most cases it's because we use dummy code...

I think making the batch size configurable via an environment variable is a good starting point. Additionally, I think we can either introduce a "delay" variable which allows a pause...

To keep things simple for now I'm going to allow a simple delay after each batch. I think a combination of this and batch size should be enough for now...