zalando / innkeeper Goto Github PK
View Code? Open in Web Editor NEWSimple route management API for Skipper
License: Other
Simple route management API for Skipper
License: Other
We should be able to use eskip to list routes using curl.
Check how skipper defines the method matcher/predicate.
Figure out if it makes sense to do the following:
Right now the value is hardcoded to pathfinder. Should be configured to include pathfinder and the 24/7 team
Admin authorization should allow to specify the team for a path
Right now we use full strings. We should use JsonPath instead.
Scala 2.11.8 was released: http://www.scala-lang.org/news/2.11.8/
Upgrade the other libraries also.
Split the Routes file in many files
The akka-http-client has a bug. Consider replacing the http-client, in case it's not possible to solve this issue.
See the related akka bug:
akka/akka#20004
Should we keep them immutable like routes?
Consider a log for audit
Change the format of the payload:
{
name: ...
eskip: ... (optional - not needed for delete)
timestamp: ...
type: update | create | delete
}
Update the swagger spec.
One idea would be to use the database time.
Consider using the gatling framework
Twintip crawls for API definitions for applications registered at Kio. Please make the Innkeeper API definition available via twintip.
As a routes admin,
I'd like to be able to delete all of the routes (mark all routes as deleted)
So that I can start a new routes table
Analyze the tests and see if there are other things to change.
We should be able to delete paths
Write acceptance tests to be sure that an user from a team not owning a path is not able to create/delete a route for that path.
This acceptance tests should pass.
val token = ADMIN_TOKEN
it("should give a bad request for duplicate name") {
val routeName = "route_1"
val response = postRoute(routeName, token, token.teamName + "-some-other-team")
response.status should be(StatusCodes.OK)
val entity = entityString(response)
val route = entity.parseJson.convertTo[RouteOut]
route.id should be(1)
route.name should be(RouteName(routeName))
route.createdBy should be(UserName(token.userName))
routeFiltersShouldBeCorrect(route)
routePredicatesShouldBeCorrect(route)
val response1 = postRouteToSlashRoutes(routeName, route.pathId, token)
response1.status should be(StatusCodes.BadRequest)
entityString(response1).parseJson.convertTo[Error].errorType should be("DRN")
}
Right now we get an internal server error
Skipper doesn't care about all of the routes, but only about the current ones. Create an endpoint where skipper can get the current state of the routes.
The /current-routes
resource, has the route name as an id
.
Configure innkeeper to have an auto-scaling group with 2 instances
Make the callJson method do unmarshalling as well.
It could be httpClient.callJson[Seq[Team]](...)
Make sure that travis still works
Use Makefile at top level
The path the route is created for should belong to the users team.
Also, as party of this task, owned by team needs to be removed from route. Routes belong to a path that is already assigned to a team.
Consider the RoutesServiceSpec
class
Make sure the internal innkeeper files for deploy are up to date.
When the route is deleted only DELETED_AT is set, but DELETED_BY is never set.
As a routes admin,
I'd like to be able to see and remove the oldly deleted routes from the database
So that I keep the routes database clean
Skipper already supports it as a filter.
Make sure that we don't return the disabled routes to skipper.
Skipper supports predicate arguments of different types. Currently in innkeeper there is no way to distinguish between them. May be we should introduce type of the argument in addition to it's value.
In another large scala project, we decided have the config explicitly typed and containing functions. Something like
trait EnvConfig {
def getOauthScopeRead: Set[String]
}
The idea is to avoid runtime failures just because someone has a typo in a key string. Also makes it very easy (and compile time checked) which configs are no longer used. Internally you still load them with config.getString(...)
but the actual string is used just once in the whole code base inside of the private EnvConfig implementation. Every usage of that config value is via explicit, named function calls as outlined above.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.