-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
storage: Split pkg cloud into cloud interface and cloud impl #50644
storage: Split pkg cloud into cloud interface and cloud impl #50644
Conversation
I will rebase once #50493 is merged. I just wanted to get a CI run in to make sure I haven't botched up the move. |
391b52a
to
26aa14e
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.
Reviewed 38 of 38 files at r2.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @adityamaru and @dt)
pkg/storage/cloud/external_storage.go, line 19 at r2 (raw file):
// ExternalStorage provides functions t
You should update the comment "ExternalStorage provides API..."
Also make it very clear that this file should not have any implementation code -- it's for interfaces only.
26aa14e
to
35f3ac7
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.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @dt and @miretskiy)
pkg/storage/cloud/external_storage.go, line 19 at r2 (raw file):
Previously, miretskiy (Yevgeniy Miretskiy) wrote…
// ExternalStorage provides functions t
You should update the comment "ExternalStorage provides API..."
Also make it very clear that this file should not have any implementation code -- it's for interfaces only.
done.
pkg/testutils/lint/lint_test.go, line 441 at r4 (raw file):
cloudimpl
@miretskiy fyi I had to update the lint allow list for using os.getEnv
35f3ac7
to
6df4be3
Compare
Previously, both the ExternalStorage interface and all the specialized implementations were in `pkg/storage/cloud`. This PR moves the interface and factory method signatures to `pkg/storage/cloud` and all the implementations to `pkg/storage/cloudimpl`. The motivation behind this is to ensure that other packages such `pkg/sql` and `pkg/kv` depend on just the interface/factory signatures (not the concrete impl) to prevent dependency cycles. More concreteley, we need to plumb an InternalExecutor and kv.DB for our new user scoped file-table storage. This was previously not possible because of a `pkg/sql -> pkg/storage/cloud ->pkg/sql` cycle. Now, since the executor will be used in `cloudimpl` this cycle will not occur. Release note: None
6df4be3
to
1eaeed8
Compare
TFTR! bors r=miretskiy |
Build succeeded |
Previously, both the ExternalStorage interface and all the specialized
implementations were in
pkg/storage/cloud
.This PR moves the interface and factory method signatures to
pkg/storage/cloud
and all the implementations topkg/storage/cloudimpl
. The motivation behind this is to ensure thatother packages such
pkg/sql
andpkg/kv
depend on just theinterface/factory signatures (not the concrete impl) to prevent
dependency cycles.
More concreteley, we need to plumb an InternalExecutor and kv.DB for our
new user scoped file-table storage. This was previously not possible
because of a
pkg/sql -> pkg/storage/cloud ->pkg/sql
cycle. Now, sincethe executor will be used in
cloudimpl
this cycle will not occur.Informs: #47211
Release note: None