-
Notifications
You must be signed in to change notification settings - Fork 4
Test/buildkite improvements #36
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
Draft
fivetran-catfritz
wants to merge
41
commits into
main
Choose a base branch
from
test/buildkite-improvements
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
f37945b
test/buildkite-improvements
fivetran-catfritz 3a42fa5
test/buildkite-improvements
fivetran-catfritz bbeda27
fix
fivetran-catfritz 44682e3
test again
fivetran-catfritz 5e99d16
test again
fivetran-catfritz d93c8ae
test again
fivetran-catfritz 6b0c045
test again
fivetran-catfritz 0aa67fe
test again
fivetran-catfritz 8f0fcc7
test again
fivetran-catfritz 9f6b06b
test again
fivetran-catfritz 526cead
test again
fivetran-catfritz c358444
test again
fivetran-catfritz d69c836
test again
fivetran-catfritz 0938509
test again
fivetran-catfritz 3b59641
test again
fivetran-catfritz 9e163de
fix dbt compile
fivetran-catfritz 94677d9
add compile message
fivetran-catfritz 57c8b59
add compile messages
fivetran-catfritz 86cb6fb
remove schema cleanup
fivetran-catfritz e467b3b
add auto retry
fivetran-catfritz 6baae08
debug
fivetran-catfritz 399164a
debug
fivetran-catfritz bdc97ab
update generated schema name
fivetran-catfritz 29db7c6
update where schema var name passed
fivetran-catfritz a03251b
add comments
fivetran-catfritz e0eae75
update names
fivetran-catfritz 3453ff2
add test names
fivetran-catfritz d589042
add sql warehosue
fivetran-catfritz cd7635f
adjust vars
fivetran-catfritz 90293de
adjust vars
fivetran-catfritz 43b35af
move run_models to central
fivetran-catfritz 8613c23
try centralizing
fivetran-catfritz 384664a
try again
fivetran-catfritz 61d8df6
try again
fivetran-catfritz 4745c31
more consolidaton
fivetran-catfritz 5229fd4
update
fivetran-catfritz c363f51
fix it
fivetran-catfritz dc8dcfa
file rename
fivetran-catfritz af9b389
update
fivetran-catfritz 2ff6358
update
fivetran-catfritz f4ded3d
update
fivetran-catfritz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,3 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| # Export secrets for Docker containers. | ||
| # Restrict exposing secrets only to the steps that need them | ||
| export GCLOUD_SERVICE_KEY=$(gcloud secrets versions access latest --secret="GCLOUD_SERVICE_KEY" --project="dbt-package-testing-363917") | ||
| export CI_POSTGRES_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_HOST" --project="dbt-package-testing-363917") | ||
| export CI_POSTGRES_DBT_USER=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_USER" --project="dbt-package-testing-363917") | ||
| export CI_POSTGRES_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_PASS" --project="dbt-package-testing-363917") | ||
| export CI_POSTGRES_DBT_DBNAME=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_DBNAME" --project="dbt-package-testing-363917") | ||
| export CI_REDSHIFT_DBT_DBNAME=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_DBNAME" --project="dbt-package-testing-363917") | ||
| export CI_REDSHIFT_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_HOST" --project="dbt-package-testing-363917") | ||
| export CI_REDSHIFT_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_PASS" --project="dbt-package-testing-363917") | ||
| export CI_REDSHIFT_DBT_USER=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_USER" --project="dbt-package-testing-363917") | ||
| export CI_SNOWFLAKE_DBT_ACCOUNT=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_ACCOUNT" --project="dbt-package-testing-363917") | ||
| export CI_SNOWFLAKE_DBT_DATABASE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_DATABASE" --project="dbt-package-testing-363917") | ||
| export CI_SNOWFLAKE_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_PASS" --project="dbt-package-testing-363917") | ||
| export CI_SNOWFLAKE_DBT_ROLE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_ROLE" --project="dbt-package-testing-363917") | ||
| export CI_SNOWFLAKE_DBT_USER=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_USER" --project="dbt-package-testing-363917") | ||
| export CI_SNOWFLAKE_DBT_WAREHOUSE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_WAREHOUSE" --project="dbt-package-testing-363917") | ||
| export CI_DATABRICKS_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HOST" --project="dbt-package-testing-363917") | ||
| export CI_DATABRICKS_DBT_HTTP_PATH=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HTTP_PATH" --project="dbt-package-testing-363917") | ||
| export CI_DATABRICKS_DBT_TOKEN=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_TOKEN" --project="dbt-package-testing-363917") | ||
| export CI_DATABRICKS_DBT_CATALOG=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_CATALOG" --project="dbt-package-testing-363917") | ||
| curl -s -o /tmp/build-setup.sh "https://raw.githubusercontent.com/fivetran/dbt_package_automations/refs/heads/feature/buildkite-scripts/.buildkite/scripts/build_setup.sh" | ||
| source /tmp/build-setup.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,74 +1,107 @@ | ||
| # Each test downloads a centralized test runner script from the dbt_package_automations repo, | ||
| # which handles environment setup, dependency installation, and dbt test execution. | ||
|
|
||
| env: | ||
| RUN_MODELS_URL: "https://raw.githubusercontent.com/fivetran/dbt_package_automations/refs/heads/feature/buildkite-scripts/.buildkite/scripts/run_models.sh" | ||
|
|
||
| steps: | ||
| - label: ":postgres: Run Tests - Postgres" | ||
| key: "run-dbt-postgres" | ||
| key: "run_dbt_postgres" | ||
| retry: | ||
| automatic: | ||
| - exit_status: -1 # Timeout | ||
| limit: 1 | ||
| plugins: | ||
| - docker#v3.13.0: | ||
| image: "python:3.10.13" | ||
| image: "python:3.13" | ||
| shell: [ "/bin/bash", "-e", "-c" ] | ||
| environment: | ||
| - "BASH_ENV=/tmp/.bashrc" | ||
| - "BUILD_SCHEMA" | ||
| - "CI_POSTGRES_DBT_DBNAME" | ||
| - "CI_POSTGRES_DBT_HOST" | ||
| - "CI_POSTGRES_DBT_PASS" | ||
| - "CI_POSTGRES_DBT_USER" | ||
| commands: | | ||
| bash .buildkite/scripts/run_models.sh postgres | ||
| curl -s "${RUN_MODELS_URL}" | bash -s postgres | ||
|
|
||
| - label: ":snowflake-db: Run Tests - Snowflake" | ||
| key: "run_dbt_snowflake" | ||
| retry: | ||
| automatic: | ||
| - exit_status: -1 # Timeout | ||
| limit: 1 | ||
| plugins: | ||
| - docker#v3.13.0: | ||
| image: "python:3.10.13" | ||
| image: "python:3.13" | ||
| shell: [ "/bin/bash", "-e", "-c" ] | ||
| environment: | ||
| - "BASH_ENV=/tmp/.bashrc" | ||
| - "BUILD_SCHEMA" | ||
| - "CI_SNOWFLAKE_DBT_ACCOUNT" | ||
| - "CI_SNOWFLAKE_DBT_DATABASE" | ||
| - "CI_SNOWFLAKE_DBT_PASS" | ||
| - "CI_SNOWFLAKE_DBT_ROLE" | ||
| - "CI_SNOWFLAKE_DBT_USER" | ||
| - "CI_SNOWFLAKE_DBT_WAREHOUSE" | ||
| commands: | | ||
| bash .buildkite/scripts/run_models.sh snowflake | ||
| curl -s "${RUN_MODELS_URL}" | bash -s snowflake | ||
|
|
||
| - label: ":gcloud: Run Tests - BigQuery" | ||
| key: "run_dbt_bigquery" | ||
| retry: | ||
| automatic: | ||
| - exit_status: -1 # Timeout | ||
| limit: 1 | ||
| plugins: | ||
| - docker#v3.13.0: | ||
| image: "python:3.10.13" | ||
| image: "python:3.13" | ||
| shell: [ "/bin/bash", "-e", "-c" ] | ||
| environment: | ||
| - "BASH_ENV=/tmp/.bashrc" | ||
| - "BUILD_SCHEMA" | ||
| - "GCLOUD_SERVICE_KEY" | ||
| commands: | | ||
| bash .buildkite/scripts/run_models.sh bigquery | ||
| curl -s "${RUN_MODELS_URL}" | bash -s bigquery | ||
|
|
||
| - label: ":amazon-redshift: Run Tests - Redshift" | ||
| key: "run_dbt_redshift" | ||
| concurrency: 3 | ||
| concurrency_group: "warehouse/redshift" | ||
| retry: | ||
| automatic: | ||
| - exit_status: -1 # Timeout | ||
| limit: 1 | ||
| plugins: | ||
| - docker#v3.13.0: | ||
| image: "python:3.10.13" | ||
| image: "python:3.13" | ||
| shell: [ "/bin/bash", "-e", "-c" ] | ||
| environment: | ||
| - "BASH_ENV=/tmp/.bashrc" | ||
| - "BUILD_SCHEMA" | ||
| - "CI_REDSHIFT_DBT_DBNAME" | ||
| - "CI_REDSHIFT_DBT_HOST" | ||
| - "CI_REDSHIFT_DBT_PASS" | ||
| - "CI_REDSHIFT_DBT_USER" | ||
| commands: | | ||
| bash .buildkite/scripts/run_models.sh redshift | ||
| curl -s "${RUN_MODELS_URL}" | bash -s redshift | ||
|
|
||
| - label: ":databricks: Run Tests - Databricks" | ||
| key: "run_dbt_databricks" | ||
| retry: | ||
| automatic: | ||
| - exit_status: -1 # Timeout | ||
| limit: 1 | ||
| plugins: | ||
| - docker#v3.13.0: | ||
| image: "python:3.10.13" | ||
| image: "python:3.13" | ||
| shell: [ "/bin/bash", "-e", "-c" ] | ||
| environment: | ||
| - "BASH_ENV=/tmp/.bashrc" | ||
| - "BUILD_SCHEMA" | ||
| - "CI_DATABRICKS_DBT_HOST" | ||
| - "CI_DATABRICKS_DBT_HTTP_PATH" | ||
| - "CI_DATABRICKS_DBT_TOKEN" | ||
| - "CI_DATABRICKS_DBT_CATALOG" | ||
| commands: | | ||
| bash .buildkite/scripts/run_models.sh databricks | ||
| curl -s "${RUN_MODELS_URL}" | bash -s databricks |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Name of the dbt variable used to set the schema where data lives | ||
| # This is the variable name you use in dbt (e.g., amazon_ads_schema) | ||
| schema_variable_name: "amazon_ads_schema" | ||
| default_include_incremental: false # Whether default scenario should test incremental runs | ||
|
|
||
| # Additional test scenarios (default run happens automatically) | ||
| test_scenarios: | ||
| - name: "portfolio history disabled" | ||
| vars: | ||
| amazon_ads__portfolio_history_enabled: false | ||
| include_incremental: false | ||
|
|
||
| # Add more scenarios as needed: | ||
| # - name: "some other scenario" | ||
| # vars: | ||
| # amazon_ads__some_other_flag: true | ||
| # amazon_ads__another_setting: "custom_value" | ||
| # include_incremental: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking to also update
+column_typesfor packages that don't specify the source table to clean up buildkite runs.