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

#1228 #1235 #1247 Overloaded AddOcelot method for dynamic FileConfiguration construction #1569

Merged
merged 10 commits into from
Sep 23, 2023

Conversation

vijay-karavadra
Copy link
Contributor

@vijay-karavadra vijay-karavadra commented Mar 26, 2022

Closes #1228 #1235 #1247

New Feature

Added an AddOcelot overload to load FileConfiguration directly from the application, so that all the routes could be made configurable and could be load from anywhere.

Proposed Changes

  • Added a new overload to the AddOcelot in ConfigurationBuilder to remove Ocelot file dependency from the application.

@vijay-karavadra
Copy link
Contributor Author

@TomPallister Please review.

@raman-m
Copy link
Member

raman-m commented May 13, 2023

@vijay-karavadra Hi Vijay!
What issue is this PR related to?

Could you write a couple of unit/integration tests for your proposed feature, please?

@raman-m raman-m added feature A new feature small effort Likely less than a day of development effort. proposal Proposal for a new functionality in Ocelot waiting Waiting for answer to question or feedback from issue raiser labels May 13, 2023
Copy link
Member

@raman-m raman-m left a comment

Choose a reason for hiding this comment

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

Please, fix minor issues!

Also, I would welcome you to write unit and/or integration test(s).

@raman-m raman-m changed the title Added AddOcelot Configbuilder Overload Added overloaded AddOcelot method as an extension of the IConfigurationBuilder interface May 13, 2023
Added an AddOcelot overload to load FileConfiguration directly from the application, so that all the routes could be made configurable and could be load from anywhere.
@vijay-karavadra
Copy link
Contributor Author

Hey @raman-m ,

First of all, thanks for the review. I appreciate it.

I had added this overload because I wanted to load ocelot configuration from a third party configuration manager(AWS SSM). So, I was thinking to load them on startup and then seed them into ocelot with this overload.

So, the thing is I'm a little bit busy right now and this has been deprioritized at the moment. But, I still think that this feature makes sense, so I'll try to give some time to it by this or next weekend and will try to complete it.

Thanks!

@raman-m
Copy link
Member

raman-m commented Jul 11, 2023

@vijay-karavadra commented on Jul 10, 2023

I had added this overload because I wanted to load ocelot configuration from a third party configuration manager(AWS SSM). So, I was thinking to load them on startup and then seed them into ocelot with this overload.

OK. New extensions for the IConfigurationBuilder interface are welcome! We created the similar extensions for IMvcCoreBuilder interface, see #1655 please. You could get some inspiration from this PR.


But, I still think that this feature makes sense, so I'll try to give some time to it by this or next weekend and will try to complete it.

Sure thing, Vijay!

Pay attention that if you introduce new extension-method, it is required to update docs to show how to use your extended functionality. More in #1655 .
Ping me if you need a help!

@raman-m raman-m added medium effort Likely a few days of development effort and removed small effort Likely less than a day of development effort. proposal Proposal for a new functionality in Ocelot labels Jul 11, 2023
@raman-m
Copy link
Member

raman-m commented Jul 11, 2023

Is this PR related to some existed issue?

@raman-m
Copy link
Member

raman-m commented Sep 7, 2023

@vijay-karavadra Hi!
How was your summer?
Are you going to contribute (fix code review issues, write unit tests)?

Pay attention this is production ready project. A number of projects use this gateway.
And the quality of the source code should be high.
For new functionality unit & acceptance tests must be written. But especially for this PR only unit test could be accepted.
It is better to update docs too. Tom can ask to write examples, code snippets in docs.

Are you ready for new code challenges? 😉

@raman-m
Copy link
Member

raman-m commented Sep 7, 2023

@vijay-karavadra commented on Jul 10:

I had added this overload because I wanted to load ocelot configuration from a third party configuration manager (AWS SSM). So, I was thinking to load them on startup and then seed them into ocelot with this overload.

Do you have a successful and workable solution now? I meant store file config object in AWS SSM, inject this object during app startup, pass the object to your extension-method...

It seems we have to write some acceptance test(s) to emulate AWS environment, and integrate to Ocelot environment.
But having such solutions from your side, writing an acceptance tests won't be a difficult challenge.

@raman-m raman-m added the question Initially seen a question could become a new feature or bug or closed ;) label Sep 7, 2023
@vijay-karavadra
Copy link
Contributor Author

Hey @raman-m ,

I had a great summer! I hope you had a great one too and also you are doing well.

I was somewhat busy in some projects, thanks for bringing me back to this. I appreciate your patience and I grasp the gravity and significance of this project.

I added the code review changes as per suggestions, please review. Also I started working on unit and acceptance tests and will push once done.

@raman-m
Copy link
Member

raman-m commented Sep 8, 2023

@vijay-karavadra commented on Sep 8

Perfect! Added code is fine. 2 code review issues have been resolved.
Waiting for the next commits with tests...

@vijay-karavadra
Copy link
Contributor Author

@raman-m

I have recently incorporated unit tests, and I would greatly appreciate your review of them. In regard to the acceptance tests, I've conducted a thorough examination of the existing ones. It appears that the acceptance tests have been designed under the presumption that the configuration builder functions seamlessly. To clarify, the configuration builder is not included as a component of the acceptance tests. Nevertheless, I am open to your insights and suggestions, so please do inform me if there are any specific tests you believe should be integrated into our suite of unit and acceptance tests.

…inalize(object). This will prevent derived types that introduce a finalizer from needing to re-implement 'IDisposable' to call it.
Copy link
Member

@raman-m raman-m left a comment

Choose a reason for hiding this comment

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

One more approval is required.

@raman-m raman-m added accepted Bug or feature would be accepted as a PR or is being worked on and removed needs feedback Issue is waiting on feedback before acceptance labels Sep 20, 2023
@raman-m raman-m linked an issue Sep 21, 2023 that may be closed by this pull request
@raman-m raman-m changed the title Added overloaded AddOcelot method as an extension of the IConfigurationBuilder interface #1228 #1235 #1247 Overloaded AddOcelot method for dynamic FileConfiguration construction Sep 21, 2023
@raman-m raman-m merged commit 4d245ec into ThreeMammals:develop Sep 23, 2023
@vijay-karavadra
Copy link
Contributor Author

Thanks @raman-m . It was a very good experience in working in this library. Feel free to assign me any issues in this library where the help is needed. I'd be happy to help!

@raman-m
Copy link
Member

raman-m commented Oct 9, 2023

@vijay-karavadra commented on Sep 23

You are welcome!
Much help is needed in backlog. There are a lot of issues! And you are free to assign any of them 😉
I would suggest to assign a bug to yourself, with Accepted label or not, because bugs have highest priority. Skip bugs which have attached PR, for sure. So, take any bug without a PR. And ping me a message in the bug's thread, and you'll be assigned.

@vijay-karavadra vijay-karavadra deleted the patch-1 branch October 10, 2023 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Bug or feature would be accepted as a PR or is being worked on feature A new feature
Projects
None yet
3 participants