-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
API server error when run from docker #985
Comments
Hi, Also maybe the rest API should not be started unless we call it with a flag ... @na-- what do you think ? |
If we started from scratch, I'd say that we probably should start the REST API server only when users request it. But since it has been enabled by default for quite some time, and since it binds to What I'd like to fix though is to be able to actually disable the API server. Currently, I don't think there's a way to do that... |
I would argue that given that:
|
It's currently easy to generate panics with it because of bugs and shitty code... It hopefully won't be when I'm done with the current massive refactoring 😄
Any changes that remove dependencies by causing backward incompatibilities are probably not what we want 😉 Regarding the usage, we don't have any data, but you're probably right, likely not a ton of people use the REST API. Still, I stand by my earlier claim that it's probably better to err on the side of caution and leave it as it is, as much as possible. True, the new schedulers (including arrival-rate) will force us to make some backwards incompatible changes, but a lot of the current API functionality will still work. Most if it, if you run k6 with And it's not just the REST API directly. Probably the biggest consumer of the API is the k6 binary itself. There are a lot of k6 sub-commands which internally use the same API. Here's a list (subset of
All of them will mostly continue to work with |
Not certain if anyone uses this commands as well ... like .. those are IMO not useful in MOST cases ... maybe status/stats and even them ... ? And even that ... why would most people use it to implement #140 I would think. And yes I think that we should think about how people use our tool and shape it in a way, including breaking or removing things that we think are bad idea. Secondly I would've liked around #911 to change the PUT/POST methods because currently they are AWFUL to use, as well as everything else but the post/put are specifically curl unfriendly for no reason. We can obviously keep the commands compatible after the changes :) and if someone uses the golang api calls they will just need to update k6. Not that I think anyone does this. Don't get me wrong I still think nobody uses those as they probably would've asked why the api looks like this :) I would argue that the commands above should have never existed as I don't see their point without #140 and as that in particular will probably add a totally different API as it will be needed (probably GRPC instead of REST one but still). Of course I suppose the command exist because calling the API with Being backwards compatible is important and I am very much against changing things that will break script computability like change to Maybe the solution is to deprecate everything API related next release and remove/replace it in a future release. With a lot of warnings that point out that the API in it's current form won't be supported or will be severely changed. |
I agree that the current API doesn't look very good. IIRC, the strange data format stems from the fact that the JSONAPI library was used. I don't know why that decision was taken, it was before I started working on k6, and I haven't looked very much into the pros and cons of it. Still, in my mind, this is a minor and very isolated issue that doesn't deserve for us to spend too much time focusing on it. And we've basically hijacked a very unrelated issue to discuss it at great length already 😉 And you've further shifted the discussion from "should we start the API server by default" to "what the API should look like"... For the record, I'm not necessarily opposed to making backwards compatibility breaks, but we should do it only where it makes sense to do so. With the new schedulers, there will be breaking changes in both the API (unless Apparently, with regards to changing the API format or disabling the API server by default, my cost-benefit analysis is different from yours - to me, it's not worth it to do a breaking change. We won't gain all that much, and even if few people use them, they're likely power users. So if in my mind, something like this looks like the correct way to handle things:
|
It seems like more of a docker issue rather than the k6. I've checked with the latest available |
Similar issue to #505, however this is not Docker on Mac, rather Docker running on a CentOS 7 Linux server.
I will note however, it appears everything works right??
The issue:
example file from above (k6_google.js)
docker version:
host info
k6 image info
The text was updated successfully, but these errors were encountered: