Commit Graph

902 Commits

Author SHA1 Message Date
b909b34591 Update routing.rst (#193)
lack of ":"
2018-01-10 08:14:14 +00:00
6992f9e113 fixed issu where if service dropped out then leastconnection would not pick it up again (#195) 2018-01-10 08:12:22 +00:00
e3db60bd49 Merge pull request #33 from TomPallister/develop
merge newest code
2018-01-06 20:56:05 -06:00
5d2889aaee Merge branch 'release-2.0.8' 2018-01-06 16:40:28 +00:00
6a20baeb97 Improving logging and request id (#189)
* hacking around to work out why logging and request id isnt working

* pass request id into logger so it can be structured, removed a bunch of debug logging we dont need because diagnostic trace gets it

* changed config dependency

* always have tracing available

* made it so we dont need to pass config into services.AddOcelot anymore with .net core 2.0

* add test

* lots of changes relating to logging and request ids, also updated documentation

* fixed failing test i missed
2018-01-06 16:39:05 +00:00
e232c3be98 Merge branch 'develop' into release-2.0.7 2018-01-05 21:50:16 +00:00
464f266148 Feature/fix #185 round 2 (#188)
* Changed routing to support a catch all style

* refactoring placeholder tuff

* implemented simple priority in the routing
2018-01-05 21:49:03 +00:00
fef19ddf98 Changed routing to support a catch all style (#187)
* Changed routing to support a catch all style

* refactoring placeholder tuff

* implemented simple priority in the routing
2018-01-05 21:26:15 +00:00
9de00d6a46 implemented simple priority in the routing 2018-01-05 21:14:17 +00:00
9f8da1fbe4 refactoring placeholder tuff 2018-01-05 08:18:37 +00:00
9cb201cfa9 Changed routing to support a catch all style 2018-01-04 21:35:44 +00:00
931a115ffa changes to add new feature to url routing (#186) 2018-01-02 18:49:22 +00:00
f082f7318a Raft round 2 (#182)
* brought in rafty

* moved raft classes into Ocelot and deleted from int project

* started to set up rafty in Ocelot

* RAFTY INSIDE OCELOT...WOOT

* more work adding rafty...just need to get auth working now

* rudimentary authenticated raft requests working

* asyn await stuff

* hacked rafty into the fileconfigurationcontroller...everything seems to be working roughly but I have a lot of refactoring to do

* updated to latest rafty that doesnt need an id

* hacky but all tests passing

* changed admin area set up to use builder not configuration.json, changed admin area auth to use client credentials

* missing code coverage

* ignore raft sectionf for code coverage

* ignore raft sectionf for code coverage

* back to normal filters

* try exclude attr

* missed these

* moved client secret to builder for authentication and updated docs

* lock to try and fix error accessing identity server created temprsa file on build server

* updated postman scripts and changed Ocelot to not always use type handling as this looked crap when manually accessing the configuration endpoint

* added rafty docs

* changes I missed

* added serialisation code we need for rafty to process commands when they proxy to leader

* moved controllers into their feature slices
2018-01-01 18:40:39 +00:00
194f76cf7f #177 - optimise the build scripts (#178)
* Remove explicit restore, and don't rebuild during tests.

This currently fails because the release config doesn't contain symbols needed by opencover.

* Build unit tests in debug

Turns out that for test coverage we need to have debug symbols.
2017-12-18 22:11:17 +00:00
79029f50d3 change to make test pass for issue 171 2017-12-12 07:45:03 +00:00
526e2dbf18 Merge branch 'awarrenlove-ocelot-builder-lifetimes' into develop 2017-12-12 07:42:59 +00:00
b6baa55221 Merge branch 'ocelot-builder-lifetimes' of https://github.com/awarrenlove/Ocelot into awarrenlove-ocelot-builder-lifetimes 2017-12-12 07:42:29 +00:00
5855a14935 Feature/more validation (#174)
* added message assertion for validation test

* another message assertion

* more validation tests
2017-12-09 14:41:35 +00:00
67a421cb69 Feature/fix build always reporting green (#173)
* added last exit code to wrapper scripts

* try force fail

* ooops missed ;

* trying again

* fail build with bad test

* removed exception

* removed using
2017-12-06 08:24:11 +00:00
4f27a50503 add file configuration fluent validation and change default configura… (#168)
* add file configuration fluent validation and change default configuration validator to fluent validator

* add file validation failed error code

* change authentication schemes check to async

* beautify the code ^_^

* clean file validation and fix test failure.
2017-12-05 18:29:44 +00:00
189471caba demonstrate issue #169 2017-12-04 10:11:56 -05:00
31fe6af614 correct path for images 2017-12-04 09:05:15 +00:00
e12b9d123e images for docs 2017-12-04 09:03:49 +00:00
9a0096c4a6 Merge pull request #32 from TomPallister/develop
merge 2.0.4
2017-12-03 13:16:03 +08:00
df03e2b51a added more docs around authentication 2017-12-01 08:10:45 +00:00
c986f750bb merge 2017-11-29 08:21:11 +00:00
868fada01f should return when error 2017-11-29 08:19:46 +00:00
dff1df822f Update README.md 2017-11-28 22:01:45 +00:00
c1db76de29 changed docs 2017-11-26 18:59:55 +00:00
8e033a916d Update README.md 2017-11-25 15:47:42 +00:00
c3e73d42d3 updated gitignore 2017-11-25 15:40:53 +00:00
923276651d Feature/docs (#165)
* initial readthedocs commit

* docs moved to sphinx / rst / read the docs
2017-11-25 15:03:50 +00:00
48b5a32676 Implement mapping of HttpResponseMessage to CachedResponse to fix #152 (#153)
* changed name to cache options to fix issue #146

* Add acceptance test that exposes JSON deserialization bug from issue #146

- Create InMemoryJsonHandle for CacheManager that mimics DictionaryHandle but uses ICacheSerializer to serialize/deserialize values instead of saving references
- Add CacheManager.Serialization.Json package
- Add StartupWithCustomCacheHandle class that extends Startup and overrides ConfigureServices to register InMemoryJsonHandle
- Add GivenOcelotIsRunningUsingConsulToStoreConfigAndJsonSerializedCache method to initiate Ocelot with StartupWithCustomCacheHandle
- Add test should_return_response_200_with_simple_url_when_using_jsonserialized_cache

* Create Acceptance test that exposes issue #152

- Add GivenOcelotIsRunningUsingJsonSerializedCache() that initializes Ocelot with InMemoryJsonHandle
- Add should_return_cached_response_when_using_jsonserialized_cache test

* Change Consul port to 9502 on should_return_response_200_with_simple_url_when_using_jsonserialized_cache() test

* Implement mapping of HttpResponseMessage to CachedResponse to enable distributed caching

- Add CachedResponse class that holds HttpResponse data
- Add mapping methods in OutputCacheMiddleware to create HttpResponseMessage from CachedResponse and vice versa
- Replace HttpResponseMessage with CachedResponse in services registrations
- Replace HttpResponseMessage with CachedResponse in OutputCacheController's IOcelotCache

* Fix unit tests for OutputCacheMiddleware and OutputCacheController by replacing HttpResponseMessage with CachedResponse

* Add .editorconfig with default identation settings (spaces with size 4)

* Re-format broken files with new identation settings

* Add Startup_WithConsul_And_CustomCacheHandle class

- Use Startup_WithConsul_And_CustomCacheHandle in GivenOcelotIsRunningUsingConsulToStoreConfigAndJsonSerializedCache step

* Do minor cleanups

- Rename StartupWithCustomCacheHandle to Startup_WithCustomCacheHandle for better readability
- Remove cachemanager settings Action in Startup since it is not used anymore

* Drop Task in CreateHttpResponseMessage - unnecessary overhead

* Make setters private in CachedResponse

- Rework CreateCachedResponse to use new CachedResponse constructor
2017-11-25 14:47:17 +00:00
b0f928127e Merge pull request #31 from TomPallister/develop
mergecode
2017-11-25 21:23:27 +08:00
3b27bb376e Feature/fix #156 (#160)
* change config creator to not throw exception in there is an error......lord i hate this config creator code I need to sort it out.

* Remove method that we are not using anymore..

* throw exception and add errors to message

* train hacking and some refactoring

* bs test for code coverage

* actually return the errors in the exception
2017-11-24 21:10:03 +00:00
6289992faa added Ocelot bulder to try and make adding Ocelot configuration more … (#159)
* added Ocelot bulder to try and make adding Ocelot configuration more idiomatic

* renamed tests
2017-11-22 07:07:59 +00:00
fea88cc036 Update README.md 2017-11-20 13:47:32 +00:00
6c5c6495c0 Initial draft for the issue 147 fix (#155)
* Initial draft for the issue 147 fix

* Added unit tests for scenarios for getting and setting file configuration if the environment name is unavailable.
2017-11-20 12:41:45 +00:00
9ba57f8ba6 Make Ocelot not add forward slash to downstream url (#158)
* removed code where we add a trailing slash as this means if we request /1.txt/ instead of /1.txt then some servers will not return the resource at /1.txt. After reading up it seems if you dont have a trailing slash then its a file, if you do then its a resource

* test for 145

* removed unused code

* fix broken build..my bad
2017-11-19 21:01:54 +00:00
68242102d8 Feature/hacking consul file config (#157)
* moving things around to see if I can get consul to store fileconfiguration rather than ocelotconfiguration

* more refactoring to see if we can get a test for the feature

* acceptance test passing for updating in consul..need to sort object comparison out

* fixed the failing tests
2017-11-17 17:58:39 +00:00
d377482013 removed comment 2017-11-14 22:41:21 +00:00
9f27fe27a8 Merge pull request #149 from TomPallister/feature/fix-#142
Feature/fix #142
2017-11-13 20:46:38 +00:00
24c2ba10de found missing tests 2017-11-10 18:11:50 +00:00
88e51971c5 only get config once in a request...could make this its own middleware one day? 2017-11-10 18:07:08 +00:00
1d61e403ed changes to create load balancers and qos providers on first request to reroute and then check if they have changed on subsequent requests but not create again if they havent..quite a few breaking changes here. 2017-11-09 17:35:49 +00:00
b08837ea9d removed crap 2017-11-09 09:56:20 +00:00
93b4f2269a changed assertions for test to be more realistic 2017-11-09 09:07:54 +00:00
b64b06e069 getting acceptance tests working again 2017-11-09 09:02:41 +00:00
0bc39fca53 another test to make sure service provider config is craeted 2017-11-09 08:27:38 +00:00
bc1ba53f21 unit tests passing again 2017-11-09 08:19:36 +00:00