Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mage-ai/mage-ai
Browse files Browse the repository at this point in the history
  • Loading branch information
tommydangerous committed Jan 24, 2023
2 parents 671b992 + ab1dc19 commit bf33319
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ def update_model_settings(

settings = load_sources(block)

print('WTFFFFFFFFFFFFFF', new_source)
if settings:
source = find(lambda x: x['name'] == source_name, settings.get('sources', []))
if source:
Expand Down
12 changes: 10 additions & 2 deletions mage_ai/data_preparation/models/block/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _execute_block(
lines_in_file = 0

with open(source_output_file_path, 'w') as f:
proc = subprocess.Popen([
args = [
PYTHON_COMMAND,
self.pipeline.source_file_path,
'--config_json',
Expand All @@ -104,7 +104,15 @@ def _execute_block(
source_state_file_path,
'--query_json',
json.dumps(query_data),
], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
]

if len(selected_streams) >= 1:
args += [
'--selected_streams_json',
json.dumps(selected_streams),
]

proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

for line in proc.stdout:
f.write(line.decode())
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.74'
'0.7.75'
7 changes: 7 additions & 0 deletions mage_integrations/mage_integrations/sources/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ def process(self) -> None:
if stream.tap_stream_id in updated_streams:
stream.update_schema(updated_streams[stream.tap_stream_id][0])
catalog = self.catalog

if self.selected_streams:
catalog.streams = list(filter(
lambda x: x.tap_stream_id in self.selected_streams,
catalog.streams,
))

self.sync(catalog)
except Exception as err:
message = f'{self.__class__.__name__} process failed with error {str(err)}.'
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.74',
version='0.7.75',
author='Mage',
author_email='eng@mage.ai',
description='Mage is a tool for building and deploying data pipelines.',
Expand Down

0 comments on commit bf33319

Please sign in to comment.