Skip to content

Commit

Permalink
Skip git repo download (#1171)
Browse files Browse the repository at this point in the history
  • Loading branch information
vish-cs authored Jan 3, 2025
1 parent af6f0e1 commit 3d024a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions import-automation/executor/app/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ class ExecutorConfig:
requirements_filename: str = 'requirements.txt'
# ID of the location where Cloud Scheduler is hosted.
scheduler_location: str = 'us-central1'
# Location of the local git data repo.
local_repo_dir: str = '/workspace/data'
# Maximum time a user script can run for in seconds.
user_script_timeout: float = 3600
# Arguments for the user script
Expand Down
1 change: 0 additions & 1 deletion import-automation/executor/app/executor/import_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ def _execute_imports_on_commit_helper(
with tempfile.TemporaryDirectory() as tmpdir:
repo_dir = self.github.download_repo(
tmpdir, commit_sha, self.config.repo_download_timeout)

logging.info(f'Downloaded repo: {repo_dir}')

imports_to_execute = import_target.find_imports_to_execute(
Expand Down
3 changes: 2 additions & 1 deletion import-automation/executor/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def scheduled_updates(absolute_import_name: str, import_config: str):
auth_access_token=config.github_auth_access_token),
config=config,
notifier=email_notifier.EmailNotifier(config.email_account,
config.email_token))
config.email_token),
local_repo_dir=config.local_repo_dir)
result = executor.execute_imports_on_update(absolute_import_name)
logging.info(result)
if result.status == 'failed':
Expand Down

0 comments on commit 3d024a2

Please sign in to comment.