-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[CLI] Add support for running postgres in a container to the local testnet + rest of PRs in stack #10271
Conversation
56436ab
to
fcb0465
Compare
f59af3e
to
0ccc2b3
Compare
fcb0465
to
fe141c9
Compare
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.
lgtm, comments on CLI commands may be a little long.
keep in mind that the first line will show in -h
and the rest of the lines will show in --help
, I don't know what the cutoff is.
fe141c9
to
25fe203
Compare
0ccc2b3
to
41609e9
Compare
25fe203
to
ec1bb8f
Compare
41609e9
to
982bb39
Compare
ec1bb8f
to
a20df49
Compare
982bb39
to
09eae5f
Compare
a20df49
to
0166c9f
Compare
09eae5f
to
12597d6
Compare
0166c9f
to
543cdac
Compare
Turns out diesel relies on pq-sys, which wraps libpq. It isn't acceptable to add this as a dep for the CLI, we have no way to ensure users have it installed and even if we did, it feels like an unnecessary dep for users who aren't using the local testnet / this feature of the local testnet. I'm investigating alternatives here: https://aptos-org.slack.com/archives/C04PRP1K1FZ/p1696019475810529. |
I switched to diesel-async. This solves it for this PR but the processors still use the mainline diesel postgres library, which uses libpg internally. To address this, I will make use of this branch for now in that PR: aptos-labs/aptos-indexer-processors#146. We'll discuss whether we want to actually adopt this PR or if I have to use an alternative, like implementing diesel::Connection on https://github.com/sfackler/rust-postgres and using that. |
446a5fb
to
57b3c28
Compare
12597d6
to
46b2dc2
Compare
57b3c28
to
126f8d8
Compare
46b2dc2
to
7a9ed32
Compare
126f8d8
to
7f3c143
Compare
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.
what happens if you don't have docker installed?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6149aee
to
8b5b6bf
Compare
Landing this is currently blocked: https://aptos-org.slack.com/archives/C03N83P7QUC/p1691767293160939. I need to update the version of serde we use but doing so breaks some kind of old codegen / format gen we have. |
This change to Bollard means we can keep using the version of serde we're using now: fussybeaver/bollard#343, which helps us circumvent this issue: #10424. |
I tested that the Docker stuff still works with this fork of Bollard, let's land. |
8b5b6bf
to
3e429af
Compare
…ection, improve ready server re indexer API
bf7f740
to
608251b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Stack
Description
This PR adds support for:
This is required to run indexer processors.
I still need to double check that this works on a fresh system, I have a suspicion that if postgres isn't installed things will fail with some error to the effect of "postgres shared library missing".
I also need to make sure I'm not reintroducing the OpenSSL dep.
This depends on aptos-labs/aptos-indexer-processors#146.
Note: To avoid using undesired diesel features in the CLI I had to move the feature declarations from the workspace level to the crate level. Crate level feature declarations are additive, they don't replace the features used at the workspace level.
Test Plan
Postgres in a container
Once the CLI shuts down so does the postgres container.
Host postgres
Further Testing
Now that I've rebased all the other PRs in the stack into this PR, I will do some additional testing. I'm using this invocation:
Does it work on:
For the last of these, I ran it like this: