-
Notifications
You must be signed in to change notification settings - Fork 194
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
Speed up LoadMode.DBT_LS
by caching dbt ls output in Airflow Variable
#1014
Merged
Merged
Changes from all commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
0ea8c19
Add more logs to confirm bottleneck
tatiana 71dca3c
Support retrieving dbt ls cache from Airflow Variable
tatiana c46e8b1
Release 1.5.0a3
tatiana 240b03c
Fix log message for TaskGroups
tatiana ed8b6fe
Fix log for Cosmos TaskGroup
tatiana 5dc96af
Update changelog after last rebase
tatiana 4e0b71d
Introduce CachePurgeConfig
tatiana 5602e9b
Update release notes after rebase
tatiana fb3c99c
Update release notes after rebase
tatiana 4768ea7
Fix alpha release version
tatiana b5b0aff
Improve var caching to be prefixed with cosmos_cache
tatiana 9d36171
Temporarily remove fallback to custom load method in automatic, to tr…
tatiana 94f82a3
Remove CachePurgeConfig and purge based on commands passed to dbt ls
tatiana e4ece12
Add RenderConfig.airflow_vars_to_purge_cache
tatiana 625d980
Release 1.5.0a6
tatiana f29efc5
Change identifying dbt project changes based on md5
tatiana 955c7b5
Use cached_property
tatiana c0efbd3
Use sha256 to hash the dir
tatiana d93381f
Add logs
tatiana 0fe9de7
Fix logs
tatiana b298a27
Release 1.5.0a7
tatiana 913e810
Add docstrings and rename args
tatiana 1446987
Remove stale comment
tatiana 1f6f62b
Fix behaviour when user passes ProjectConfig(dbt_vars) in dbt ls
tatiana c19b80b
Add more tests
tatiana c811d23
Add more tests
tatiana 3e67d3a
Add more tests
tatiana 72b39b3
Fix unittests that were trying to fetch Airflow vars
tatiana 125d180
Try to fix test so it passes in linux and macos
tatiana 840a85c
Fix dbt graph test/--vars
tatiana bb9eca1
Fix test passing vars
tatiana d73a8d2
Fix test graph
tatiana a830135
Fix CI integrationt ests issue
tatiana f9571a1
Fix issue uncovered by sqlite test
tatiana 7624076
Change tests that should not be using cache
tatiana 20b636b
Change from sha256 to md5 to see if it is more deterministic
tatiana 5e8daf5
Try to get deterministic value on hash for dbt project dir
tatiana 624d9e8
Fix hash value in linux
tatiana 9b27522
Try to fix CI unittests
tatiana d860a6c
fix unittest in the CI
tatiana 763036f
fix unittest in the CI
tatiana 0168516
Split test by linux/darwin
tatiana 04a4ab7
Fix test_load_via_dbt_ls_caching_partial_parsing
tatiana 64b9ea4
Fix pyproject to fix integration tests
tatiana cf81a86
troubleshoot
tatiana 50f2c10
Troubleshoot CI
tatiana 2bd7e50
Troubleshoot CI
tatiana 23c1bc8
Attempts to get tests to pass
tatiana e24576f
Fix ci yml
tatiana 98232f7
Disable 2.9 tests
tatiana 5e53a4a
Reduce test matrix to help troubleshooting
tatiana 37264d8
Rename connection used in example dags
tatiana 26207ae
Try to reset Airflow db
tatiana a3b0656
Force airflow db to be reset
tatiana 935cf51
Run a subset of integration tests
tatiana 890ed11
Remove CI cache on int tests
tatiana afd3dbd
Try to renable all integration tests
tatiana aaa3a74
Try to fix integration tests
tatiana 36e38a3
Remove incorrrectly commited dev/dags/dbt/perf/models/
tatiana a69542c
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] 6c9bc63
Fix version of Airflow to supported version
tatiana b3c3716
Improve and tidy up tests
tatiana 254d276
Revert changes to workflows test
tatiana 9767c95
Introduce method to delete stale Cosmos cache Airflow Variables
tatiana 9bf1898
Release 1.5.0a8
tatiana 859a257
Change process_time to perf_counter
tatiana b9297c0
Address PR feedback
tatiana 16d288c
Address PR feedback
tatiana 65a9f07
Address PR feedback
tatiana b362afe
Address PR feedback
tatiana 56eeaba
Add an example DAG to cleanup Cosmos cache originated from running db…
tatiana d0c323d
Make calculate_dbt_ls_cache_current_version private
tatiana ea452f7
Add debug statement for dbt_ls_cache_key_args
tatiana 7ba3b63
Use timezone.utc as opposed to pytz
tatiana 97dddba
Change logger.warn to logger.info
tatiana 3cb6bed
Remove debug file
tatiana dae75fd
Add tests to cover delete_unused_dbt_ls_cache
tatiana 8ccf6ef
Rename int test to int
tatiana 908a48e
Add docs
tatiana 00eff69
Add docs
tatiana b6a9077
Improve docs, spelling, grammar
tatiana cedb178
Improve docs
tatiana 46a9b78
Release 1.5.0a9
tatiana 4dd9549
Update changelog
tatiana 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 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 |
---|---|---|
|
@@ -116,6 +116,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha || github.ref }} | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
|
@@ -139,6 +140,7 @@ jobs: | |
hatch run tests.py${{ matrix.python-version }}-${{ matrix.airflow-version }}:test-integration-setup | ||
hatch run tests.py${{ matrix.python-version }}-${{ matrix.airflow-version }}:test-integration | ||
env: | ||
AIRFLOW__COSMOS__ENABLE_CACHE_DBT_LS: 0 | ||
AIRFLOW_HOME: /home/runner/work/astronomer-cosmos/astronomer-cosmos/ | ||
AIRFLOW_CONN_EXAMPLE_CONN: postgres://postgres:[email protected]:5432/postgres | ||
DATABRICKS_HOST: mock | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
Would we still need it now?