-
Notifications
You must be signed in to change notification settings - Fork 566
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
Make testpachd a runnable binary #9887
Conversation
f81933b
to
1598552
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9887 +/- ##
===========================================
+ Coverage 41.64% 57.96% +16.32%
===========================================
Files 548 607 +59
Lines 65290 73907 +8617
===========================================
+ Hits 27188 42840 +15652
+ Misses 36046 30511 -5535
+ Partials 2056 556 -1500 ☔ View full report in Codecov by Sentry. |
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 believe that this can be rewritten to not need the cleanup package at all, or perhaps use it internally, by e.g. running in one function and deferring release of resources until the end, or by allocating resources, returning and deferring a close/release in the caller.
65504d0
to
d8caafe
Compare
d8caafe
to
0b07006
Compare
Please take another look. @Zhang-Muyang you have to approve if you're OK with the changes from PFS's perspective, a comment saying "looks good" won't do it. |
This makes testpachd runnable with `bazel run //src/testing/testpachd`. It will automatically setup a pachctl context when the server is ready, and restore to whatever you had before when exiting. This should eliminate most of integrations' need to use k8s in their tests, which will make their tests much faster. It's also handy for local debugging, of course. Unrelated change: while I was in here, I made the grpc validation interceptor not log a warning during health checks.
This makes testpachd runnable with
bazel run //src/testing/testpachd
.It will automatically setup a pachctl context when the server is ready, and restore to whatever you had before when exiting.
Right now you can't activate auth, but in #9886 I made testpachd auth-ready, so when that is merged I will add an "activateAuth" flag to start it up with auth.
This should eliminate most of integrations' need to use k8s in their tests, which will make their tests much faster. It's also handy for local debugging, of course.
@pachyderm/pfs review is required because I refactored a utility function to not need a *testing.T, and updated a caller in src/server/pfs/testing.
Unrelated change: while I was in here, I made the grpc validation interceptor not log a warning during health checks.