chore: refactor middleware setup in server#554
Merged
beeme1mr merged 16 commits intoopen-feature:mainfrom Mar 24, 2023
Merged
Conversation
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
4ca6609 to
9b9e023
Compare
Codecov Report
@@ Coverage Diff @@
## main #554 +/- ##
==========================================
+ Coverage 70.40% 70.92% +0.51%
==========================================
Files 19 21 +2
Lines 2156 2170 +14
==========================================
+ Hits 1518 1539 +21
+ Misses 578 574 -4
+ Partials 60 57 -3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
087bf69 to
1a90b2b
Compare
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
thisthat
approved these changes
Mar 23, 2023
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
…leware # Conflicts: # core/pkg/service/flag-evaluation/connect_service.go
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Contributor
|
Awesome work - this IMO is a long overdue refactoring to clean up. I left two improvements of which one is essential and the other is a suggestion. |
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Kavindu-Dodan
approved these changes
Mar 24, 2023
beeme1mr
approved these changes
Mar 24, 2023
Merged
toddbaert
added a commit
that referenced
this pull request
Mar 30, 2023
🤖 I have created a release *beep* *boop* --- <details><summary>flagd: 0.5.0</summary> ## [0.5.0](flagd/v0.4.5...flagd/v0.5.0) (2023-03-30) ### ⚠ BREAKING CHANGES * unify sources configuration handling ([#560](#560)) ### 🐛 Bug Fixes * benchmark pipeline ([#538](#538)) ([62cc0fc](62cc0fc)) * **deps:** update module github.com/open-feature/flagd/core to v0.4.5 ([#552](#552)) ([41799f6](41799f6)) ### 🧹 Chore * refactor configuration handling for startup ([#551](#551)) ([8dfbde5](8dfbde5)) </details> <details><summary>flagd-proxy: 0.2.0</summary> ## [0.2.0](flagd-proxy-v0.1.2...flagd-proxy/v0.2.0) (2023-03-30) ### ⚠ BREAKING CHANGES * rename `kube-flagd-proxy` to `flagd-proxy` ([#576](#576)) ### ✨ New Features * rename `kube-flagd-proxy` to `flagd-proxy` ([#576](#576)) ([223de99](223de99)) </details> <details><summary>core: 0.5.0</summary> ## [0.5.0](core/v0.4.5...core/v0.5.0) (2023-03-30) ### ⚠ BREAKING CHANGES * rename `kube-flagd-proxy` to `flagd-proxy` ([#576](#576)) * unify sources configuration handling ([#560](#560)) ### 🧹 Chore * move credential builder for grpc sync into seperate component ([#536](#536)) ([7314fee](7314fee)) * refactor configuration handling for startup ([#551](#551)) ([8dfbde5](8dfbde5)) * refactor middleware setup in server ([#554](#554)) ([01016c7](01016c7)) * refactor service configuration objects ([#545](#545)) ([c7b29ed](c7b29ed)), closes [#524](#524) * unify sources configuration handling ([#560](#560)) ([7f4888a](7f4888a)) ### 🐛 Bug Fixes * **deps:** update module google.golang.org/grpc to v1.54.0 ([#548](#548)) ([99ba5ec](99ba5ec)) * **deps:** update module sigs.k8s.io/controller-runtime to v0.14.6 ([#572](#572)) ([bed9458](bed9458)) * fixing silent lint failures ([#550](#550)) ([30c8022](30c8022)) * nil pointer fix + export constructors ([#555](#555)) ([78adb81](78adb81)) ### ✨ New Features * expose Impression metric ([#556](#556)) ([77e0a33](77e0a33)) * Introduce kube-proxy-metrics ([#558](#558)) ([ad0baeb](ad0baeb)) * rename `kube-flagd-proxy` to `flagd-proxy` ([#576](#576)) ([223de99](223de99)) * refactor core module into multiple packages ([#530](#530)) ([9d68d0b](9d68d0b)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: Todd Baert <toddbaert@gmail.com> Co-authored-by: Todd Baert <toddbaert@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aims to clean up the way the middlewares for the server are set up.
Previously, the Metrics, CORS and H2C Middlewares were each set up in different ways, which made that section of the code a bit hard to comprehend at first.
Therefore, i introduced a
middlewarepackage, including sub packages for the metrics, cors, and h2c middleware. Each of those middlewares implement anIMiddlewareinterface, that can be registered to the server using the newly introducedAddMiddlewarefunction