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

make connectors free: source/materialize-google-sheets and source-hel… #1321

Merged
merged 1 commit into from
Mar 7, 2024
Merged
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
8 changes: 8 additions & 0 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,25 @@ jobs:
fail-fast: false
matrix:
connector:
# Note that every entry here must specify usage_rate. We're unable to
# set a default and selectively override it with `0.0`, because GH actions
# considers zero values to be "unset" (which is bs and I'm salty about it).
- name: source-asana
type: capture
version: v1
usage_rate: 1.0
- name: source-hubspot-native
type: capture
version: v1
usage_rate: 1.0
- name: source-gladly
type: capture
version: v1
usage_rate: 1.0
- name: source-google-sheets-native
type: capture
version: v1
usage_rate: 0.0

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -78,6 +85,7 @@ jobs:
build-args: |
CONNECTOR_NAME=${{ matrix.connector.name }}
CONNECTOR_TYPE=${{ matrix.connector.type }}
USAGE_RATE=${{ matrix.usage_rate }}
tags: ghcr.io/estuary/${{ matrix.connector.name }}:local

- name: Deployment
Expand Down
7 changes: 6 additions & 1 deletion estuary-cdk/common.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG CONNECTOR_NAME

RUN apt-get update && \
apt install -y --no-install-recommends \
python3-poetry
python3-poetry

RUN python -m venv /opt/venv
ENV VIRTUAL_ENV=/opt/venv
Expand All @@ -23,9 +23,14 @@ FROM base as runner
ARG CONNECTOR_NAME
ARG CONNECTOR_TYPE
ARG DOCS_URL
# The USAGE_RATE arg is required, because GH actions doesn't seem to have a way to conditionally
# pass it only for the connectors that should have a 0 rate. Comes from `usage_rate` in the
# `python.yaml` workflow matrix.
ARG USAGE_RATE

LABEL FLOW_RUNTIME_PROTOCOL=${CONNECTOR_TYPE}
LABEL FLOW_RUNTIME_CODEC=json
LABEL dev.estuary.usage-rate=$USAGE_RATE

COPY --from=builder /opt/$CONNECTOR_NAME /opt/$CONNECTOR_NAME
COPY --from=builder /opt/estuary-cdk /opt/estuary-cdk
Expand Down
1 change: 1 addition & 0 deletions materialize-google-sheets/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ COPY --from=builder /builder/connector ./materialize-google-sheets
USER nonroot:nonroot

LABEL FLOW_RUNTIME_PROTOCOL=materialize
LABEL dev.estuary.usage-rate=0

ENTRYPOINT ["/connector/materialize-google-sheets"]
1 change: 1 addition & 0 deletions source-hello-world/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ COPY --from=builder /builder/connector ./source-hello-world

LABEL FLOW_RUNTIME_PROTOCOL=capture
LABEL CONNECTOR_PROTOCOL=flow-capture
LABEL dev.estuary.usage-rate=0

# Avoid running the connector as root.
USER nonroot:nonroot
Expand Down
Loading