Skip to content

Commit

Permalink
all remove old compute log
Browse files Browse the repository at this point in the history
  • Loading branch information
prha committed Aug 2, 2024
1 parent 7226922 commit ff27618
Show file tree
Hide file tree
Showing 39 changed files with 169 additions and 1,367 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Depending on your organization's needs, you may want to retain these logs in you

## Modifying compute log storage

Dagster's compute logs are handled by the configured [`ComputeLogManager`](/\_apidocs/internals#dagster.\_core.storage.compute_log_manager.ComputeLogManager). By default, Dagster+ utilizes the `CloudComputeLogManager` which stores logs in a Dagster+-managed Amazon S3 bucket, but you can customize this behavior to store logs in a destination of your choice.
Dagster's compute logs are handled by the configured [`CapturedLogManager`](/\_apidocs/internals#dagster.\_core.storage.captured_log_manager.CapturedLogManager). By default, Dagster+ utilizes the `CloudComputeLogManager` which stores logs in a Dagster+-managed Amazon S3 bucket, but you can customize this behavior to store logs in a destination of your choice.

### Writing to your own S3 bucket

Expand Down
4 changes: 0 additions & 4 deletions docs/sphinx/sections/api/apidocs/internals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,6 @@ Compute log manager

.. autoclass:: CapturedLogManager

.. currentmodule:: dagster._core.storage.compute_log_manager

.. autoclass:: ComputeLogManager

.. currentmodule:: dagster._core.storage.local_compute_log_manager

.. autoclass:: LocalComputeLogManager
Expand Down

This file was deleted.

111 changes: 0 additions & 111 deletions js_modules/dagster-ui/packages/ui-core/src/runs/ComputeLogPanel.tsx

This file was deleted.

12 changes: 1 addition & 11 deletions js_modules/dagster-ui/packages/ui-core/src/runs/Run.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {memo} from 'react';
import styled from 'styled-components';

import {CapturedOrExternalLogPanel} from './CapturedLogPanel';
import {ComputeLogPanel} from './ComputeLogPanel';
import {LogFilter, LogsProvider, LogsProviderLogs} from './LogsProvider';
import {LogsScrollingTable} from './LogsScrollingTable';
import {LogType, LogsToolbar} from './LogsToolbar';
Expand All @@ -38,7 +37,6 @@ import {RunStatus} from '../graphql/types';
import {useDocumentTitle} from '../hooks/useDocumentTitle';
import {useFavicon} from '../hooks/useFavicon';
import {useQueryPersistedState} from '../hooks/useQueryPersistedState';
import {useSupportsCapturedLogs} from '../instance/useSupportsCapturedLogs';
import {CompletionType, useTraceDependency} from '../performance/TraceContext';

interface RunProps {
Expand Down Expand Up @@ -210,7 +208,6 @@ const RunWithData = ({
: [];
}, [runtimeGraph, selectionQuery]);

const supportsCapturedLogs = useSupportsCapturedLogs();
const {logCaptureInfo, computeLogFileKey, setComputeLogFileKey} =
useComputeLogFileKeyForSelection({
stepKeys,
Expand Down Expand Up @@ -369,20 +366,13 @@ const RunWithData = ({
{logType !== LogType.structured ? (
!computeLogFileKey ? (
<NoStepSelectionState type={logType} />
) : supportsCapturedLogs ? (
) : (
<CapturedOrExternalLogPanel
logKey={computeLogFileKey ? [runId, 'compute_logs', computeLogFileKey] : []}
logCaptureInfo={logCaptureInfo}
visibleIOType={LogType[logType]}
onSetDownloadUrl={setComputeLogUrl}
/>
) : (
<ComputeLogPanel
runId={runId}
computeLogFileKey={stepKeys.length ? computeLogFileKey : undefined}
ioType={LogType[logType]}
setComputeLogUrl={setComputeLogUrl}
/>
)
) : (
<LogsScrollingTable
Expand Down
24 changes: 6 additions & 18 deletions js_modules/dagster-ui/packages/ui-core/src/runs/StepLogsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {Link} from 'react-router-dom';
import styled from 'styled-components';

import {CapturedOrExternalLogPanel} from './CapturedLogPanel';
import {ComputeLogPanel} from './ComputeLogPanel';
import {DefaultLogLevels} from './LogLevel';
import {LogFilter, LogsProvider, LogsProviderLogs} from './LogsProvider';
import {LogsScrollingTable} from './LogsScrollingTable';
Expand All @@ -23,7 +22,6 @@ import {IRunMetadataDict, RunMetadataProvider} from './RunMetadataProvider';
import {titleForRun} from './RunUtils';
import {useComputeLogFileKeyForSelection} from './useComputeLogFileKeyForSelection';
import {DagsterEventType} from '../graphql/types';
import {useSupportsCapturedLogs} from '../instance/useSupportsCapturedLogs';

export function useStepLogs({runId, stepKeys}: {runId?: string; stepKeys?: string[]}) {
const [showingLogs, setShowingLogs] = React.useState<{runId: string; stepKeys: string[]} | null>(
Expand Down Expand Up @@ -112,7 +110,6 @@ export const StepLogsModalContent = ({
metadata: IRunMetadataDict;
logs: LogsProviderLogs;
}) => {
const supportsCapturedLogs = useSupportsCapturedLogs();
const [logType, setComputeLogType] = useState<LogType>(LogType.structured);
const [computeLogUrl, setComputeLogUrl] = React.useState<string | null>(null);

Expand Down Expand Up @@ -166,21 +163,12 @@ export const StepLogsModalContent = ({
</LogsToolbar>

{logType !== LogType.structured ? (
supportsCapturedLogs ? (
<CapturedOrExternalLogPanel
logKey={computeLogFileKey ? [runId, 'compute_logs', computeLogFileKey] : []}
logCaptureInfo={logCaptureInfo}
visibleIOType={LogType[logType]}
onSetDownloadUrl={setComputeLogUrl}
/>
) : (
<ComputeLogPanel
runId={runId}
computeLogFileKey={computeLogFileKey}
ioType={LogType[logType]}
setComputeLogUrl={setComputeLogUrl}
/>
)
<CapturedOrExternalLogPanel
logKey={computeLogFileKey ? [runId, 'compute_logs', computeLogFileKey] : []}
logCaptureInfo={logCaptureInfo}
visibleIOType={LogType[logType]}
onSetDownloadUrl={setComputeLogUrl}
/>
) : (
<LogsScrollingTable
logs={logs}
Expand Down
117 changes: 0 additions & 117 deletions js_modules/dagster-ui/packages/ui-core/src/runs/useComputeLogs.tsx

This file was deleted.

Loading

0 comments on commit ff27618

Please sign in to comment.