This repository was archived by the owner on May 22, 2025. It is now read-only.
Fix database setting in PostgresDatabase#1276
Merged
pankajastro merged 5 commits intomainfrom Nov 21, 2022
Merged
Conversation
feluelle
reviewed
Nov 21, 2022
Codecov ReportBase: 94.74% // Head: 94.74% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #1276 +/- ##
=======================================
Coverage 94.74% 94.74%
=======================================
Files 70 70
Lines 3236 3236
Branches 378 378
=======================================
Hits 3066 3066
Misses 106 106
Partials 64 64
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
feluelle
approved these changes
Nov 21, 2022
phanikumv
approved these changes
Nov 21, 2022
Contributor
|
Created an issue to check the backward compatibility for PostGresHook: #1291 |
sunank200
pushed a commit
that referenced
this pull request
Nov 23, 2022
# Description ## What is the current behavior? Currently, the CI is failing for postgres related tests, because the postgres database is set to the table schema. **More details:** In 313f6da#diff-9fcbc9dc6fc68bf0a0d62a485508779f5b1f6d749a197e0f1ab1758983d1eb1e we added `kwargs.update({"database"` but PostgresHook did not support `database` kwarg at that time. This is why it basically did not do anything. Now after apache/airflow#26744 got released in the latest provider, it is being picked up and it shows that we wrongly set `{"database": self.table.metadata.schema}` ## What is the new behavior? We correctly set the database to the table's database. ## Does this introduce a breaking change? No. ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] Extended the README / documentation, if necessary (cherry picked from commit b452f15)
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
What is the current behavior?
Currently, the CI is failing for postgres related tests, because the postgres database is set to the table schema.
More details:
In 313f6da#diff-9fcbc9dc6fc68bf0a0d62a485508779f5b1f6d749a197e0f1ab1758983d1eb1e we added
kwargs.update({"database"but PostgresHook did not supportdatabasekwarg at that time. This is why it basically did not do anything. Now after apache/airflow#26744 got released in the latest provider, it is being picked up and it shows that we wrongly set{"database": self.table.metadata.schema}What is the new behavior?
We correctly set the database to the table's database.
Does this introduce a breaking change?
No.
Checklist