Skip to content

Commit 9fa2a7c

Browse files
authored
fix(samples): fix column name in DagModel of Airflow workflow to clean up database (GoogleCloudPlatform#6532)
## Description Fixes GoogleCloudPlatform#6531 ## Checklist - [X ] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md) - [ ] README is updated to include [all relevant information](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#readme-file) - [ ] **Tests** pass: `nox -s py-3.6` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [ ] **Lint** pass: `nox -s lint` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones) - [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones) - [X ] Please **merge** this PR for me once it is approved. - [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/.github/CODEOWNERS) with the codeowners for this sample
1 parent a2349c9 commit 9fa2a7c

File tree

3 files changed

+254
-232
lines changed

3 files changed

+254
-232
lines changed

composer/workflows/airflow_db_cleanup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"keep_last_group_by": None
131131
}, {
132132
"airflow_db_model": DagModel,
133-
"age_check_column": DagModel.last_scheduler_run,
133+
"age_check_column": DagModel.last_parsed_time, # prior to Airflow 2.0.2 this column was named last_scheduler_run
134134
"keep_last": False,
135135
"keep_last_filters": None,
136136
"keep_last_group_by": None

0 commit comments

Comments
 (0)