Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

databroker: build config concurrently, option to bypass validation #4655

Merged
merged 7 commits into from Nov 6, 2023

Conversation

wasaga
Copy link
Contributor

@wasaga wasaga commented Oct 31, 2023

Summary

  1. refactors databroker.ConfigSource to spread config build across multiple goroutines
  2. Adds (code-only) option to bypass certain expensive validations, which is useful in case config originates from source that already validates config (i.e. console).

Related issues

User Explanation

Checklist

  • reference any related issues
  • updated docs
  • updated unit tests
  • updated UPGRADING.md
  • add appropriate tag (improvement / bug / etc)
  • ready for review

@coveralls
Copy link

coveralls commented Oct 31, 2023

Coverage Status

coverage: 63.618% (+0.09%) from 63.53%
when pulling a00de1c on wasaga/pomerium-disable-validation
into 77bb203 on main.

@wasaga wasaga changed the title validation: option to bypass databroker: build config concurrently, option to bypass validation Nov 2, 2023
@wasaga wasaga added enhancement New feature or request performance labels Nov 2, 2023
@wasaga wasaga marked this pull request as ready for review November 2, 2023 00:30
@wasaga wasaga requested a review from a team as a code owner November 2, 2023 00:30
@@ -40,7 +40,7 @@ func Run(ctx context.Context, src config.Source) error {
if err != nil {
return err
}
src = databroker.NewConfigSource(ctx, src)
src = databroker.NewConfigSource(ctx, src, databroker.EnableConfigValidation(true))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is to keep current behaviour for now

if err != nil {
metrics.SetDBConfigRejected(ctx, cfg.Options.Services, id, cfgpb.version, err)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those metrics were originally added for console, however they are not compatible with chunked config anyway currently, thus removing them for now as they require redesign.

@wasaga wasaga merged commit bfcc970 into main Nov 6, 2023
9 checks passed
@wasaga wasaga deleted the wasaga/pomerium-disable-validation branch November 6, 2023 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants