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

fix: introduce deck content to dbless config converter #4453

Merged
merged 4 commits into from
Aug 4, 2023

Conversation

czeslavo
Copy link
Contributor

@czeslavo czeslavo commented Aug 4, 2023

What this PR does / why we need it:

Introduces ContentToDBLessConfigConverter used by UpdateStrategyInMemory to adapt decK's file.Content to match DBLess schema constraints.

It extracts the already existing conversions from UpdateStrategyInMemory (dropping Info field, cleaning up nulls in plugins' configs), and also adds cleanups for ConsumerGroups related fields (dropping Plugins[i].ConsumerGroup, Consumers[i].Group, ConsumerGroups[i].Plugins, ConsumerGroups[i].Consumers, filling relationships).

Also adds an example config for ConsumerGroup.

Which issue this PR fixes:

Fixes #4448.

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Patch coverage: 100.0% and project coverage change: -1.5% ⚠️

Comparison is base (7e567cc) 67.5% compared to head (25609f7) 66.0%.
Report is 1 commits behind head on main.

❗ Current head 25609f7 differs from pull request most recent head 4ad45a4. Consider uploading reports for the commit 4ad45a4 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4453     +/-   ##
=======================================
- Coverage   67.5%   66.0%   -1.5%     
=======================================
  Files        160     156      -4     
  Lines      18804   18722     -82     
=======================================
- Hits       12699   12372    -327     
- Misses      5343    5631    +288     
+ Partials     762     719     -43     
Files Changed Coverage Δ
internal/dataplane/deckgen/deckgen.go 64.0% <ø> (+8.5%) ⬆️
internal/dataplane/sendconfig/inmemory.go 72.0% <100.0%> (-17.7%) ⬇️
internal/dataplane/sendconfig/inmemory_schema.go 100.0% <100.0%> (ø)
internal/dataplane/sendconfig/strategy.go 100.0% <100.0%> (ø)

... and 35 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@czeslavo czeslavo self-assigned this Aug 4, 2023
@czeslavo czeslavo added area/feature New feature or request fix and removed area/feature New feature or request labels Aug 4, 2023
@czeslavo czeslavo added this to the KIC v2.11.0 milestone Aug 4, 2023
@pull-request-size pull-request-size bot added size/XL and removed size/L labels Aug 4, 2023
@czeslavo czeslavo marked this pull request as ready for review August 4, 2023 16:26
@czeslavo czeslavo requested a review from a team as a code owner August 4, 2023 16:26
internal/dataplane/sendconfig/inmemory_schema.go Outdated Show resolved Hide resolved
internal/dataplane/sendconfig/inmemory_schema.go Outdated Show resolved Hide resolved
internal/dataplane/sendconfig/inmemory_schema_test.go Outdated Show resolved Hide resolved
@czeslavo czeslavo changed the title fix: introduce content to dbless schema converter fix: introduce deck content to dbless config converter Aug 4, 2023
@czeslavo czeslavo enabled auto-merge (squash) August 4, 2023 20:01
@czeslavo czeslavo merged commit 9dfe212 into main Aug 4, 2023
30 checks passed
@czeslavo czeslavo deleted the dbless-schema-converter branch August 4, 2023 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure consumer_group_consumers in dbless mode kong configurations to set consumers in consumer groups
2 participants