-
Notifications
You must be signed in to change notification settings - Fork 5
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
[DPE-3062] Removing binary deps #179
Changes from 11 commits
e859d71
2290ec5
9fe0f84
a2eb53c
107851c
8fe03af
4e8c21f
5cc185f
0085c81
973c45e
d31d4f9
b05dbfc
9943bec
f31d321
4bd370b
3b00ff4
0915ebd
c2bc503
185b5af
df84a20
7430b18
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,14 @@ parts: | |
- rustc | ||
- cargo | ||
- pkg-config | ||
charm-binary-python-packages: | ||
- psycopg2-binary | ||
- psycopg-binary | ||
- libpq-dev | ||
libpq: | ||
build-packages: | ||
- libpq-dev | ||
plugin: dump | ||
source: /usr/lib/ | ||
source-type: local | ||
prime: | ||
- lib/ | ||
organize: | ||
"*-linux-gnu/libpq.so*": lib/ | ||
Comment on lines
+38
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @delgod requested moving the SO to lib. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,14 @@ poetry-core = "^1.8.1" | |
lightkube = "^0.15.0" | ||
lightkube-models = "^1.29.0.6" | ||
pydantic = "^1.10.14" | ||
psycopg2-binary = "^2.9.9" | ||
psycopg = {extras = ["binary"], version = "^3.1.17"} | ||
|
||
|
||
[tool.poetry.group.cdeps] | ||
optional = true | ||
|
||
[tool.poetry.group.cdeps.dependencies] | ||
psycopg2 = "^2.9.9" | ||
psycopg = {extras = ["c"], version = "^3.1.17"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If installing psycopg in the main group. It will be compiled at each unit test run and the unit tests won't be able to run on systems that do not have libpq installed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't this this group is necessary or should be added Installing pyscopg2 without Installing pyscopg2 with So, it's possible to only have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Libpq was not present for sure on the self-hosted runner images nor is it a given that unit tests would be run on Ubuntu flavour that has libpq. Using compiled psycopg also means that CI unit tests would have to recompile on each run. @marceloneppel @taurus-forever what do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
wdym by recompile? fwiw There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this version unit tests task passes in ~10s: https://github.com/canonical/pgbouncer-k8s-operator/actions/runs/7714293497/job/21026204594?pr=179 Considering that the difference is up to declaring dependencies differently, I think this is the better approach. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems like something weird is going on poetry add pyscopg2 takes 8 seconds (including venv creation) on a fresh gh runner: https://github.com/canonical/pgbouncer-k8s-operator/actions/runs/7723418033/job/21053662267 that doesn't account for a >= 20 second difference There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just pip installing the packages has ~8s difference: https://github.com/canonical/pgbouncer-k8s-operator/actions/runs/7725456003/job/21059694185?pr=207 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing pre-compiled binary here has a way bigger strategic effect comparing to 20 seconds saving. Please, branch this to a new bugreport and unblock this huge merge please (as both options are safe and does the job). Tnx! |
||
|
||
[tool.poetry.group.charm-libs.dependencies] | ||
# data_platform_libs/v0/data_interfaces.py | ||
|
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.
I think it will be installed by the other plugin but might as well.