Skip to content
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

chore: remove feature flag influxqlUI #6809

Merged
merged 4 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions cypress/e2e/cloud/scriptQueryBuilder.influxql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ describe('Script Builder', () => {
})

beforeEach(() => {
cy.scriptsLoginWithFlags({
influxqlUI: true,
}).then(() => {
cy.scriptsLoginWithFlags({}).then(() => {
cy.clearInfluxQLScriptSession()
cy.getByTestID('editor-sync--toggle')
cy.getByTestID('influxql-editor', {timeout: DELAY_FOR_LAZY_LOAD_EDITOR})
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,8 @@ const setScriptToLanguage = (
) => {
return cy.isIoxOrg().then(isIox => {
if (lang === 'influxql') {
// give cypress some time to turn on the feature flag `influxqlUI`
// this block can be removed after this feature flag is removed
// give cypress some time to set up
// database and retention policy (DBRP) mappings
cy.wait(1000)
}

Expand Down
8 changes: 6 additions & 2 deletions src/dataExplorer/components/SaveAsScript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {QueryContext} from 'src/shared/contexts/query'
import {ResultsContext} from 'src/dataExplorer/context/results'
import {PersistenceContext} from 'src/dataExplorer/context/persistence'
import {ResultsViewContext} from 'src/dataExplorer/context/resultsView'
import {DBRPContext} from 'src/shared/contexts/dbrps'

// Types
import {RemoteDataState} from 'src/types'
Expand All @@ -45,7 +46,6 @@ import {
copyToClipboardFailed,
copyToClipboardSuccess,
} from 'src/shared/copy/notifications'
import {isFlagEnabled} from 'src/shared/utils/featureFlag'

import './SaveAsScript.scss'

Expand All @@ -62,6 +62,7 @@ const SaveAsScript: FC<Props> = ({language, onClose, setOverlayType, type}) => {
const {hasChanged, resource, setResource, save} =
useContext(PersistenceContext)
const isIoxOrg = useSelector(isOrgIOx)
const {hasDBRPs} = useContext(DBRPContext)
const {cancel} = useContext(QueryContext)
const {setStatus, setResult} = useContext(ResultsContext)
const {clear: clearViewOptions} = useContext(ResultsViewContext)
Expand Down Expand Up @@ -111,7 +112,10 @@ const SaveAsScript: FC<Props> = ({language, onClose, setOverlayType, type}) => {
setResult(null)
clearViewOptions()

if (isIoxOrg || isFlagEnabled('influxqlUI')) {
// InfluxQL works on both IOx and TSM, so if an account has
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also work in OSS, correct? The only different thing I could think of doing differently here is if we need a CLOUD check.

Copy link
Contributor Author

@appletreeisyellow appletreeisyellow Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InfluxQL will not show up in OSS because of this line, so OSS users will never need to save an InfluxQL script, so no need CLOUD here 👍

// any database and retention policy (DBRP) mappings, the url
// should include the parameter `language={}`
if (isIoxOrg || hasDBRPs()) {
history.replace(
`/orgs/${org.id}/data-explorer/from/script?language=${language}&${SCRIPT_EDITOR_PARAMS}`
)
Expand Down
6 changes: 3 additions & 3 deletions src/dataExplorer/components/ScriptQueryBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const ScriptQueryBuilder: FC = () => {
{option}
</Dropdown.Item>
))}
{isFlagEnabled('influxqlUI') && hasDBRPs() ? (
{hasDBRPs() ? (
<Dropdown.Item
className={`script-dropdown__${LanguageType.INFLUXQL}`}
key={LanguageType.INFLUXQL}
Expand All @@ -168,7 +168,7 @@ const ScriptQueryBuilder: FC = () => {
{option}
</Dropdown.Item>
))}
{isFlagEnabled('influxqlUI') && hasDBRPs() ? (
{hasDBRPs() ? (
<Dropdown.Item
className={`script-dropdown__${LanguageType.INFLUXQL}`}
key={LanguageType.INFLUXQL}
Expand Down Expand Up @@ -196,7 +196,7 @@ const ScriptQueryBuilder: FC = () => {
)

const tsmNewScriptDropDown =
isFlagEnabled('influxqlUI') && hasDBRPs() && CLOUD ? (
hasDBRPs() && CLOUD ? (
<Dropdown
menu={menuTSM}
button={button}
Expand Down
Loading