-
Notifications
You must be signed in to change notification settings - Fork 913
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
pytest: Add system-postgres
DB provider and allow pyln-testing to run on older CLN versions too
#6947
Draft
cdecker
wants to merge
8
commits into
master
Choose a base branch
from
20231215-pytest-system-progres
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
cdecker
force-pushed
the
20231215-pytest-system-progres
branch
from
December 29, 2023 13:52
1157260
to
8a5ebef
Compare
cdecker
force-pushed
the
20231215-pytest-system-progres
branch
3 times, most recently
from
January 23, 2024 11:26
a2dae52
to
7cbfe67
Compare
Fixed a minor issue when parsing non-release version. |
cdecker
force-pushed
the
20231215-pytest-system-progres
branch
from
January 23, 2024 17:47
84a409b
to
3031ff6
Compare
cdecker
changed the title
pytest: Add
pytest: Add Jan 26, 2024
system-progres
DB provider and allow pyln-testing to run on older CLN versions toosystem-postgres
DB provider and allow pyln-testing to run on older CLN versions too
cdecker
force-pushed
the
20231215-pytest-system-progres
branch
5 times, most recently
from
February 2, 2024 08:31
48dc658
to
109d384
Compare
cdecker
force-pushed
the
20231215-pytest-system-progres
branch
3 times, most recently
from
February 9, 2024 13:55
e0a4d20
to
9a50c77
Compare
cdecker
force-pushed
the
20231215-pytest-system-progres
branch
2 times, most recently
from
February 21, 2024 11:02
3fe35ed
to
c1f52cb
Compare
Spinning `postgres` up and down for the tests can be rather slow, and forces us to switch user away from `root`. The forced switch away from `root` is generally a good idea, but rather annoying in CI, where the file permissions often just take on `root` as default. The system-wide postgres requires extra config, the DB DSN, but allows us to have either a remote DB, or a system-provided one, or another container in `docker-compose`. Changelog-Added pyln-testing: Added a `system-postgres` DB provider to run tests against a system-wide or even remote DB.
We changed the way we configure CLN to run in developer mode, which promptly broke anything that wasn't v23.11 and later. So we parse the version, and make it comparable, so we can determine what to do on the fly, and maintain a better backwards compatibility. Changelog-Changed: pyln-testing: pyln-testing is now version-aware and can customize the run based on the version.
We weren't compiling with tags, causing the version command to just return the git commit hash, rather than a valid version string.
cdecker
force-pushed
the
20231215-pytest-system-progres
branch
from
February 21, 2024 16:24
c1f52cb
to
ae9c71c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This tackles two problems:
postgres
we can cut down on the overhead of spinning the DB up and down for the tests. More importantly this allows us to run the tests asroot
, since we no longer run intopostgres
complaining about not wanting to run asroot
. This is for example the case if we run in CI or in docker, where the files are often owned byroot
, and having to switch to another user can result in permission issues.pyln-testing
broke backwards compatibility with prior CLN versions because it just bluntly assumes--developer
is a valid CLI option. It was introduced in v23.11 and therefore causes all prior versions to justabort()
.