Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_redshift #532

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/redshift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
test:
runs-on: ubuntu-20.04
container: python:2.7.18-buster
timeout-minutes: 30
timeout-minutes: 3
env:
RS_PREFIX: ci_${{ github.sha }}_${{ github.run_id }}_${{ github.run_attempt }}_
RS_HOST: ${{ secrets.RS_HOST_CI }}
Expand Down
1 change: 1 addition & 0 deletions clouds/redshift/common/run_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def run_queries(queries):
with conn.cursor() as cursor:
for i in trange(len(queries) if not filter else 1, ncols=97):
query = apply_replacements(queries[i])
print(query)
if (not filter) or (filter in query):
pattern = os.environ['RS_SCHEMA'] + '.(.*?)[(|\n]'
result = re.search(pattern, str(query))
Expand Down
9 changes: 5 additions & 4 deletions clouds/redshift/libraries/python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ build:
rm -rf $(BUILD_DIR)
mkdir $(BUILD_DIR)
$(MAKE) build-library
$(MAKE) build-dependencies
# $(MAKE) build-dependencies
$(MAKE) build-libraries-sql

build-library:
Expand Down Expand Up @@ -69,8 +69,9 @@ endif
done

deploy: check build
echo "Deploying libraries..."
echo "copy libraries..."
$(MAKE) copy-libraries
echo "Deploying libraries..."
$(MAKE) deploy-libraries
$(MAKE) remove-libraries

Expand All @@ -87,9 +88,9 @@ endif

deploy-libraries: venv3
ifeq ("$(library)","carto")
FILTER=$(RS_LIBRARY) $(VENV3_BIN)/python $(COMMON_DIR)/run_script.py $(BUILD_DIR)/libraries.sql || exit 1
FILTER=$(RS_LIBRARY) $(VENV3_BIN)/python $(COMMON_DIR)/run_script.py $(BUILD_DIR)/libraries.sql
else
$(VENV3_BIN)/python $(COMMON_DIR)/run_script.py $(BUILD_DIR)/libraries.sql || exit 1
$(VENV3_BIN)/python $(COMMON_DIR)/run_script.py $(BUILD_DIR)/libraries.sql
endif

remove-libraries:
Expand Down
1 change: 1 addition & 0 deletions clouds/redshift/modules/sql/quadbin/QUADBIN_BBOX.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ AS $$
if quadbin is None:
return None


return json.dumps(cell_to_bounding_box(quadbin))
$$ LANGUAGE plpythonu;

Expand Down
Loading