-
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
#1225 Update ServiceDiscovery documentation and samples to include Custom Providers #1656
Conversation
Hi @leonluc-dev ! Leon or Leonluc? |
Hey @leonluc-dev ! |
@leonluc-dev |
@raman-m Thank you for the response. I made no modifications to the Ocelot code itself. What I've documented was an already present and tested Ocelot interface ( Most if not all of the Ocelot code this documentation example utilizes is already unit tested through the ServiceDiscoveryProviderFactory and related tests: ServiceDiscoveryProviderFactoryTests While there have been no Github issues directly related to this particular interface, there have been questions about custom service discovery in the past (example: #1225) If this interface/code was not meant to be used in that sense then this PR can be closed without merge. Otherwise I do have a working project where I utilize a custom service discovery provider. I could turn that into a proper sample and add it to |
@leonluc-dev
It is not required, but it will be highly welcomed to add. Regarding tests. Yes, current tests should cover custom provider. Once again, |
@ramam-m I have added the sample for custom service discovery providers to the PR. |
It was bad idea to include the new sample project right to this PR which was about docs updating. Leon, you should expect that this PR will have long story... |
@raman-m Apologies for the misunderstanding. If it makes it easier, I can rebase the branch and remove the commit involving the sample from this PR. Afterwards I can add the sample to a new seperate PR. |
Leon, And just FYI, your develop branch is not canonic now. And your source repo develop branch should have the same top commits in target/base branch. You will be blocked in creation of new feature branches, because both develop branches must be synchronized always. |
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.
You've saved all code in the samples/OcelotCustom/
folder.
But what is custom?
The current folder structure use exact marker of an environment.
Please move all code to folder samples/OcelotServiceDiscovery/
!
Second,
I don't see your sample solution in VS solution folders!
You need to add your sample to samples solution folder as service-discovery solution folder. Use eureka folder as an example.
So, your projects should be added to Ocelot.sln file!
That's how your projects will be compiled and checked by CI-CD pipelines.
@raman-m The requested changes should be addressed now. |
@leonluc-dev |
@schwede Hi Swede! |
@leonluc-dev Congrats! 🎉 |
Closes #1225
The new section in service discovery documentation on how to implement a custom service provider.
Proposed Changes