-
Notifications
You must be signed in to change notification settings - Fork 29
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
Allow remote shared cache testing from a network isolated sandbox #1498
Conversation
ok almost done, I'm gonna get these tests running in CI as the last step and then I'll take this off of draft. Go ahead and review the current form of it now because I only plan on adding code, not making modifications outside of review requests now. |
shim_db | ||
.execute_unprepared(&format!("CREATE DATABASE {}", db)) | ||
.await?; | ||
drop(shim_db); |
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.
Can you explain what drop
is doing here/why it is needed?
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 don't think its needed but it causes the shim_db to be droped before we create a new one so that we don't have two connections at once.
It also might help enforce that the follow up connection uses the same view version of the databases as the one we just created (e.g. drop might wait for transactions to be committed but I'm not too sure about that and it shouldn't be needed strictly here, I think the await is enough to know that the commit has happened and any new connections will see the new database.
rust/rsc/postgres-tests.wake
Outdated
Some dir -> Pass "{dir}/bin" | ||
None -> | ||
require Some postgresPath = whichInEnvPath "postgres" | ||
else failWithError "could not find postges on path" |
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.
typo: postges
-> postgres
@@ -80,6 +80,9 @@ test: wake.db | |||
unittest: all | |||
$(WAKE_ENV) ./bin/wake --in test_wake runUnitTests | |||
|
|||
remoteCacheTests: all | |||
$(WAKE_ENV) ./bin/wake -d -x 'testPostgres Unit' |
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: Do we need -d
here? Also should testPostgres
be in test_wake
like the other tests?
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.
-d It makes it a million times
Also I'm not going to mess with test_wake
stuff right now since thats its own bag of worms
.github/workflows/dockerfiles/alpine
Outdated
@@ -1,6 +1,6 @@ | |||
FROM alpine:3.14.0 | |||
|
|||
RUN apk add m4 g++ make pkgconf git tar xz gmp-dev re2-dev sqlite-dev fuse-dev ncurses-dev dash sqlite-static ncurses-static linux-headers jq | |||
RUN apk add m4 g++ make pkgconf git tar xz gmp-dev re2-dev sqlite-dev fuse-dev ncurses-dev dash sqlite-static ncurses-static linux-headers jq postgresql |
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.
Since we are building manually all these should be deleted
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 a lot of them are needed, just not the postgres dep
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.
oh that is what I meant lol
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.
"all these" -> postgres from all these different files not the entire dep list
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.
oh gotcha, I'm going to remove postgres testing from the other deps for now
rust/rsc/postgres-cmd-spec.json
Outdated
@@ -0,0 +1,43 @@ | |||
{ |
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.
Can this be deleted if we are generated the spec file?
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.
yep, I just haven't gotten around to it, hold your horses on clean up comments.
.github/workflows/build.yaml
Outdated
- name: Vendor remote cache deps | ||
run: cd rust/rsc && cargo vendor --locked |
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.
looks like you deleted too much
This is still very much a draft but it displays the basic components needed to get this idea to work.
Issues: