Influxdb: remove `/sources` endpoint from the API

Created on 24 Oct 2019  路  8Comments  路  Source: influxdata/influxdb

this endpoint is not used and should be removed from the api and swagger.

also, connect https://github.com/influxdata/influxdb/issues/13325

areapi teaapi

All 8 comments

I would like to take a look at this.

I did a search for '/sources' and I see that there are a few paths containing '/source' and I wanted to be clear on which to remove. It looks like the endpoints are:

  • /sources
  • /chronograph/v1/sources
  • /api/v2/sources

The last two look like they occur the most and there is some code that looks like they are still being used. The first looks like it is mostly removed already and there are just some tests and swagger to clean up referring to it.

hey @nwneisen I think the best place to start would be to remove source.go and follow the trail of what breaks from there. If you have any additional questions, be sure to let me know. Happy to help however I can.

@desa Thanks for the guidance. I will do that. I will comment here if I run into other issues otherwise I will hopefully have a PR soon.

@desa I removed source.go and fixed any code that broke as a result. I was surprised at some of the tests that are still passing. It looks like /chronograf/v1/sources is still being used in a number of places.

@nwneisen are they all in the chronograf directory?

@desa Mostly. There are 21 files and all but 3 are in the chronograf directory. Most of those are within chronograf/server. An example of one is chronograf/server/annotations.go in the newAnnotationResponse() method.

I think everything within the chronograf directory is dead code, so I wouldn't worry about it too much. I'd go ahead and remove things if they're anywhere else in the application though :)

I had found some big comment blocks and wondered what was up. :grinning:

I'll remove any additional endpoints that point to /chronograf/v1/sources/* in http/chronograf_handler.go and then switch my PR to be ready for review.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ricco24 picture ricco24  路  3Comments

shilpapadgaonkar picture shilpapadgaonkar  路  3Comments

affo picture affo  路  3Comments

udf2457 picture udf2457  路  3Comments

jonira picture jonira  路  4Comments