Skip to content

Commit a92a5b4

Browse files
fix: revert docker/cloud split in elementary — run all targets under pull_request_target
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
1 parent a051188 commit a92a5b4

2 files changed

Lines changed: 11 additions & 33 deletions

File tree

.github/workflows/test-all-warehouses.yml

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,6 @@ on:
3535
description: Whether to generate new data
3636

3737
jobs:
38-
# ── Docker targets ────────────────────────────────────────────────────
39-
# No secrets needed — run on pull_request (works for forks without approval).
40-
# Skipped on pull_request_target to avoid duplicate runs for internal PRs.
41-
test-docker:
42-
if: github.event_name != 'pull_request_target'
43-
strategy:
44-
fail-fast: false
45-
matrix:
46-
dbt-version: ${{ inputs.dbt-version && fromJSON(format('["{0}"]', inputs.dbt-version)) || fromJSON('[null]') }}
47-
warehouse-type: [postgres, clickhouse]
48-
uses: ./.github/workflows/test-warehouse.yml
49-
with:
50-
warehouse-type: ${{ matrix.warehouse-type }}
51-
elementary-ref: ${{ inputs.elementary-ref || ((github.event_name == 'pull_request_target' || github.event_name == 'pull_request') && github.event.pull_request.head.sha) || '' }}
52-
dbt-data-reliability-ref: ${{ inputs.dbt-data-reliability-ref }}
53-
dbt-version: ${{ matrix.dbt-version }}
54-
generate-data: ${{ inputs.generate-data || false }}
55-
56-
# ── Cloud targets ─────────────────────────────────────────────────────
57-
# Require secrets — use fork check / approval gate for pull_request_target.
58-
5938
# Determine if this is a fork PR and skip if wrong trigger is used
6039
check-fork-status:
6140
runs-on: ubuntu-latest
@@ -95,7 +74,7 @@ jobs:
9574
- name: Approved
9675
run: echo "Fork PR approved for testing"
9776

98-
test-cloud:
77+
test:
9978
needs: [check-fork-status, approve-fork]
10079
if: |
10180
! cancelled() &&
@@ -107,7 +86,15 @@ jobs:
10786
matrix:
10887
dbt-version: ${{ inputs.dbt-version && fromJSON(format('["{0}"]', inputs.dbt-version)) || fromJSON('[null]') }}
10988
warehouse-type:
110-
[snowflake, bigquery, redshift, databricks_catalog, athena]
89+
[
90+
postgres,
91+
snowflake,
92+
bigquery,
93+
redshift,
94+
databricks_catalog,
95+
athena,
96+
clickhouse,
97+
]
11198
uses: ./.github/workflows/test-warehouse.yml
11299
with:
113100
warehouse-type: ${{ matrix.warehouse-type }}

.github/workflows/test-warehouse.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ jobs:
184184
run: edr --help
185185

186186
- name: Run monitor
187-
if: ${{ !contains(fromJSON('["postgres", "clickhouse"]'), inputs.warehouse-type) }}
188187
env:
189188
SLACK_WEBHOOK: ${{ secrets.CI_SLACK_WEBHOOK }}
190189
run: >
@@ -196,42 +195,36 @@ jobs:
196195
--slack-webhook "$SLACK_WEBHOOK"
197196
198197
- name: Validate alerts statuses were updated
199-
if: ${{ !contains(fromJSON('["postgres", "clickhouse"]'), inputs.warehouse-type) }}
200198
working-directory: ${{ env.CLI_INTERNAL_DBT_PKG_DIR }}
201199
run: |
202200
dbt deps
203201
dbt run-operation validate_alert_statuses_are_updated -t "${{ inputs.warehouse-type }}"
204202
205203
- name: Run report
206-
if: ${{ !contains(fromJSON('["postgres", "clickhouse"]'), inputs.warehouse-type) }}
207204
run: >
208205
edr monitor report
209206
-t "${{ inputs.warehouse-type }}"
210207
--project-dir "${{ env.E2E_DBT_PROJECT_DIR }}"
211208
--project-profile-target "${{ inputs.warehouse-type }}"
212209
213210
- name: Set report artifact name
214-
if: ${{ !contains(fromJSON('["postgres", "clickhouse"]'), inputs.warehouse-type) }}
215211
id: set_report_artifact_name
216212
run: |
217213
ARTIFACT_NAME=$(echo "report_${{ inputs.warehouse-type }}_${BRANCH_NAME}_dbt_${{ inputs.dbt-version || '' }}.html" | awk '{print tolower($0)}' | sed 's#[":/\\<>|*?-]#_#g')
218214
echo "artifact_name=$ARTIFACT_NAME" >> "$GITHUB_OUTPUT"
219215
220216
- name: Upload report artifact
221-
if: ${{ !contains(fromJSON('["postgres", "clickhouse"]'), inputs.warehouse-type) }}
222217
uses: actions/upload-artifact@v4
223218
with:
224219
name: ${{ steps.set_report_artifact_name.outputs.artifact_name }}
225220
path: elementary/edr_target/elementary_report.html
226221

227222
- name: Write GCS keyfile
228-
if: ${{ !contains(fromJSON('["postgres", "clickhouse"]'), inputs.warehouse-type) }}
229223
env:
230224
GCS_KEYFILE: ${{ secrets.GCS_KEYFILE }}
231225
run: echo "$GCS_KEYFILE" | base64 -d > /tmp/gcs_keyfile.json
232226

233227
- name: Run send report
234-
if: ${{ !contains(fromJSON('["postgres", "clickhouse"]'), inputs.warehouse-type) }}
235228
env:
236229
SLACK_TOKEN: ${{ secrets.CI_SLACK_TOKEN }}
237230
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -256,19 +249,17 @@ jobs:
256249
--update-bucket-website true
257250
258251
- name: Set artifact name
259-
if: ${{ !contains(fromJSON('["postgres", "clickhouse"]'), inputs.warehouse-type) }}
260252
id: set_artifact_name
261253
run: |
262254
ARTIFACT_NAME=$(echo "edr_${{ inputs.warehouse-type }}_${BRANCH_NAME}_dbt_${{ inputs.dbt-version || '' }}.log" | awk '{print tolower($0)}' | sed 's#[":/\\<>|*?-]#_#g')
263255
echo "artifact_name=$ARTIFACT_NAME" >> "$GITHUB_OUTPUT"
264256
265257
- name: Upload edr log
266-
if: ${{ always() && !contains(fromJSON('["postgres", "clickhouse"]'), inputs.warehouse-type) }}
258+
if: ${{ always() }}
267259
uses: actions/upload-artifact@v4
268260
with:
269261
name: ${{ steps.set_artifact_name.outputs.artifact_name }}
270262
path: elementary/edr_target/edr.log
271263

272264
- name: Run Python package e2e tests
273-
if: ${{ !contains(fromJSON('["postgres", "clickhouse"]'), inputs.warehouse-type) }}
274265
run: pytest -vv tests/e2e --warehouse-type ${{ inputs.warehouse-type }}

0 commit comments

Comments
 (0)