Skip to content

Commit

Permalink
[td] 0.7.69 (mage-ai#1763)
Browse files Browse the repository at this point in the history
* [td] 0.7.69

* fix
  • Loading branch information
tommydangerous authored Jan 17, 2023
1 parent 9a97095 commit 61f273f
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ import BlockType, { BlockTypeEnum, BLOCK_TYPE_NAME_MAPPING } from '@interfaces/B
import Button from '@oracle/elements/Button';
import Checkbox from '@oracle/elements/Checkbox';
import FlexContainer from '@oracle/components/FlexContainer';
import KeyboardShortcutButton from '@oracle/elements/Button/KeyboardShortcutButton';
import Panel from '@oracle/components/Panel';
import PipelineType, { PipelineTypeEnum } from '@interfaces/PipelineType';
import Spacing from '@oracle/elements/Spacing';
import Text from '@oracle/elements/Text';
import TextInput from '@oracle/elements/Inputs/TextInput';
import { KEY_CODE_ENTER } from '@utils/hooks/keyboardShortcuts/constants';
import { LOCAL_STORAGE_KEY_AUTOMATICALLY_NAME_BLOCKS } from '@storage/constants';
import { get, set } from '@storage/localStorage';
import { onlyKeysPresent } from '@utils/hooks/keyboardShortcuts/utils';

type ConfigureBlockProps = {
block: BlockType;
Expand Down Expand Up @@ -93,15 +96,21 @@ function ConfigureBlock({

<Spacing mt={3}>
<FlexContainer>
<Button
<KeyboardShortcutButton
bold
inline
keyboardShortcutValidation={({
keyMapping,
}) => onlyKeysPresent([KEY_CODE_ENTER], keyMapping)}
onClick={() => onSave({
name: blockName || defaultName,
})}
primary
tabIndex={0}
uuid="ConfigureBlock/SaveAndAddBlock"
>
Save and add block
</Button>
</KeyboardShortcutButton>

<Spacing ml={1}>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export type KeyboardShortcutButtonProps = {
paddingBottom?: number;
paddingTop?: number;
pill?: boolean;
primary?: boolean;
primaryGradient?: boolean;
secondary?: boolean;
selected?: boolean;
Expand Down Expand Up @@ -143,6 +144,19 @@ const SHARED_STYLES = css<KeyboardShortcutButtonProps>`
justify-content: space-between;
`}
${props => props.primary && !props.disabled && `
background-color: ${(props.theme.interactive || dark.interactive).linkPrimary};
border-color: ${(props.theme.interactive || dark.interactive).linkPrimary};
color: ${(props.theme.monotone || dark.monotone).white};
&:hover,
&:focus,
&:active {
background-color: ${(props.theme.interactive || dark.interactive).linkPrimaryHover} !important;
border-color: ${(props.theme.interactive || dark.interactive).linkPrimary} !important;
}
`}
${props => props.center && `
justify-content: center;
`}
Expand Down Expand Up @@ -279,7 +293,7 @@ const SHARED_STYLES = css<KeyboardShortcutButtonProps>`
background-color: ${(props.theme.monotone || dark.monotone).black};
`}
${props => !props.inverted && !props.noBackground && `
${props => !props.inverted && !props.noBackground && !props.primary && `
background-color: ${(props.theme.interactive || dark.interactive).defaultBackground};
&:hover {
Expand Down
2 changes: 1 addition & 1 deletion mage_ai/server/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# Dockerfile depends on it because it runs ./scripts/install_mage.sh and uses
# the last line to determine the version to install.
VERSION = \
'0.7.68'
'0.7.69'
14 changes: 11 additions & 3 deletions mage_ai/services/stitch/stitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,22 @@ def start_replication_job(
if current_count >= total_loads_count:
break

if len(succeeded_streams) == len(stream_names):
total_streams = len(stream_names)
completed_streams = len(succeeded_streams)

if completed_streams == total_streams:
print(f'Finish loading data for all streams: {succeeded_streams}.')
break
else:
percent_complete = round(
100 * (completed_streams / total_streams),
2,
) if total_streams else 0
running_streams = [s for s in stream_names if s not in succeeded_streams]
print(
f'Polling Stitch load status for source {source_id}. Completed streams: '
f'{succeeded_streams}. Running streams: {running_streams}.'
f'Polling Stitch load status for source {source_id}: {percent_complete}% ({completed_streams}/{total_streams}). '
f'Completed streams: {succeeded_streams}. '
f'Running streams: {running_streams}.'
)
if (
poll_timeout
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def readme():
name='mage-ai',
# NOTE: when you change this, change the value of VERSION in the following file:
# mage_ai/server/constants.py
version='0.7.68',
version='0.7.69',
author='Mage',
author_email='eng@mage.ai',
description='Mage is a tool for building and deploying data pipelines.',
Expand Down

0 comments on commit 61f273f

Please sign in to comment.