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

Release stg to prd #33

Merged
merged 49 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1ea5ebc
Simpler macro for dataset names
pgoslatara May 28, 2023
756a6a9
Merge pull request #4 from pgoslatara/DE-9-better-macro
pgoslatara May 28, 2023
4961dd1
Adding seed to daily runs
pgoslatara May 28, 2023
857c43c
Merge branch 'stg' into DE-9-better-macro
pgoslatara May 28, 2023
368c377
Merge pull request #5 from pgoslatara/DE-9-better-macro
pgoslatara May 28, 2023
6fcdd6f
Excluding completed orders
pgoslatara May 29, 2023
774ff55
Nicer mart monitor formatting
pgoslatara May 29, 2023
064b0be
Restoring SQL file
pgoslatara May 29, 2023
03d22e5
Merge pull request #6 from pgoslatara/DE-10-dummy-change
pgoslatara May 29, 2023
ddcd95c
Rename checks to monitors
pgoslatara May 29, 2023
8c4d09e
Merge pull request #7 from pgoslatara/DE-11-rename-checks
pgoslatara May 29, 2023
6b16d85
Adding exposures
pgoslatara May 29, 2023
cd4666a
Merge branch 'stg' into DE-12-add-exposures
pgoslatara May 29, 2023
99e2fa7
Handle large numbers
pgoslatara May 29, 2023
88f1a69
Merge pull request #8 from pgoslatara/DE-12-add-exposures
pgoslatara May 29, 2023
d789855
Merge branch 'stg' into DE-13-monitor-large-numbers
pgoslatara May 29, 2023
f8c091e
Merge pull request #9 from pgoslatara/DE-13-monitor-large-numbers
pgoslatara May 29, 2023
b7fe777
Changing CI dataset name
pgoslatara May 29, 2023
29f0d00
Merge pull request #11 from pgoslatara/DE-15-ci-name
pgoslatara May 29, 2023
c969413
Adding proper README sections for CI
pgoslatara Jun 4, 2023
e1cefab
Adding links to Meetup talk
pgoslatara Jun 4, 2023
5903919
Merge pull request #14 from pgoslatara/DE-17-readme-ci
pgoslatara Jun 4, 2023
806bf40
Adding pytest to ensure TIMESTAMP naming
pgoslatara Jun 4, 2023
ae8a0c8
Correcting incremental logic
pgoslatara Jun 4, 2023
4a7b5e0
Merge pull request #21 from pgoslatara/DE-18-timestamp-naming
pgoslatara Jun 4, 2023
2ad0e47
Unknown marks result in pytest failure
pgoslatara Jun 4, 2023
d1a8e40
Running pytests in parallel
pgoslatara Jun 4, 2023
64ebe35
Adding template for PRs
pgoslatara Jun 4, 2023
30fd395
Merge pull request #22 from pgoslatara/DE-23-pr-template
pgoslatara Jun 4, 2023
d8a2663
Merge remote-tracking branch 'origin/stg' into DE-22-parallel-pytests
pgoslatara Jun 4, 2023
1be13c8
Merge pull request #23 from pgoslatara/DE-22-parallel-pytests
pgoslatara Jun 4, 2023
60a2843
Merge remote-tracking branch 'origin/stg' into DE-21-unknown-mark
pgoslatara Jun 4, 2023
c93cd09
Merge pull request #24 from pgoslatara/DE-21-unknown-mark
pgoslatara Jun 4, 2023
6794ef3
Fixing mart monitor logic
pgoslatara Jun 4, 2023
574acb4
Merge branch 'stg' into DE-24-monitor-fixes
pgoslatara Jun 4, 2023
a1e996e
Merge pull request #26 from pgoslatara/DE-24-monitor-fixes
pgoslatara Jun 4, 2023
fd2f470
Removing unnecessary file
pgoslatara Jun 4, 2023
d8eed97
Merge pull request #27 from pgoslatara/DE-25-remove-files
pgoslatara Jun 4, 2023
9f52bba
Sorting manifests from GCS according to int
pgoslatara Jun 4, 2023
ed2a100
Nicer sorting of build numbers
pgoslatara Jun 4, 2023
7718933
Merge pull request #28 from pgoslatara/DE-26-manifest-sort
pgoslatara Jun 4, 2023
a3d5ec3
Checking out proper branches
pgoslatara Jun 5, 2023
fc2d29e
Merge pull request #29 from pgoslatara/DE-27-checkout-fix
pgoslatara Jun 5, 2023
a8522d6
Adding MDSFest links
pgoslatara Aug 11, 2023
18c75dc
Merge pull request #30 from pgoslatara/DE-21-new-conference-link
pgoslatara Aug 11, 2023
29b2186
Adding link to MDS Fest video
pgoslatara Sep 5, 2023
93d4372
Merge pull request #31 from pgoslatara/DE-22-mdsfest-video-url
pgoslatara Sep 5, 2023
2f30915
ADding DISTINCT keyword
pgoslatara Sep 15, 2023
11e87aa
Merge pull request #32 from pgoslatara/DE-23-distinct
pgoslatara Sep 15, 2023
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
61 changes: 61 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!---
Source: https://docs.getdbt.com/blog/analytics-pull-request-template
-->


<!---
Provide a short summary in the Title above. Examples of good PR titles:
* "Feature: add so-and-so models"
* "Fix: deduplicate such-and-such"
* "Update: dbt version 0.13.0"
-->

## Description & motivation
<!---
Describe your changes, and why you're making them. Is this linked to an open
issue, a Trello card, or another pull request? Link it here.
-->

## To-do before merge
<!---
(Optional -- remove this section if not needed)
Include any notes about things that need to happen before this PR is merged, e.g.:
- [ ] Change the base branch
- [ ] Update dbt Cloud jobs
- [ ] Ensure PR #56 is merged
-->

## Screenshots:
<!---
Include a screenshot of the relevant section of the updated DAG. You can access
your version of the DAG by running `dbt docs generate && dbt docs serve`.
-->

## Validation of models:
<!---
Include any output that confirms that the models do what is expected. This might
be a link to an in-development dashboard in your BI tool, or a query that
compares an existing model with a new one.
-->

## Changes to existing models:
<!---
Include this section if you are changing any existing models. Link any related
pull requests on your BI tool, or instructions for merge (e.g. whether old
models should be dropped after merge, or whether a full-refresh run is required)
-->

## Checklist:
<!---
This checklist is mostly useful as a reminder of small things that can easily be
forgotten – it is meant as a helpful tool rather than hoops to jump through.
Put an `x` in all the items that apply, make notes next to any that haven't been
addressed, and remove any items that are not relevant to this PR.
-->
- [ ] My pull request represents one logical piece of work.
- [ ] My commits are related to the pull request and look clean.
- [ ] My SQL follows the [dbt Labs style guide](https://github.com/dbt-labs/corp/blob/master/dbt_style_guide.md).
- [ ] I have materialized my models appropriately.
- [ ] I have added appropriate tests and documentation to any new models.
- [ ] I have updated the README file if applicable.
- [ ] I have added partitioning an clustering fields where appropriate.
4 changes: 4 additions & 0 deletions .github/workflows/bigquery_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: stg

- uses: actions/setup-python@v4
with:
Expand All @@ -35,6 +37,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: prd

- uses: actions/setup-python@v4
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
env:
DBT_CICD_RUN: "true"
DESTINATION_BRANCH: "${{ github.event.pull_request.base.ref }}"
DBT_DATASET: "cicd_${{ github.event.number }}_${{ github.run_number }}_${{ github.sha }}"
DBT_DATASET: "ci_${{ github.event.number }}_${{ github.run_number }}_${{ github.sha }}"
DBT_PROFILES_DIR: "."
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- name: pre-commit run -a
run: SKIP=dbt-compile,dbt-docs-generate pre-commit run -a

- run: pytest ./tests/pytest -m no_deps
- run: pytest ./tests/pytest -m no_deps -n 5
- run: dbt deps
- name: dbt debug
run: dbt debug --target $DESTINATION_BRANCH
Expand All @@ -62,12 +62,12 @@ jobs:
- name: dbt build
run: dbt --warn-error build --fail-fast --target $DESTINATION_BRANCH

- run: pytest ./tests/pytest -m run_results_json
- run: pytest ./tests/pytest -m run_results_json -n 5

- name: dbt source freshness
run: dbt source freshness --target $DESTINATION_BRANCH || true # source freshness is allowed to fail in CI due to stale sources, the next command runs pytest on sources.json to validate the generated SQL (the prupose of this step)

- run: pytest ./tests/pytest -m sources_json
- run: pytest ./tests/pytest -m sources_json -n 5

- name: dbt build incremental models
run: dbt --warn-error build --fail-fast --select config.materialized:incremental --target $DESTINATION_BRANCH
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/daily_runs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: stg

- uses: actions/setup-python@v4
with:
Expand All @@ -42,6 +44,11 @@ jobs:
- name: Install python packages
run: pip install -r requirements.txt

- name: dbt seed
run: dbt seed --target stg
env:
DBT_DATASET: "stg"

- name: dbt build
run: dbt build --target stg
env:
Expand All @@ -53,6 +60,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: prd

- uses: actions/setup-python@v4
with:
Expand All @@ -71,6 +80,11 @@ jobs:
- name: Install python packages
run: pip install -r requirements.txt

- name: dbt seed
run: dbt seed --target prd
env:
DBT_DATASET: "prd"

- name: dbt build
run: dbt build --target prd
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ __pycache__/
.state/
.user.yml
.vscode/
*.Identifier
*.ipynb
dbt_packages/
logs/
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ repos:
hooks:
- id: pytest-no-deps
name: pytest-no-deps
entry: pytest ./tests/pytest -m no_deps
entry: pytest ./tests/pytest -m no_deps -n 5
language: system
pass_filenames: false
always_run: true
Expand Down Expand Up @@ -76,15 +76,15 @@ repos:
hooks:
- id: pytest-catalog-json
name: pytest-catalog-json
entry: pytest ./tests/pytest -m catalog_json
entry: pytest ./tests/pytest -m catalog_json -n 5
language: system
pass_filenames: false
always_run: true
- repo: local
hooks:
- id: pytest-manifest-json
name: pytest-manifest-json
entry: pytest ./tests/pytest -m manifest_json
entry: pytest ./tests/pytest -m manifest_json -n 5
language: system
pass_filenames: false
always_run: true
Loading