fix: wrap flux validation (#18321)

pull/18335/head
Alex Boatwright 2020-06-02 09:08:34 -07:00 committed by GitHub
parent f159b866e3
commit 25b73be687
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 8 deletions

View File

@ -24,6 +24,7 @@ import {
// Utils
import {getActiveTimeMachine, getActiveQuery} from 'src/timeMachine/selectors'
import fromFlux from 'src/shared/utils/fromFlux'
import {isFlagEnabled} from 'src/shared/utils/featureFlag'
import {getAllVariables, asAssignment} from 'src/variables/selectors'
import {buildVarsOption} from 'src/variables/utils/buildVarsOption'
import {findNodes} from 'src/shared/utils/ast'
@ -181,10 +182,12 @@ export const executeQueries = () => async (dispatch, getState: GetState) => {
dispatch(notify(resultTooLarge(result.bytesRead)))
}
// TODO: this is just here for validation. since we are already eating
// the cost of parsing the results, we should store the output instead
// of the raw input
fromFlux(result.csv)
if (isFlagEnabled('fluxParser')) {
// TODO: this is just here for validation. since we are already eating
// the cost of parsing the results, we should store the output instead
// of the raw input
fromFlux(result.csv)
}
}
const files = (results as RunQuerySuccessResult[]).map(r => r.csv)
@ -249,10 +252,12 @@ export const executeCheckQuery = () => async (dispatch, getState: GetState) => {
dispatch(notify(resultTooLarge(result.bytesRead)))
}
// TODO: this is just here for validation. since we are already eating
// the cost of parsing the results, we should store the output instead
// of the raw input
fromFlux(result.csv)
if (isFlagEnabled('fluxParser')) {
// TODO: this is just here for validation. since we are already eating
// the cost of parsing the results, we should store the output instead
// of the raw input
fromFlux(result.csv)
}
const file = result.csv