-
Notifications
You must be signed in to change notification settings - Fork 486
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
Use compute_ctl
to manage Postgres in tests.
#3886
Merged
Merged
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
ololobus
reviewed
Mar 27, 2023
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 haven't read everything thoroughly, but here are some comments. In overall, looks nice!
hlinnaka
force-pushed
the
test-compute_ctl
branch
from
March 28, 2023 09:00
fa4e96d
to
78568fc
Compare
hlinnaka
force-pushed
the
test-compute_ctl
branch
2 times, most recently
from
April 3, 2023 07:17
11946ab
to
58d39fa
Compare
This was referenced Apr 3, 2023
hlinnaka
force-pushed
the
test-compute_ctl
branch
from
April 3, 2023 14:30
58d39fa
to
53a56fd
Compare
hlinnaka
force-pushed
the
test-compute_ctl
branch
from
April 3, 2023 14:58
53a56fd
to
069f73d
Compare
MMeent
reviewed
Apr 3, 2023
hlinnaka
force-pushed
the
neon_local-endpoints
branch
3 times, most recently
from
April 3, 2023 17:32
9083d1e
to
56bf5b4
Compare
hlinnaka
force-pushed
the
test-compute_ctl
branch
from
April 3, 2023 17:34
069f73d
to
532d880
Compare
hlinnaka
force-pushed
the
neon_local-endpoints
branch
4 times, most recently
from
April 9, 2023 19:01
1326ccc
to
d823c15
Compare
hlinnaka
force-pushed
the
neon_local-endpoints
branch
from
April 12, 2023 07:01
d823c15
to
50e38f5
Compare
hlinnaka
force-pushed
the
test-compute_ctl
branch
3 times, most recently
from
May 5, 2023 10:50
aed055e
to
13d2254
Compare
MMeent
reviewed
May 5, 2023
hlinnaka
force-pushed
the
test-compute_ctl
branch
2 times, most recently
from
May 9, 2023 17:25
4b7f5b5
to
75227e8
Compare
lubennikovaav
force-pushed
the
test-compute_ctl
branch
from
June 1, 2023 12:47
75227e8
to
e2cd2ad
Compare
If the port is hard-coded, you cannot have more than one compute_ctl running at a time. (Or not at all, if you're unlucky and the port is in use)
'compute_ctl' merely prints them to the log. The next commit will make the local test control plane to also use 'compute_ctl', and it doesn't have the concept of a project, so it cannot fill them with any sensible values.
This adds test coverage for 'compute_ctl', as it is now used by all the python tests. There are a few differences in how 'compute_ctl' is called in the tests, compared to the real web console: - In the tests, the postgresql.conf file is included as one large string in the spec file, and it is written out as it is to the data directory. I added a new field for that to the spec file. The real web console, however, sets all the necessary settings in the 'settings' field, and 'compute_ctl' creates the postgresql.conf from those settings. - In the tests, the information needed to connect to the storage, i.e. tenant_id, timeline_id, connection strings to pageserver and safekeepers, are now passed as new fields in the spec file. The real web console includes them as the GUCs in the 'settings' field. (Both of these are different from what the test control plane used to do: It used to write the GUCs directly in the postgresql.conf file). The plan is to change the control plane to use the new method, and remove the old method, but for now, support both. Some tests that were sensitive to the amount of WAL generated needed small changes, to accommodate that compute_ctl runs the background health monitor which makes a few small updates. Also some tests shut down the pageserver, and now that the background health check can run some queries while the pageserver is down, that can produce a few extra errors in the logs, which needed to be allowlisted.
It was renamed to Endpoint and refactored to reduce code duplication.
lubennikovaav
force-pushed
the
test-compute_ctl
branch
from
June 5, 2023 19:41
5841011
to
99d27fa
Compare
lubennikovaav
approved these changes
Jun 6, 2023
LGTM, thanks! |
awestover
pushed a commit
that referenced
this pull request
Jun 14, 2023
This adds test coverage for 'compute_ctl', as it is now used by all the python tests. There are a few differences in how 'compute_ctl' is called in the tests, compared to the real web console: - In the tests, the postgresql.conf file is included as one large string in the spec file, and it is written out as it is to the data directory. I added a new field for that to the spec file. The real web console, however, sets all the necessary settings in the 'settings' field, and 'compute_ctl' creates the postgresql.conf from those settings. - In the tests, the information needed to connect to the storage, i.e. tenant_id, timeline_id, connection strings to pageserver and safekeepers, are now passed as new fields in the spec file. The real web console includes them as the GUCs in the 'settings' field. (Both of these are different from what the test control plane used to do: It used to write the GUCs directly in the postgresql.conf file). The plan is to change the control plane to use the new method, and remove the old method, but for now, support both. Some tests that were sensitive to the amount of WAL generated needed small changes, to accommodate that compute_ctl runs the background health monitor which makes a few small updates. Also some tests shut down the pageserver, and now that the background health check can run some queries while the pageserver is down, that can produce a few extra errors in the logs, which needed to be allowlisted. Other changes: - remove obsolete comments about PostgresNode; - create standby.signal file for Static compute node; - log output of `compute_ctl` and `postgres` is merged into `endpoints/compute.log`. --------- Co-authored-by: Anastasia Lubennikova <[email protected]>
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 adds test coverage for 'compute_ctl', as it is now used by all
the python tests.
There are a few differences in how 'compute_ctl' is called in the
tests, compared to the real web console:
In the tests, the postgresql.conf file is included as one large
string in the spec file, and it is written out as it is to the data
directory. I added a new field for that to the spec file. The real
web console, however, sets all the necessary settings in the
'settings' field, and 'compute_ctl' creates the postgresql.conf from
those settings.
In the tests, the information needed to connect to the storage, i.e.
tenant_id, timeline_id, connection strings to pageserver and
safekeepers, are now passed as new fields in the spec file. The real
web console includes them as the GUCs in the 'settings' field. (Both
of these are different from what the test control plane used to do:
It used to write the GUCs directly in the postgresql.conf file). The
plan is to change the control plane to use the new method, and
remove the old method, but for now, support both.
Some tests that were sensitive to the amount of WAL generated needed
small changes, to accommodate that compute_ctl runs the background
health monitor which makes a few small updates. Also some tests shut
down the pageserver, and now that the background health check can run
some queries while the pageserver is down, that can produce a few
extra errors in the logs, which needed to be allowlisted.
Other changes:
compute_ctl
andpostgres
is merged intoendpoints/compute.log
.