diff --git a/http/influxdb/source_proxy_query_service.go b/http/influxdb/source_proxy_query_service.go index 6f7621728b..6269d6ad62 100644 --- a/http/influxdb/source_proxy_query_service.go +++ b/http/influxdb/source_proxy_query_service.go @@ -37,10 +37,6 @@ func (s *SourceProxyQueryService) Query(ctx context.Context, w io.Writer, req *q } func (s *SourceProxyQueryService) fluxQuery(ctx context.Context, w io.Writer, req *query.ProxyRequest) (int64, error) { - if len(s.FluxURL) == 0 { - return 0, fmt.Errorf("fluxURL from source cannot be empty if the compiler type is flux") - } - request := struct { Spec *flux.Spec `json:"spec"` Query string `json:"query"` @@ -70,7 +66,7 @@ func (s *SourceProxyQueryService) fluxQuery(ctx context.Context, w io.Writer, re } } - u, err := newURL(s.FluxURL, "/query") + u, err := newURL(s.URL, "/api/v2/query") if err != nil { return 0, err } diff --git a/http/swagger.yml b/http/swagger.yml index 68a793e591..0f4ec24797 100644 --- a/http/swagger.yml +++ b/http/swagger.yml @@ -4665,9 +4665,6 @@ components: format: uri defaultRP: type: string - fluxURL: - type: string - format: uri languages: type: array readOnly: true diff --git a/source.go b/source.go index 60a81032cc..caac708d64 100644 --- a/source.go +++ b/source.go @@ -42,7 +42,6 @@ type V1SourceFields struct { SharedSecret string `json:"sharedSecret,omitempty"` // ShareSecret is the optional signing secret for Influx JWT authorization MetaURL string `json:"metaUrl,omitempty"` // MetaURL is the url for the meta node DefaultRP string `json:"defaultRP"` // DefaultRP is the default retention policy used in database queries to this source - FluxURL string `json:"fluxURL,omitempty"` // FluxURL is the url for a flux connected to a 1x source } // SourceFields is used to authorize against an influx 2.0 source. @@ -78,7 +77,6 @@ type SourceUpdate struct { Password *string `json:"password,omitempty"` SharedSecret *string `json:"sharedSecret,omitempty"` MetaURL *string `json:"metaURL,omitempty"` - FluxURL *string `json:"fluxURL,omitempty"` Role *string `json:"role,omitempty"` DefaultRP *string `json:"defaultRP"` } @@ -115,9 +113,6 @@ func (u SourceUpdate) Apply(s *Source) error { if u.MetaURL != nil { s.MetaURL = *u.MetaURL } - if u.FluxURL != nil { - s.FluxURL = *u.FluxURL - } if u.DefaultRP != nil { s.DefaultRP = *u.DefaultRP } diff --git a/source/query.go b/source/query.go index 5d7a6aa33b..7f8dbf323c 100644 --- a/source/query.go +++ b/source/query.go @@ -26,11 +26,7 @@ func NewQueryService(s *platform.Source) (query.ProxyQueryService, error) { SourceFields: s.SourceFields, }, nil case platform.V1SourceType: - // This can be an influxdb or an influxdb + fluxd. - // If it is an influxdb alone it is just a source configured with the url of an influxdb - // and will only accept "influxql" compilers, if it has a fluxd it will also accept "flux" compilers. - // If the compiler used is "influxql" the proxy request will be made on the platform.URL directly. - // If the compiler used is "flux" the proxy request will be made on the platform.V1SourceFields.FluxURL + // This is an InfluxDB 1.7 source, which supports both InfluxQL and Flux queries return &influxdb.SourceProxyQueryService{ InsecureSkipVerify: s.InsecureSkipVerify, URL: s.URL,