Skip to content

Commit

Permalink
Merge pull request #2719 from PrefectHQ/remove-nested-task-runs-featu…
Browse files Browse the repository at this point in the history
…re-flag

Remove feature flag for nested task runs
  • Loading branch information
pleek91 authored Sep 10, 2024
2 parents 2c4e68a + 7eae86d commit cdfa7ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/components/FlowRunGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import { useColorTheme } from '@prefecthq/prefect-design'
import { computed, ref } from 'vue'
import FlowRunGraphConfirmation from '@/components/FlowRunGraphConfirmation.vue'
import { useCan } from '@/compositions'
import { useTaskRunsCount } from '@/compositions/useTaskRunsCount'
import { useWorkspaceApi } from '@/compositions/useWorkspaceApi'
import { FlowRun } from '@/models/FlowRun'
Expand All @@ -46,7 +45,6 @@
}>()
const api = useWorkspaceApi()
const can = useCan()
const { value: colorThemeValue } = useColorTheme()
const load = ref(true)
Expand Down Expand Up @@ -108,7 +106,7 @@
const config = computed<RunGraphConfig>(() => ({
runId: props.flowRun.id,
fetch: (id) => {
return api.flowRuns.getFlowRunsGraph(id, Boolean(can.access.nestedTaskRunGraphs))
return api.flowRuns.getFlowRunsGraph(id, { nestedTaskRunGraphs: true })
},
fetchEvents: props.fetchEvents,
styles: {
Expand Down
6 changes: 5 additions & 1 deletion src/services/WorkspaceFlowRunsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import { WorkspaceApi } from '@/services/WorkspaceApi'
import { Schema, SchemaValues } from '@/types/schemas'
import { toMap } from '@/utilities'

type GetFlowRunGraphOptions = {
nestedTaskRunGraphs: boolean,
}

export class WorkspaceFlowRunsApi extends WorkspaceApi {

protected override routePrefix = '/flow_runs'
Expand Down Expand Up @@ -77,7 +81,7 @@ export class WorkspaceFlowRunsApi extends WorkspaceApi {
return data
}

public async getFlowRunsGraph(id: string, nestedTaskRunGraphs: boolean): Promise<RunGraphData> {
public async getFlowRunsGraph(id: string, { nestedTaskRunGraphs }: GetFlowRunGraphOptions): Promise<RunGraphData> {
const { data: graph } = await this.get<RunGraphDataResponse>(`/${id}/graph-v2`)

return mapper.map('RunGraphDataResponse', { graph, nestedTaskRunGraphs }, 'RunGraphData')
Expand Down
5 changes: 1 addition & 4 deletions src/services/can.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { InjectionKey, ref } from 'vue'
import { MaybeRef } from '@/types/reactivity'

export const workspaceFeatureFlags = [
'access:deploymentScheduleFlowRunInfraOverrides',
'access:nestedTaskRunGraphs',
] as const satisfies Readonly<`access:${string}`[]>
export const workspaceFeatureFlags = ['access:deploymentScheduleFlowRunInfraOverrides'] as const satisfies Readonly<`access:${string}`[]>

export type WorkspaceFeatureFlag = typeof workspaceFeatureFlags[number]

Expand Down

0 comments on commit cdfa7ca

Please sign in to comment.