Fix looker missing git execution on container image (#13457)

* - Add git execution to ingestion Dockerfile
- [Looker] Update missing function

* Fix pylint

* Add git execution to Dockerfile

* Remove log

---------

Co-authored-by: Loc Nguyen <loc.nguyenhuu@xendit.co>
This commit is contained in:
Nguyen Huu Loc 2023-10-06 11:51:07 +07:00 committed by GitHub
parent 859a594429
commit 7ff6738527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 1 deletions

View File

@ -33,6 +33,7 @@ RUN apt-get -qq update \
unixodbc \
unixodbc-dev \
unzip \
git \
wget --no-install-recommends \
# Accept MSSQL ODBC License
&& ACCEPT_EULA=Y apt-get install -y msodbcsql18 \

View File

@ -33,6 +33,7 @@ RUN apt-get -qq update \
unixodbc-dev \
unzip \
vim \
git \
wget --no-install-recommends \
# Accept MSSQL ODBC License
&& ACCEPT_EULA=Y apt-get -qq install -y msodbcsql18 \

View File

@ -33,6 +33,7 @@ RUN apt-get -qq update \
unixodbc \
unixodbc-dev \
unzip \
git \
wget --no-install-recommends \
# Accept MSSQL ODBC License
&& ACCEPT_EULA=Y apt-get -qq install -y msodbcsql18 \

View File

@ -34,6 +34,7 @@ RUN apt-get -qq update \
unixodbc-dev \
unzip \
vim \
git \
wget --no-install-recommends \
# Accept MSSQL ODBC License
&& ACCEPT_EULA=Y apt-get -qq install -y msodbcsql18 \

View File

@ -112,7 +112,6 @@ class BulkLkmlParser(metaclass=Singleton):
if cached_view:
return cached_view
logger.warning(f"BulkLkmlParser::find_view: can't find view {view_name}")
return None
def __repr__(self):

View File

@ -11,6 +11,7 @@
"""
Local Reader
"""
import os
import traceback
from pathlib import Path
from typing import List, Optional, Union
@ -60,3 +61,20 @@ class LocalReader(Reader):
str(path).replace(str(self.base_path) + "/", "")
for path in Path(self.base_path).rglob("*")
]
def get_local_files(
self, search_key: str, excluded_files: Optional[List[str]] = None
) -> List[str]:
"""Scan through local path recursively
and retuns file path based on `search_key`"""
if excluded_files is None:
excluded_files = []
file_paths = []
for root, _, file in os.walk(self.base_path):
for f in file:
if search_key in f and f not in excluded_files:
file_paths.append(f"{root}/{f}")
return file_paths