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

Run action menu displays run metric based on graphql field instead of tag #24664

Merged
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
20 changes: 10 additions & 10 deletions js_modules/dagster-ui/packages/ui-core/client.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {DeletionDialog} from './DeletionDialog';
import {ReexecutionDialog} from './ReexecutionDialog';
import {RunConfigDialog} from './RunConfigDialog';
import {doneStatuses, failedStatuses} from './RunStatuses';
import {DagsterTag} from './RunTag';
import {RunTags} from './RunTags';
import {RunsQueryRefetchContext} from './RunUtils';
import {RunFilterToken} from './RunsFilterInput';
Expand Down Expand Up @@ -92,8 +91,7 @@ export const RunActionsMenu = React.memo(({run, onAddTag, anchorLabel}: Props) =
const pipelineRun =
data?.pipelineRunOrError?.__typename === 'Run' ? data?.pipelineRunOrError : null;
const runConfigYaml = pipelineRun?.runConfigYaml;
const runMetricsEnabled = run.tags.some((t) => t.key === DagsterTag.RunMetrics);
mlarose marked this conversation as resolved.
Show resolved Hide resolved

const runMetricsEnabled = run.hasRunMetricsEnabled;
const repoMatch = useRepositoryForRunWithParentSnapshot(pipelineRun);
const jobError = useJobAvailabilityErrorForRun({
...run,
Expand Down Expand Up @@ -518,6 +516,7 @@ export const RUN_ACTIONS_MENU_RUN_FRAGMENT = gql`
repositoryName
repositoryLocationName
}
hasRunMetricsEnabled
Copy link
Member

Choose a reason for hiding this comment

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

uber nit, one could call this just 'runMetricsEnabled' ('has' and 'enabled' are arguably redundant)

}
`;

Expand All @@ -537,6 +536,7 @@ export const PIPELINE_ENVIRONMENT_QUERY = gql`
repositoryName
repositoryLocationName
}
hasRunMetricsEnabled
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const RUN_FRAGMENT = gql`
hasReExecutePermission
hasTerminatePermission
hasDeletePermission
hasRunMetricsEnabled
status
mode
tags {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {DeletionDialog} from './DeletionDialog';
import {QueuedRunCriteriaDialog} from './QueuedRunCriteriaDialog';
import {RunConfigDialog} from './RunConfigDialog';
import {doneStatuses} from './RunStatuses';
import {DagsterTag} from './RunTag';
import {RunsQueryRefetchContext} from './RunUtils';
import {TerminationDialog} from './TerminationDialog';
import {RunFragment} from './types/RunFragments.types';
Expand Down Expand Up @@ -35,7 +34,7 @@ type VisibleDialog =

export const RunHeaderActions = ({run, isJob}: {run: RunFragment; isJob: boolean}) => {
const {runConfigYaml} = run;
const runMetricsEnabled = run.tags.some((t) => t.key === DagsterTag.RunMetrics);
mlarose marked this conversation as resolved.
Show resolved Hide resolved
const runMetricsEnabled = run.hasRunMetricsEnabled;

const [visibleDialog, setVisibleDialog] = useState<VisibleDialog>(null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const RUN_TABLE_RUN_FRAGMENT = gql`
hasReExecutePermission
hasTerminatePermission
hasDeletePermission
hasRunMetricsEnabled
mode
rootRunId
parentRunId
Expand Down
1 change: 0 additions & 1 deletion js_modules/dagster-ui/packages/ui-core/src/runs/RunTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export enum DagsterTag {
SnapshotID = 'dagster/snapshot_id', // This only exists on the client, not the server.
ReportingUser = 'dagster/reporting_user',
User = 'user',
RunMetrics = 'dagster/run_metrics',

// Hidden tags (using ".dagster" HIDDEN_TAG_PREFIX)
RepositoryLabelTag = '.dagster/repository',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const buildRunActionsMenuFragment = ({hasReExecutePermission}: RunConfigI
canTerminate: true,
hasDeletePermission: true,
hasReExecutePermission,
hasRunMetricsEnabled: true,
hasTerminatePermission: true,
mode: 'default',
rootRunId: 'abcdef12',
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.