-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Regression] Fix psycopg2 version install #113
Merged
+80
−682
Merged
Changes from 40 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
d93fbba
remove vscode and ds_store from git tracking
mikealfare 97f7ef7
default to psycopg2-binary everywhere
mikealfare 54895eb
add post build hook to swap out psycopg2-binary for psycopg2 based on…
mikealfare cb7307b
update integration tests for the new psycopg2 install approach
mikealfare 94da850
changelog
mikealfare 19e5a52
update post-build hook to a pre-build hook
mikealfare f86d9d5
replace script with inline execution
mikealfare 9854f22
use hatch run instead of pip install
mikealfare 7504b56
typo in the env var
mikealfare 528d3ce
fix a type
mikealfare 07b0c22
syntax
mikealfare dbfa07d
typo
mikealfare 1e97224
get the value from the list
mikealfare 8b1d3fd
debugging
mikealfare 5460c61
type
mikealfare eb34154
remove hatch build hook that is not working as expected
mikealfare ac937f4
simplify psycopg2 check and override expected psycopg2 version since …
mikealfare 1ffb3cb
use hatch envs for psycopg2 test
mikealfare b0d5553
add manual workaround and associated test
mikealfare a02bd81
roll ubuntu image back to 22.04 to support python 3.8
mikealfare 08ed814
fix syntax error in test
mikealfare 4808e0b
fix the typo in the workaround in the readme
mikealfare 991f066
fix syntax to resolve || before |
mikealfare cc891c0
add post install command to swap out psycopg2
mikealfare 2fc1c02
use full install instead of editable install
mikealfare 6f51bcd
fix venv activate syntax
mikealfare 7d00964
fix rm syntax
mikealfare d95529e
Merge branch 'main' into fix-psycopg2-version-install
mikealfare 2c7d516
remove references to hatch in psycopg2 test
mikealfare 2c1ee82
remove inapplicable tests
mikealfare 796aa41
swap out post-install-command for a build hook
mikealfare 721e515
add build post hook
mikealfare 7e830ba
remove all hatch hooks
mikealfare f17d448
revert dev changes in pyproject.toml
mikealfare 52cd912
remove hatch as a test req for psycopg2
mikealfare af57f2e
move the script into a separate file to be reused
mikealfare 43b5342
update workaround to use jq over string parsing
mikealfare 3daa2d0
mark script as executable
mikealfare 41e3126
fix syntax in error message
mikealfare d2fd8f9
revert to string parsing to avoid jq dep
mikealfare d3b0cc5
update manual workaround to be more robust to future changes
mikealfare 36f94d7
fix syntax
mikealfare 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: Fixes | ||
body: Default to psycopg2-binary and allow overriding to psycopg2 via DBT_PSYCOPG2_NAME | ||
(restores previous behavior) | ||
time: 2024-06-05T20:26:14.801254-04:00 | ||
custom: | ||
Author: mikealfare | ||
Issue: "96" |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
python -m venv venv | ||
source venv/bin/activate | ||
python -m pip install . | ||
|
||
if [[ "$PSYCOPG2_WORKAROUND" == true ]]; then | ||
PSYCOPG2_VERSION=$(pip show psycopg2-binary | grep Version | cut -d " " -f 2) | ||
pip uninstall -y psycopg2-binary | ||
pip install psycopg2==$PSYCOPG2_VERSION | ||
fi | ||
|
||
PSYCOPG2_NAME=$((pip show psycopg2 || pip show psycopg2-binary) | grep Name | cut -d " " -f 2) | ||
if [[ "$PSYCOPG2_NAME" != "$PSYCOPG2_EXPECTED_NAME" ]]; then | ||
echo -e 'Expected: "$PSYCOPG2_EXPECTED_NAME" but found: "$PSYCOPG2_NAME"' | ||
exit 1 | ||
fi | ||
|
||
deactivate | ||
rm -r ./venv |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,3 +161,9 @@ cython_debug/ | |
|
||
# testing artifacts | ||
/logs | ||
|
||
# MacOS | ||
.DS_Store | ||
|
||
# vscode | ||
.vscode/ |
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
mikealfare marked this conversation as resolved.
Show resolved
Hide resolved
|
This file was deleted.
Oops, something went wrong.
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.
nit: can we pipe this to stderr
>&2