-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
#651 Merge custom JSON properties across multiple ocelot.X.json
configuration files using Newtonsoft's JToken
merge functionality
#1183
base: develop
Are you sure you want to change the base?
Conversation
4eb4482
to
9ec4b8d
Compare
Congrats, @jlukawska ! 🎉 We can go with code review now... |
@RaynaldM @wast |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jlukawska
Could you fix the issues please?
How to read CustomStrategyProperty
value of the route in run-time?
|
||
fileConfiguration.Aggregates.AddRange(config.Aggregates); | ||
fileConfiguration.Routes.AddRange(config.Routes); | ||
MergeConfig(fileConfiguration, config, isGlobal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆗 Merged config JSON goes to primaryConfigFile. And it will be serialized to ocelot.json file.
And the primary config will be attached to IConfigurationBuilder
object by AddJsonFile
method.
Could you show me a case how can I read this custom property inside of extension-methods for IConfigurationBuilder
interface?
@nurhat @jlukawska User case 1Change behavior of PollyQoSProviderGiven, I wish to override behavior of the Quality of Service feature by changes in PollyQoSProvider and/or AddPolly and/or PollyCircuitBreakingDelegatingHandler classes. Question:
|
04debe6
to
7f61d01
Compare
@raman-m, I marked this PR as a draft, because I am not sure if the conflicts are resolved correctly (even though the tests passed correctly). It wasn't that easy ;) I'd have to revise the code, understand the changes from develop branch and maybe the PR code would have to be improved. |
Understood, Jolanta. It seems you're uncertain and wish to further develop. I also notice that many PR files contain a fake diff indicating numerous merge conflicts were resolved. Here's what I suggest:
Does this sound like a good approach? P.S. |
🆗 I'm going to rebase the branch... |
potential warnings
8c3ec5a
to
1b2198c
Compare
@jlukawska commented on May 16, 2024
I've rebased the feature branch today and addressed the failed tests. The entire code appears to be in good shape. I will provide my final code review later, after receiving feedback from the team. However, the current acceptance test confirms the successful merging of JSON. More tests are necessary, and it seems they will be essential for the upcoming C# helpers that will be reused in the actual code of middlewares, similar to how the Metadata-helpers function.
Indeed, the question of whether this PR would be beneficial to anyone is quite pertinent, especially after the introduction of the Route Metadata feature (aka Metadata). While some developers may not favor storing additional route data in the
Mr. @nurhat didn't even reply to me, which suggests he might have used a work account linked to a corporate email. Developers often change jobs and employers, along with their work emails. Regardless, I'll assume the role of the author. 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready for Code Review❕
ocelot.X.json
configuration files using Newtonsoft's JToken
merge functionality
SuccessorsThis PR must be merged first❗ |
Closes #651
Proposed Changes