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

update backfill job, allow to pass an optional list of headers #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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 charts/substreams-sink-sql-backfill/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.7
version: 0.1.8

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 3 additions & 3 deletions charts/substreams-sink-sql-backfill/templates/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ spec:
name: {{ .Values.clickhouseAuth.secretName }}
key: {{ .Values.clickhouseAuth.keyPassword }}
command: ["/bin/sh", "-c"]
args:
args:
- |
{{ "{{inputs.parameters.script}}" }}

Expand Down Expand Up @@ -162,6 +162,6 @@ spec:
name: {{ .Values.clickhouseAuth.secretName }}
key: {{ .Values.clickhouseAuth.keyPassword }}
command: ["/bin/sh", "-c"]
args:
args:
- |
./substreams-sink-sql run clickhouse://$(USERNAME):$(PASSWORD)@{{ .Values.host }}:9000/{{ .Values.database }} {{ .Values.manifest }} {{ "{{inputs.parameters.start}}" }}:{{ "{{inputs.parameters.stop}}" }} --endpoint={{ .Values.endpoint }}
./substreams-sink-sql run clickhouse://$(USERNAME):$(PASSWORD)@{{ .Values.host }}:9000/{{ .Values.database }} {{ .Values.manifest }} {{ "{{inputs.parameters.start}}" }}:{{ "{{inputs.parameters.stop}}" }} --endpoint={{ .Values.endpoint }} {{ if .Values.additionalHeaders }}{{- range .Values.additionalHeaders }}-H {{ . | quote }} {{- end }}{{ end }}
6 changes: 4 additions & 2 deletions charts/substreams-sink-sql-backfill/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ containerResources:

# Block ranges to run. Will run as many jobs as it can based on resources available. Once the resource limit is hit, the jobs left will be put in queue
blockRanges:
# range of blocks
- range: [0, 10]
# range of blocks
- range: [ 0, 10 ]
# blocks per job to run for that range
blocksPerJob: 5

Expand All @@ -72,6 +72,8 @@ database: myDatabase
# Prefix to add to cursor tables being created and deleted by the backfill jobs
# By default: backprocess-<startBlock>
tablePrefix: backprocess
# Optionally pass one or multiple headers to the Substreams endpoint (such as X-Sf-Substreams-Parallel-Jobs for example)
additionalHeaders: [ ]

# Username/Password to connect to database from an existing secret
clickhouseAuth:
Expand Down