Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
9fb75cc
add gateway base
vdelacruzb Oct 8, 2025
1d2d5ec
remove extra documents
vdelacruzb Oct 8, 2025
613e2e4
remove python version specific code
vdelacruzb Oct 8, 2025
7fcde20
support multiple login methods
vdelacruzb Oct 9, 2025
4d67624
apply some naming conventions to roles
vdelacruzb Oct 9, 2025
141ca04
cleaning unused code
vdelacruzb Oct 9, 2025
1add4fb
more files cleaning
vdelacruzb Oct 9, 2025
327d1a3
update schema creation
vdelacruzb Oct 9, 2025
2e0a5e5
rename category to module
vdelacruzb Oct 9, 2025
fdf4a7f
fix naming inconsistencies
vdelacruzb Oct 9, 2025
b60d626
lint
vdelacruzb Oct 9, 2025
90d6d76
add RS_ROLES creating automatted
vdelacruzb Oct 9, 2025
e637f7c
split environments
vdelacruzb Oct 9, 2025
d43e2da
add sql linter
vdelacruzb Oct 9, 2025
49f8b40
update docs
vdelacruzb Oct 9, 2025
e6f23a8
avoid ask schema prefix if prod
vdelacruzb Oct 9, 2025
d8def5a
remove sqlfluff
vdelacruzb Oct 9, 2025
65dffed
fix packager
vdelacruzb Oct 9, 2025
a93453a
update makefile to not use slqfluff
vdelacruzb Oct 9, 2025
8600404
only include required files into package
vdelacruzb Oct 9, 2025
7dfaf76
major refactor
vdelacruzb Oct 9, 2025
b01bef3
remove cross account deployment
vdelacruzb Oct 10, 2025
966213e
update installer instructions order
vdelacruzb Oct 10, 2025
391e854
big refactor to integrate in the AT
vdelacruzb Oct 10, 2025
b2a3e21
improve remove
vdelacruzb Oct 13, 2025
109689d
ensure full schema dropping after test
vdelacruzb Oct 13, 2025
dc74579
simplify package readme
vdelacruzb Oct 13, 2025
4ab0777
fix click not working
vdelacruzb Oct 13, 2025
318d637
fix dependencies installation
vdelacruzb Oct 13, 2025
e3d6154
remove 4cpus
vdelacruzb Oct 13, 2025
98489ee
remove -q flag
vdelacruzb Oct 13, 2025
c517fa6
remove python2 dependency from redshift.yml
vdelacruzb Oct 13, 2025
76a8edb
remove preinstalled aws cli
vdelacruzb Oct 13, 2025
7f98464
remove old libraries creation cycle
vdelacruzb Oct 13, 2025
3e5c7c6
fix git diff
vdelacruzb Oct 13, 2025
23a454a
simplify function.yaml and port clustering
vdelacruzb Oct 13, 2025
b075f5c
wrap handlers to simplify code
vdelacruzb Oct 13, 2025
b20a3e2
gameplay errors should be shown as errors
vdelacruzb Oct 13, 2025
7f4a05d
shorter version for RS_PREFIX
vdelacruzb Oct 13, 2025
6f524c5
lint
vdelacruzb Oct 13, 2025
088715d
update docs
vdelacruzb Oct 13, 2025
6f3a125
use rs_prefix before env vars
vdelacruzb Oct 13, 2025
4bce96b
remove not needed variables in yml
vdelacruzb Oct 13, 2025
b96e3de
avoid renaming in yml steps
vdelacruzb Oct 13, 2025
08bd8c0
rename run remove
vdelacruzb Oct 13, 2025
68ad465
rename rs_roles variable in gateway
vdelacruzb Oct 14, 2025
23467c0
improve progress bar
vdelacruzb Oct 14, 2025
363174b
remove RS_BUCKET appearances
vdelacruzb Oct 14, 2025
e390a94
add constructors and allow libs in different files
vdelacruzb Oct 15, 2025
dec4d5a
add some more instructions to the installer
vdelacruzb Oct 15, 2025
be87add
allow filtered modules when creating packages
vdelacruzb Oct 15, 2025
a610490
respect clustering dir structure
vdelacruzb Oct 15, 2025
b5dbf9b
rename RS_LAMBDA_EXECUTION_ROLE_ARN to RS_LAMBDA_EXECUTION_ROLE
vdelacruzb Oct 15, 2025
c77a33a
add placekey
vdelacruzb Oct 15, 2025
5141d2a
simplify tests
vdelacruzb Oct 15, 2025
c5a1a95
allow sharing deps
vdelacruzb Oct 15, 2025
5638437
fix deployment and make tests to stop on fail
vdelacruzb Oct 15, 2025
10764e3
remove placekey module from clouds
vdelacruzb Oct 15, 2025
3eb7a2a
add processing modules and automatic requirements builder tool
vdelacruzb Oct 15, 2025
bacb0d3
fix warning in clustering
vdelacruzb Oct 15, 2025
1f9d758
add random
vdelacruzb Oct 15, 2025
8fe6c4b
allow better filtering when testing
vdelacruzb Oct 15, 2025
1795b31
add s2 module
vdelacruzb Oct 16, 2025
5e615ce
run both test and integration
vdelacruzb Oct 16, 2025
05f42ef
some file renaming
vdelacruzb Oct 16, 2025
73ec95a
add transformations module and custom short lambda names
vdelacruzb Oct 16, 2025
9617992
add quadkey module
vdelacruzb Oct 17, 2025
7045852
improve progress bars and allow lambda functions only deploy
vdelacruzb Oct 17, 2025
38a252e
add quadbin and fix issues with float precision
vdelacruzb Oct 17, 2025
70b6e54
shorten yml lambda prefix
vdelacruzb Oct 17, 2025
bf73541
update requirements
vdelacruzb Oct 20, 2025
f7c5a38
improve make clean
vdelacruzb Oct 20, 2025
a2832a1
add make build to simplify testing and creating shared libs
vdelacruzb Oct 20, 2025
d7360dd
improve requirements building
vdelacruzb Oct 20, 2025
8845cb6
add claude.md
vdelacruzb Oct 21, 2025
2b211f2
fix build functions
vdelacruzb Oct 23, 2025
458119d
when make from the root, run both unit and integration tests
vdelacruzb Oct 23, 2025
a9e4dfb
pass version replacement
vdelacruzb Nov 18, 2025
fc3f9c0
allow no parameters functions
vdelacruzb Nov 18, 2025
0f3318a
tweak batch rows
vdelacruzb Nov 18, 2025
7e84605
fix tests
vdelacruzb Nov 18, 2025
14b510b
allow using custom shared libraries
vdelacruzb Nov 19, 2025
4482c5b
parametrize external functions creation
vdelacruzb Nov 19, 2025
65b3edb
move functions to right folder name and remove not needed lambdas
vdelacruzb Nov 20, 2025
32a4ba6
update docs
vdelacruzb Nov 21, 2025
0e4b6ac
merge main
vdelacruzb Nov 21, 2025
6703ed8
update the name proprietary and replace by premium
vdelacruzb Nov 21, 2025
8b9e33d
update doc
vdelacruzb Nov 24, 2025
e29f21e
feat(rs): polish Redshift package creation prompts
vdelacruzb Nov 25, 2025
2c1a938
update doc
vdelacruzb Nov 25, 2025
7c1e566
remove libraries and update some test-unit
vdelacruzb Nov 25, 2025
1bf220b
reorganize tests
vdelacruzb Nov 26, 2025
e3eef93
some polishing
vdelacruzb Nov 26, 2025
e58ac85
still allow RS_PREFIX in gateway
vdelacruzb Nov 27, 2025
0e9b188
filter properly modules and functions when creating packages
vdelacruzb Nov 28, 2025
c169b76
allow extra packager
vdelacruzb Dec 1, 2025
8451f73
use diff
vdelacruzb Dec 2, 2025
8b313a8
update claude.md
vdelacruzb Dec 2, 2025
1b57ce4
remove references to libraries
vdelacruzb Dec 2, 2025
5d23206
fix schema replacement
vdelacruzb Dec 2, 2025
5d046a8
make overrid lambdas default
vdelacruzb Dec 2, 2025
fa61434
update CLAUDE.md
vdelacruzb Dec 2, 2025
920ea45
drop schema when releasing ded
vdelacruzb Dec 3, 2025
f7104c1
fix role creation
vdelacruzb Dec 3, 2025
f5a672b
update CLAUDE.md
vdelacruzb Dec 3, 2025
31ebbdf
fix non interactive cli
vdelacruzb Dec 3, 2025
8077672
udpate CLAUDE.md
vdelacruzb Dec 3, 2025
931c695
split lint deploy and test
vdelacruzb Dec 4, 2025
3675680
update README
vdelacruzb Dec 4, 2025
b35600b
simplify some doc
vdelacruzb Dec 4, 2025
20c2c0c
simplify doc
vdelacruzb Dec 4, 2025
8bdfe32
ensure not sensible data logged or SQL injection
vdelacruzb Dec 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 14 additions & 19 deletions .github/workflows/redshift-ded.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:

env:
NODE_VERSION: 14
PYTHON2_VERSION: 2.7.18
PYTHON3_VERSION: 3.8.18
PYTHON_VERSION: 3.10.13
VIRTUALENV_VERSION: 20.15.1

jobs:
Expand All @@ -18,14 +17,15 @@ jobs:
(github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'dedicated_redshift')) ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'dedicated_redshift'))
runs-on: ubuntu-24.04
container: python:2.7.18-buster
timeout-minutes: 20
env:
RS_HOST: ${{ secrets.RS_HOST_CD }}
RS_DATABASE: ${{ secrets.RS_DATABASE_CD }}
RS_USER: ${{ secrets.RS_USER_CD }}
RS_PASSWORD: ${{ secrets.RS_PASSWORD_CD }}
RS_BUCKET: ${{ secrets.RS_BUCKET_CD }}
RS_LAMBDA_INVOKE_ROLE: ${{ secrets.RS_LAMBDA_INVOKE_ROLE_CD }}
RS_LAMBDA_EXECUTION_ROLE: ${{ secrets.RS_LAMBDA_EXECUTION_ROLE_CD }}
AWS_REGION: ${{ secrets.RS_REGION_CD }}
AWS_ACCESS_KEY_ID: ${{ secrets.RS_AWS_ACCESS_KEY_ID_CD }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.RS_AWS_SECRET_ACCESS_KEY_CD }}
steps:
Expand All @@ -46,21 +46,16 @@ jobs:
!(startsWith(github.event.pull_request.head.ref, 'hotfix/')) &&
!(startsWith(github.event.pull_request.head.ref, 'release/'))
run: echo "RS_PREFIX=dedicated_${{ github.event.pull_request.number }}_" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup yarn
run: npm install -g yarn
- name: Install dependencies
run: |
apt-get update
apt-get -y install rsync zip unzip curl glibc-source groff less
- name: Install AWS CLI
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
- name: Setup virtualenv
run: pip install virtualenv==${{ env.VIRTUALENV_VERSION }}
- name: Configure AWS Credentials
Expand All @@ -69,26 +64,26 @@ jobs:
aws-access-key-id: ${{ secrets.RS_AWS_ACCESS_KEY_ID_CD }}
aws-secret-access-key: ${{ secrets.RS_AWS_SECRET_ACCESS_KEY_CD }}
aws-region: ${{ secrets.RS_REGION_CD }}
- name: Setup virtualenv
run: pip install virtualenv==${{ env.VIRTUALENV_VERSION }}
- name: Set RS_LAMBDA_PREFIX
run: echo "RS_LAMBDA_PREFIX=ded-${{ github.event.pull_request.number }}-" >> $GITHUB_ENV
- name: Run deploy
id: deploy
if: github.event.action == 'synchronize' || github.event.action == 'labeled'
run: |
cd clouds/redshift
make deploy dropfirst=1
make deploy cloud=redshift
- name: Run remove
id: remove
if: github.event.action == 'unlabeled' || github.event.action == 'closed'
run: |
cd clouds/redshift
make remove
make remove cloud=redshift drop-schema=1 || echo "Removal (best effort)"
- name: Comment deploy PR
if: steps.deploy.outcome == 'success' && github.event.action == 'labeled'
uses: thollander/actions-comment-pull-request@v1
with:
message: |
Dedicated ${{ env.RS_PREFIX }}carto environment deployed in Redshift host ${{ env.RS_HOST }} and ${{ env.RS_DATABASE }} database
- Gateway functions (Lambda): ${{ env.RS_LAMBDA_PREFIX }}*
- Clouds functions (SQL UDFs): deployed
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Comment remove PR
if: steps.remove.outcome == 'success' && (github.event.action == 'unlabeled' || github.event.action == 'closed')
Expand Down
96 changes: 43 additions & 53 deletions .github/workflows/redshift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,59 @@ on:
branches:
- main
paths:
- "gateway/**"
- "clouds/redshift/**"
- ".github/workflows/redshift.yml"
pull_request:
paths:
- "gateway/**"
- "clouds/redshift/**"
- ".github/workflows/redshift.yml"
workflow_dispatch:
workflow_call:

env:
NODE_VERSION: 14
PYTHON2_VERSION: 2.7.18
PYTHON3_VERSION: 3.8.18
NODE_VERSION: 20.19
PYTHON_VERSION: 3.10.13
VIRTUALENV_VERSION: 20.15.1
GCLOUD_VERSION: 500.0.0

jobs:

test:
runs-on: ubuntu-24.04
container: python:2.7.18-buster
timeout-minutes: 30
timeout-minutes: 40
env:
RS_PREFIX: ci_${{ github.sha }}_${{ github.run_id }}_${{ github.run_attempt }}_
RS_HOST: ${{ secrets.RS_HOST_CI }}
RS_DATABASE: ${{ secrets.RS_DATABASE_CI }}
RS_USER: ${{ secrets.RS_USER_CI }}
RS_PASSWORD: ${{ secrets.RS_PASSWORD_CI }}
RS_BUCKET: ${{ secrets.RS_BUCKET_CI }}
RS_LAMBDA_EXECUTION_ROLE: ${{ secrets.RS_LAMBDA_EXECUTION_ROLE_CI }}
RS_LAMBDA_INVOKE_ROLE: ${{ secrets.RS_LAMBDA_INVOKE_ROLE_CI }}
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.RS_AWS_ACCESS_KEY_ID_CI }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.RS_AWS_SECRET_ACCESS_KEY_CI }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Check diff
uses: technote-space/get-diff-action@v4
- name: Generate deployment prefix
run: |
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-4)
SHORT_RUN=$(echo ${{ github.run_id }} | tail -c 4)
echo "RS_PREFIX=ci_${SHORT_SHA}_${SHORT_RUN}_" >> $GITHUB_ENV
echo "RS_LAMBDA_PREFIX=ci${SHORT_SHA}${SHORT_RUN}-" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup yarn
run: npm install -g yarn
- name: Install dependencies
run: |
apt-get update
apt-get -y install rsync zip unzip curl glibc-source groff less
- name: Install AWS CLI
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
- name: Setup virtualenv
run: pip install virtualenv==${{ env.VIRTUALENV_VERSION }}
- name: Configure AWS Credentials
Expand All @@ -64,19 +66,21 @@ jobs:
aws-access-key-id: ${{ secrets.RS_AWS_ACCESS_KEY_ID_CI }}
aws-secret-access-key: ${{ secrets.RS_AWS_SECRET_ACCESS_KEY_CI }}
aws-region: ${{ secrets.RS_REGION_CI }}
- name: Run linter and tests
- name: Run linter
run: make lint cloud=redshift
- name: Run deploy
run: make deploy cloud=redshift diff="$GIT_DIFF"
- name: Run test
run: make test cloud=redshift diff="$GIT_DIFF"
- name: Run remove
if: always()
run: |
cd clouds/redshift
make lint && \
make deploy diff="$GIT_DIFF" && \
make test diff="$GIT_DIFF" && \
make remove
make remove cloud=redshift drop-schema=1

deploy-internal:
if: github.ref_name == 'main'
needs: test
runs-on: ubuntu-24.04
container: python:2.7.18-buster
timeout-minutes: 20
strategy:
matrix:
Expand All @@ -85,47 +89,44 @@ jobs:
database: RS_DATABASE_CD
user: RS_USER_CD
password: RS_PASSWORD_CD
bucket: RS_BUCKET_CD
region: RS_REGION_CD
roles: RS_ROLES_CD
aws_access_key_id: RS_AWS_ACCESS_KEY_ID_CD
aws_secret_access_key: RS_AWS_SECRET_ACCESS_KEY_CD
- host: RS_HOST_CI
database: RS_DATABASE_CI
user: RS_USER_CI
password: RS_PASSWORD_CI
bucket: RS_BUCKET_CI
region: RS_REGION_CI
roles: RS_ROLES_CI
aws_access_key_id: RS_AWS_ACCESS_KEY_ID_CI
aws_secret_access_key: RS_AWS_SECRET_ACCESS_KEY_CI
env:
RS_HOST: ${{ secrets[matrix.host] }}
RS_DATABASE: ${{ secrets[matrix.database] }}
RS_USER: ${{ secrets[matrix.user] }}
RS_PASSWORD: ${{ secrets[matrix.password] }}
RS_BUCKET: ${{ secrets[matrix.bucket] }}
RS_REGION: ${{ secrets[matrix.region] }}
RS_ROLES: ${{ secrets[matrix.roles] }}
AWS_REGION: ${{ secrets[matrix.region] }}
AWS_ACCESS_KEY_ID: ${{ secrets[matrix.aws_access_key_id] }}
AWS_SECRET_ACCESS_KEY: ${{ secrets[matrix.aws_secret_access_key] }}
RS_LAMBDA_PREFIX: carto-at-
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Check diff
uses: technote-space/get-diff-action@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup yarn
run: npm install -g yarn
- name: Install dependencies
run: |
apt-get update
apt-get -y install rsync zip unzip curl glibc-source groff less
- name: Install AWS CLI
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
- name: Setup virtualenv
run: pip install virtualenv==${{ env.VIRTUALENV_VERSION }}
- name: Configure AWS Credentials
Expand All @@ -136,21 +137,23 @@ jobs:
aws-region: ${{ env.RS_REGION }}
- name: Run deploy
run: |
cd clouds/redshift
make deploy diff="$GIT_DIFF" production=1
make deploy cloud=redshift production=1

publish:
if: github.ref_name == 'stable'
needs: test
runs-on: ubuntu-24.04
container: python:2.7.18-buster
timeout-minutes: 10
env:
PACKAGE_BUCKET: gs://carto-analytics-toolbox-core/redshift
LIBS_URL: https://storage.googleapis.com/carto-analytics-toolbox-core/redshift/latest/libs
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup node
uses: actions/setup-node@v1
with:
Expand All @@ -159,15 +162,6 @@ jobs:
run: npm install -g yarn
- name: Setup virtualenv
run: pip install virtualenv==${{ env.VIRTUALENV_VERSION }}
- name: Install dependencies
run: |
apt-get update
apt-get -y install rsync zip unzip curl glibc-source groff less
- name: Install AWS CLI
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
- name: Auth google
uses: google-github-actions/auth@v2
with:
Expand All @@ -181,12 +175,8 @@ jobs:
project_id: ${{ secrets.GCLOUD_PRODUCTION_PROJECT }}
- name: Create package
run: |
cd clouds/redshift
make create-package
make create-package cloud=redshift production=1
- name: Publish package
run: |
cd clouds/redshift
gsutil -h "Content-Type:application/zip" -m cp dist/*.zip ${{ env.PACKAGE_BUCKET }}/
gsutil -h "Content-Type:application/zip" -m cp dist/*.zip ${{ env.PACKAGE_BUCKET }}/carto-analytics-toolbox-core-redshift-latest.zip
gsutil -h "Content-Type:application/zip" -m cp build/libs/*.zip ${{ env.PACKAGE_BUCKET }}/latest/libs/
gsutil -h "Content-Type:application/json" -m cp dist/*.json ${{ env.PACKAGE_BUCKET }}/
gsutil -h "Content-Type:application/zip" -m cp dist/carto-at-redshift-*.zip ${{ env.PACKAGE_BUCKET }}/carto-analytics-toolbox-core-redshift-latest.zip
Loading
Loading